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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 6 Mar 2014 22:10:19 +0100
From:	Belisko Marek <marek.belisko@...il.com>
To:	Sebastian Reichel <sre@...ian.org>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Grant Likely <grant.likely@...aro.org>,
	"Dr. H. Nikolaus Schaller" <hns@...delico.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] power: twl4030-madc-battery: Convert to iio consumer.

Hi Sebastian,

On Thu, Mar 6, 2014 at 12:25 AM, Sebastian Reichel <sre@...ian.org> wrote:
> Hi Marek,
>
> I just have one comment:
>
> On Wed, Mar 05, 2014 at 09:52:17PM +0100, Marek Belisko wrote:
>> [...]
>> -static int madc_read(int index)
>> +static int madc_read(struct iio_channel *channel)
>>  {
>> -     struct twl4030_madc_request req;
>> -     int val;
>> -
>> -     req.channels = index;
>> -     req.method = TWL4030_MADC_SW2;
>> -     req.type = TWL4030_MADC_WAIT;
>> -     req.do_avg = 0;
>> -     req.raw = false;
>> -     req.func_cb = NULL;
>> -
>> -     val = twl4030_madc_conversion(&req);
>> -     if (val < 0)
>> -             return val;
>> -
>> -     return req.rbuf[ffs(index) - 1];
>> +     int val, err;
>> +     err = iio_read_channel_processed(channel, &val);
>> +     if (err < 0) {
>> +             pr_info("Error:%d\n", err);
>
> This should be "Error: %d\n" (with a space).
Ups this is remain from debugging messages. I'll remove it and re-post patches.
Thanks.
>
> Apart from that you should use dev_info() or dev_err(), so that the
> message is properly prefixed by the device. Currently there is no
> hint where this error message is generated.
>
>> +             return err;
>> +     }
>> +     return val;
>>  }
>> [...]
>
> After fixing this you can add
>
> Reviewed-By: Sebastian Reichel <sre@...ian.org>
>
> -- Sebastian

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
--
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