[PATCH 10/11] staging: dgap: Fix printk related errors as reported by checkpatch
Mark Hounschell
markh at compro.net
Mon Mar 3 15:07:02 UTC 2014
On 02/28/2014 05:27 PM, Dan Carpenter wrote:
> Please redo this one.
>
> On Fri, Feb 28, 2014 at 03:48:58PM -0500, Mark Hounschell wrote:
>> This patch fixes some printk related errors report by checkpatch.
>> It also removes more Digi debug/trace code left behind from patch #1.
>>
>
> These are two separate patches. The debug code is dead code yes? Did
> leaving this behind break anything or cause a bug? If so then we need
> to redo #1. Shouldn't we remove it from the header file? Do we still
> need the dgap_global_lock now? (If not then remove in a later patch).
>
I've separated it and the debug stuff I missed, will be done on its own
in a following patch.
>> --- a/drivers/staging/dgap/dgap.c
>> +++ b/drivers/staging/dgap/dgap.c
>> @@ -542,7 +542,7 @@ static int dgap_init_module(void)
>> if (dgap_NumBoards)
>> pci_unregister_driver(&dgap_driver);
>> else
>> - printk("WARNING: dgap driver load failed. No DGAP boards found.\n");
>> + pr_err("dgap: driver load failed. No boards found.\n");
>>
>
> dev_err().
>
I can't use dev_err unless I change some code here. I don't have what is
needed for arg1 to dev_err? There seems to be a lot of possible printk
issues hidden by dgap_err? I suspect I should not go there quite yet?
>
>
>> @@ -6064,7 +6036,7 @@ static void dgap_create_driver_sysfiles(struct pci_driver *dgap_driver)
>> rc |= driver_create_file(driverfs, &driver_attr_pollcounter);
>> rc |= driver_create_file(driverfs, &driver_attr_state);
>> if (rc)
>> - printk(KERN_ERR "DGAP: sysfs driver_create_file failed!\n");
>> + pr_err("dgap: sysfs driver_create_file failed!\n");
>
> Sysfs handles its own error messages. Delete all these sysfs printks.
>
Deleted.
Mark
More information about the devel
mailing list