Re: [PATCH] Staging: dgnc: replace printk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 01, 2015 at 09:31:41AM +0100, Matteo Semenzato wrote:
> From: Matteo Semenzato <mattew8898@xxxxxxxxx>
> 
> This patch fixes the following warning:
> Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev,
> ... then pr_err(...  to printk(KERN_ERR ...
> 
> Signed-off-by: Matteo Semenzato <mattew8898@xxxxxxxxx>
> ---
>  drivers/staging/dgnc/dgnc_sysfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
> index 2fd34ca..0fa2388 100644
> --- a/drivers/staging/dgnc/dgnc_sysfs.c
> +++ b/drivers/staging/dgnc/dgnc_sysfs.c
> @@ -91,7 +91,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");
>  }
>  
>  
> @@ -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");
> +		pr_err("DGNC: sysfs device_create_file failed!\n");

Why can't you use dev_err() here?

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux