[PATCH] Staging: dgnc: Replace printk with dev_err
Daniel Baluta
daniel.baluta at gmail.com
Fri Feb 27 09:36:57 EET 2015
On Fri, Feb 27, 2015 at 5:17 AM, Cristina Opriceana
<cristina.opriceana at gmail.com> wrote:
> This patch fixes the following checkpatch.pl warning:
> WARNING: Prefer [subsystem eg: netdev]_err over printk(KERN_ERR, ...)
>
> Signed-off-by: Cristina Opriceana <cristina.opriceana at gmail.com>
> ---
> drivers/staging/dgnc/dgnc_sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
> index 2fd34ca..8ce6a00 100644
> --- a/drivers/staging/dgnc/dgnc_sysfs.c
> +++ b/drivers/staging/dgnc/dgnc_sysfs.c
> @@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
> rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd);
> rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number);
> if (rc)
> - printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n");
> + dev_err(&(bd->pdev->dev), "dgnc: sysfs device_create_file failed!\n");
> }
There is no need for parenthesis around bd->pdev->dev. Make this change
and submit it to outreachy mailing list :).
There were previous attempts to fix this but it is not very clear
what happened.
https://lkml.org/lkml/2014/12/22/361
Thanks Cristina!
Daniel.
More information about the firefly
mailing list