From: Joe Perches <joe@perches.com>
To: Rhyland Klein <rklein@nvidia.com>
Cc: "jic23@cam.ac.uk" <jic23@cam.ac.uk>,
Andrew Chew <AChew@nvidia.com>, "olof@lixom.net" <olof@lixom.net>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: RE: [PATCH v2] iio: light: Adding driver for ISL29018 ALS
Date: Tue, 05 Oct 2010 14:41:43 -0700 [thread overview]
Message-ID: <1286314903.2156.54.camel@Joe-Laptop> (raw)
In-Reply-To: <E88A1D35AF5437468E5B14C7C4BA61C702D2D2620A@HQMAIL01.nvidia.com>
On Tue, 2010-10-05 at 14:36 -0700, Rhyland Klein wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.com]
> > > diff --git a/drivers/staging/iio/light/isl29018.c
> > b/drivers/staging/iio/light/isl29018.c
> > > +static int isl29018_chip_init(struct i2c_client *client)
> > > +{
> > > + struct isl29018_chip *chip = i2c_get_clientdata(client);
> > > + int status;
> > > + int i;
> > > + int new_adc_bit;
> > > + unsigned int new_range;
> > > +
> > > + for (i = 0; i < ARRAY_SIZE(chip->reg_cache); i++)
> > > + chip->reg_cache[i] = 0;
> > memset?
> I could use memset, except this is only 4 registers = 32 bytes,
> so I don't think that is really worth it do you?
Your choice. I don't care really. I didn't look to
see how many elements were in chip->reg_cache.
I just noted it as whenever I see a loop initialization
like that, I think memset not loop.
cheers, Joe
prev parent reply other threads:[~2010-10-05 21:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 21:19 rklein
2010-10-05 21:35 ` Joe Perches
2010-10-05 21:36 ` Rhyland Klein
2010-10-05 21:41 ` Joe Perches [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=1286314903.2156.54.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=AChew@nvidia.com \
--cc=jic23@cam.ac.uk \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=rklein@nvidia.com \
/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
all inboxes | Powered by JetHome®