From: Nate Case <ncase@xes-inc.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rpurdie@rpsys.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: Add support for Philips PCA955x I2C LED drivers
Date: Fri, 16 May 2008 15:52:56 -0500 [thread overview]
Message-ID: <1210971176.13845.533.camel@localhost.localdomain> (raw)
In-Reply-To: <20080515163331.0677f4b1.akpm@linux-foundation.org>
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>
prev parent reply other threads:[~2008-05-16 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 23:47 [PATCH] leds: Add support for Philips PCA955x I2C LED drivers Nate Case
2008-05-15 23:33 ` Andrew Morton
2008-05-16 20:52 ` Nate Case [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1210971176.13845.533.camel@localhost.localdomain \
--to=ncase@xes-inc.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox