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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 06 Aug 2010 04:27:26 +0300
From:	Maxim Levitsky <maximlevitsky@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Alex Dubov <oakad@...oo.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] MEMSTICK: Add driver for Ricoh R5C592 Card reader.

On Thu, 2010-08-05 at 18:14 -0700, Joe Perches wrote: 
> On Thu, 2010-08-05 at 17:25 +0300, Maxim Levitsky wrote:
> > Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
> 
> Trivial comments:
> 
> > ---
> >  MAINTAINERS                    |    6 +
> > +RICOH R5C592 MEMORYSTICK DRIVER
> > +M:	Maxim Levitsky <maximlevitsky@...il.com>
> > +S:	Maintained
> > +F:	drivers/memstick/host/r592.c
> > +F:	drivers/memstick/host/r592.h
> 
> Patterns in maintainers can use wildcards
Didn't know about that, thanks! 
> 
> F:	drivers/memstick/host/r592*
> 
> > --- /dev/null
> > +++ b/drivers/memstick/host/r592.c
> > @@ -0,0 +1,889 @@
> []
> > +static char *tpc_names[] = {
> 
> const ?
Sure 
> 
> > +	"MS_TPC_READ_MG_STATUS",
> > +	"MS_TPC_READ_LONG_DATA",
> 
> []
> 
> > +#define dbg(format, ...) \
> > +	if (debug) \
> > +		printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> > +
> > +#define dbg_verbose(format, ...) \
> > +	if (debug > 1) \
> > +		printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> > +
> > +#define dbg_reg(format, ...) \
> > +	if (debug > 2) \
> > +		printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> > +
> 
> These style macros should use do { if (test) print(); } while (9)
> so they could be used without problems in if/else blocks.
>  
> Maybe it'd be better to have and use 1 macro with a level passed:
> 
> #define dbg(level, format, ...)						\
> do {									\
> 	if (debug > level)						\
> 		printk(KERN_DEBUG pr_fmt(format), ##__VA_ARGS__);	\
> } while (0)
Thinking again about that, why not...



> 
> > +#define message(format, ...) \
> > +	printk(KERN_INFO DRV_NAME ": " format "\n", ## __VA_ARGS__)
> 
> Why not just use pr_info?
Will look at that.

Best regards,
Maxim Levitsky



--
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