* [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
@ 2010-08-06 0:09 Axel Lin
2010-08-09 8:23 ` Liam Girdwood
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-08-06 0:09 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, Marek Szyprowski, Kyungmin Park
We already check count value before calling i2c_smbus_read_byte_data(),
no need to check it again.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
This resend adds regulator: prefix in the subject line.
drivers/regulator/lp3971.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index d4d9822..3bb82b6 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
if (count != 1)
return -EIO;
ret = i2c_smbus_read_byte_data(i2c, reg);
- if (ret < 0 || count != 1)
+ if (ret < 0)
return -EIO;
*dest = ret;
--
1.5.4.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
2010-08-06 0:09 [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() Axel Lin
@ 2010-08-09 8:23 ` Liam Girdwood
2010-08-09 8:59 ` Axel Lin
0 siblings, 1 reply; 3+ messages in thread
From: Liam Girdwood @ 2010-08-09 8:23 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Mark Brown, Marek Szyprowski, Kyungmin Park
On Fri, 2010-08-06 at 08:09 +0800, Axel Lin wrote:
> We already check count value before calling i2c_smbus_read_byte_data(),
> no need to check it again.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> This resend adds regulator: prefix in the subject line.
>
> drivers/regulator/lp3971.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
> index d4d9822..3bb82b6 100644
> --- a/drivers/regulator/lp3971.c
> +++ b/drivers/regulator/lp3971.c
> @@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
> if (count != 1)
> return -EIO;
> ret = i2c_smbus_read_byte_data(i2c, reg);
> - if (ret < 0 || count != 1)
> + if (ret < 0)
> return -EIO;
>
> *dest = ret;
Applied 1/2 only as 2/2 is the same patch.
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
2010-08-09 8:23 ` Liam Girdwood
@ 2010-08-09 8:59 ` Axel Lin
0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2010-08-09 8:59 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Mark Brown, Marek Szyprowski, Kyungmin Park
2010/8/9 Liam Girdwood <lrg@slimlogic.co.uk>:
> On Fri, 2010-08-06 at 08:09 +0800, Axel Lin wrote:
>> We already check count value before calling i2c_smbus_read_byte_data(),
>> no need to check it again.
>>
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>> ---
>> This resend adds regulator: prefix in the subject line.
>>
>> drivers/regulator/lp3971.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
>> index d4d9822..3bb82b6 100644
>> --- a/drivers/regulator/lp3971.c
>> +++ b/drivers/regulator/lp3971.c
>> @@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
>> if (count != 1)
>> return -EIO;
>> ret = i2c_smbus_read_byte_data(i2c, reg);
>> - if (ret < 0 || count != 1)
>> + if (ret < 0)
>> return -EIO;
>>
>> *dest = ret;
>
> Applied 1/2 only as 2/2 is the same patch.
Ooops. My bad. I copied the same patch for patch 1/2 and 1/2.
I'll resend it now.
patch tiltle: [PATCH RESEND again] regulator: lp3971 - remove
unnecessary ret value checking in lp3971_i2c_write()
Regards,
Axel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-09 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 0:09 [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write() Axel Lin
2010-08-09 8:23 ` Liam Girdwood
2010-08-09 8:59 ` Axel Lin
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®