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:	Sat, 22 Oct 2011 08:15:27 +0300
From:	Maxin B John <maxin.john@...il.com>
To:	Jonathan Cameron <jic23@....ac.uk>
Cc:	Dan Carpenter <error27@...il.com>,
	Bryan Freed <bfreed@...omium.org>,
	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
	linux-iio@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	devel@...verdev.osuosl.org,
	Amit Kucheria <amit.kucheria@...durent.com>
Subject: Re: [PATCH] staging: iio: light: Fix compiler warning in tsl2563.c

Hi,

On Fri, Sep 2, 2011 at 1:55 PM, Jonathan Cameron <jic23@....ac.uk> wrote:
> On 09/02/11 10:41, Maxin B. John wrote:
>>> Don't overwrite the error code.  For example, the lower layers can
>>> return -EAGAIN and that's more useful than just returning -EIO every
>>> time.
>> Ahh.. Thanks a lot for explaining this.
>>
>>> Your fix works, but it's not very clean.  Just add a "*id = ret;"
>>> line before the "return 0;" and that's it.  (It doesn't make sense
>>> to pass a pointer to "id" and not use it).
>> Dan, yes, I agree with you. This fix is much much better than what I
>> had in my mind.
>>
>>> Yikes - I wonder why my various compilers don't throw that up.
>> I guess, in "iio-blue.git" tree, the 'id = 0' suppresses this warning.
> That'd do it. oops.
>
> Ideally keep the white space but doesn't really matter. Either send on
> to Greg directly or I'll add it to iio-blue and send on with the next fixes
> series - probably this afternoon.
>>
>> Signed-off-by: Maxin B. John <maxin.john@...il.com>
> Acked-by: Jonathan Cameron <jic23@....ac.uk>
>

Sorry for the delay in replying to this mail. I am curious about the
status of this patch. I couldn't locate this patch at  iio-blue.git as
it is not present in kernel.org now
(http://git.kernel.org/?p=linux/kernel/git/jic23/iio-blue.git;a=summary)
Please ignore this mail if you have already added this patch to your tree.

>> ---
>> diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c
>> index f25243b..55012ff 100644
>> --- a/drivers/staging/iio/light/tsl2563.c
>> +++ b/drivers/staging/iio/light/tsl2563.c
>> @@ -226,7 +226,7 @@ static int tsl2563_read_id(struct tsl2563_chip *chip, u8 *id)
>>       ret = i2c_smbus_read_byte_data(client, TSL2563_CMD | TSL2563_REG_ID);
>>       if (ret < 0)
>>               return ret;
>> -
>> +     *id = ret;
>>       return 0;
>>  }
>>
>>
>
>

Warm Regards,
Maxin B. John
--
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