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: <1210971176.13845.533.camel@localhost.localdomain>
Date:	Fri, 16 May 2008 15:52:56 -0500
From:	Nate Case <ncase@...-inc.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	rpurdie@...ys.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: Add support for Philips PCA955x I2C LED drivers

On Thu, 2008-05-15 at 16:33 -0700, Andrew Morton wrote:
> Please prefer to implement code in C rather than as a macro.  Only use
> macros when the code *must* be a macro.
[snip]

Thanks for the feedback.  I've implemented all of your suggestions and
tested them.  The only place I deviated was here:

> > +	if (((client->addr >> chip->slv_addr_shift) << chip->slv_addr_shift)
> > +		!= chip->slv_addr) {
> 
> equivalent to the simpler
> 
> 	if (client->addr & ((1 << chip->slv_addr_shift) - 1)) {
> 
> I think?

I inserted the missing "~" from your version:

	if (client->addr & ~((1 << chip->slv_addr_shift) - 1)) !=

I'll send v2 of the patch shortly.

-- 
Nate Case <ncase@...-inc.com>

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