Messages in this thread | | | Subject | Re: [PATCH] leds: Add support for Philips PCA955x I2C LED drivers | From | Nate Case <> | Date | Fri, 16 May 2008 15:52:56 -0500 |
| |
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@xes-inc.com>
| |