lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1353338430.5287.6.camel@joe-AO722>
Date:	Mon, 19 Nov 2012 07:20:30 -0800
From:	Joe Perches <joe@...ches.com>
To:	Arpith Easow Alexander <arpith99@...il.com>
Cc:	abbotti@....co.uk, fmhess@...rs.sourceforge.net,
	gregkh@...uxfoundation.org, hsweeten@...ionengravers.com,
	dan.carpenter@...cle.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] Staging: comedi: drivers: replaced printk with
 dev_dbg

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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ