Re: [PATCH v2 1/2] Staging: comedi: drivers: replaced printk with dev_dbg

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

 



On Mon, 2012-11-19 at 20:44 +0530, Arpith Easow Alexander wrote:
> This is a patch to the vmk80xx.c file that replaces the printk with dev_dbg.
> This fixes the warnings found by the checkpatch.pl tool.

The commit message is missing description of why
some printk(KERN_INFO are converted to dev_dbg

Also, it'd be better to remove the dbgcm macro
altogether and just use dev_dbg.

> diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
[]
> @@ -131,10 +131,10 @@ static int dbgcm = 1;
>  static int dbgcm;
>  #endif
>  
> -#define dbgcm(fmt, arg...)                     \
> +#define dbgcm(dev, fmt, arg...)                     \
>  do {                                           \
>  	if (dbgcm)                             \
> -		printk(KERN_DEBUG fmt, ##arg); \
> +		dev_dbg(dev, fmt, ##arg); \
>  } while (0)

The dbgcm variable and macro isn't really necessary
because dynamic_debug has all the same capability.

> @@ -1371,14 +1373,16 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
>  
>  	if (dev->board.model == VMK8061_MODEL) {
>  		vmk80xx_read_eeprom(dev, IC3_VERSION);
> -		printk(KERN_INFO "comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);
> +		dev_dbg(&(dev->udev->dev),
> +			"comedi#: vmk80xx: %s\n", dev->fw.ic3_vers);

This likely should not be dev_dbg.


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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