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: <1286314903.2156.54.camel@Joe-Laptop>
Date:	Tue, 05 Oct 2010 14:41:43 -0700
From:	Joe Perches <joe@...ches.com>
To:	Rhyland Klein <rklein@...dia.com>
Cc:	"jic23@....ac.uk" <jic23@....ac.uk>,
	Andrew Chew <AChew@...dia.com>,
	"olof@...om.net" <olof@...om.net>,
	"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	Laxman Dewangan <ldewangan@...dia.com>
Subject: RE: [PATCH v2] iio: light: Adding driver for ISL29018 ALS

On Tue, 2010-10-05 at 14:36 -0700, Rhyland Klein wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@...ches.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

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