staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err()
PATCH 1/1 staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err()
Fix the following checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Signed-off-by Ioana Ciornei <[email protected]>
--- drivers/staging/dgnc/dgnc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_sysfs.c +1 -1
@@ -75,7 +75,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver) rc |=driver_create_file (driverfs, &driver_attr_maxboards); rc |=driver_create_file (driverfs, &driver_attr_pollrate);if (rc) -printk (KERN_ERR "DGNC: sysfs driver_create_file failed!\n" ); +pr_err ("DGNC: sysfs driver_create_file failed!\n" ); }
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 15 lines · Ioana Ciornei
Fix the following checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...Signed-off-by Ioana Ciornei <[email protected]>--- drivers/staging/dgnc/dgnc_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/dgnc/dgnc_sysfs.c +0
-0
drivers/staging/dgnc/dgnc_sysfs.c void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver) · line 78
Quoted 5 lines
drivers/staging/dgnc/dgnc_sysfs.c +1
-1@@ -75,7 +75,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver) rc |=driver_create_file (driverfs, &driver_attr_maxboards); rc |=driver_create_file (driverfs, &driver_attr_pollrate);if (rc) -printk (KERN_ERR "DGNC: sysfs driver_create_file failed!\n" ); +pr_err ("DGNC: sysfs driver_create_file failed!\n" );
You have access to a struct device, so please use it here and use dev_err().
Actually, no, what a mess, a driver shouldn't be creating files. Ugh, I'll take this, but this really needs to be fixed up and just removed...
thanks,
greg k-h