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: <20100617230209.GA391@kroah.com>
Date:	Thu, 17 Jun 2010 16:02:09 -0700
From:	Greg KH <greg@...ah.com>
To:	Henri Häkkinen <henuxd@...il.com>
Cc:	gregkh@...e.de, mithlesh@...syssoft.com, wfp5p@...ginia.edu,
	reodge@...il.com, andrea.gelmini@...ma.net,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging:comedi: Fixed coding convention issues.

On Mon, Jun 14, 2010 at 09:34:15AM +0300, Henri Häkkinen wrote:
> Cleaned up and fixed coding convention issues as reporteed by
> checkpatch.pl tool on the file `drivers.c'. Added logging macros
> to `comedidev.h'.  Replaced "BUG:" printk functions calls with
> BUG_ON macro.
> 
> Signed-off-by: Henri Häkkinen <henuxd@...il.com>
> ---
>  drivers/staging/comedi/comedidev.h |   54 +++++++++++++++-
>  drivers/staging/comedi/drivers.c   |  118 +++++++++++++++--------------------
>  2 files changed, 102 insertions(+), 70 deletions(-)
> 
> diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
> index 4eb2b77..5c78564 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -43,11 +43,59 @@
>  
>  #include "comedi.h"
>  
> -#define DPRINTK(format, args...)	do {		\
> -	if (comedi_debug)				\
> -		printk(KERN_DEBUG "comedi: " format , ## args);	\
> +#define comedi_printk(level, fmt, args...) \
> +	printk(level "comedi: " pr_fmt(fmt), ##args)
> +
> +#define DPRINTK(format, args...) \
> +do { \
> +	if (comedi_debug) \
> +		comedi_printk(KERN_DEBUG, fmt, ##args); \
>  } while (0)
>  
> +#define comedi_emerg(fmt, ...) \
> +	comedi_printk(KERN_EMERG, fmt, ##__VA_ARGS__)

I'd much rather you use the real dev_printk() versions of this instead
(dev_warn, dev_err, etc.) instead of creating a new macro.

thanks,

greg k-h
--
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