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: <20150309190057.GB598@Arch.lan>
Date:	Mon, 9 Mar 2015 20:00:57 +0100
From:	tduszyns@...il.com
To:	Daniel Baluta <daniel.baluta@...il.com>
Cc:	Tomasz Duszynski <tduszyns@...il.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
Subject: Re: [PATCH] iio: pressure: add support for MS5611 pressure and
 temperature sensor

On Sun, Mar 08, 2015 at 09:11:07PM +0200, Daniel Baluta wrote:
> Hi Tomasz,
>
> On Sun, Mar 8, 2015 at 7:29 PM, Tomasz Duszynski <tduszyns@...il.com> wrote:
> > Add support for Measurement Specialities MS5611 pressure
> > and temperature sensor.
> >
> > Signed-off-by: Tomasz Duszynski <tduszyns@...il.com>
>
> <snip>
>
> > +++ b/drivers/iio/pressure/ms5611_i2c.c
> > @@ -0,0 +1,131 @@
> > +/*
> > + * MS5611 pressure and temperature sensor driver (I2C bus)
> > + *
> > + * Copyright (c) Tomasz Duszynski <tduszyns@...il.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
>
> If fixed, please specify here the I2C slave address.
OK
>
> > + */
> > +#include <linux/delay.h>
>
> <snip>
>
> > +static int ms5611_read_adc(struct ms5611_state *st, s32 *val)
> > +{
> > +       int ret;
> > +       u8 buf[3];
> > +
> > +       ret = i2c_smbus_read_i2c_block_data(st->client, MS5611_READ_ADC,
> > +                                           3, buf);
> > +       if (ret < 0)
> > +               return ret;
> > +
> > +       *val = (buf[0] << 16) | (buf[1] << 8) | buf[0];
>
> Hmm, buf[2] is not used. Is this intended or the formula
> has buf[2] as the last OR factor?
You're right. Last factor should be buf[2].
>
> thanks,
> Daniel.

Thanks for review!
--
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