From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979Ab1JXIvl (ORCPT ); Mon, 24 Oct 2011 04:51:41 -0400 Received: from plane.gmane.org ([80.91.229.3]:38030 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753773Ab1JXIvj (ORCPT ); Mon, 24 Oct 2011 04:51:39 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Message-ID: <4EA52710.2060108@cam.ac.uk> Date: Mon, 24 Oct 2011 09:51:28 +0100 From: Jonathan Cameron User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: Maxin B John CC: Jonathan Cameron , Dan Carpenter , Bryan Freed , public-linux-kernel-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org, Greg Kroah-Hartman , public-linux-iio-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org, Arnd Bergmann , public-devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@plane.gmane.org, Amit Kucheria Subject: Re: [PATCH] staging: iio: light: Fix compiler warning in tsl2563.c References: <20110902094107.GA2846@maxin> <4E60B63C.1030101@cam.ac.uk> In-Reply-To: X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/22/11 06:15, Maxin B John wrote: > Hi, > > On Fri, Sep 2, 2011 at 1:55 PM, Jonathan Cameron 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 >> Acked-by: Jonathan Cameron >> > > 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. Ah, sorry I slipped up here and should have noticed it didn't go directly to Greg. Just to check, with everyone I have author as Dan, reporter as Maxin and have signed off myself (it's going through my tree anyway now). I think from looking back it was Dan's suggestion in response to Maxin's patch. Hence convention would be a sign off from Dan and perhaps an Ack from Maxin? Jonathan >>From c33a01010decf686f5f2984d2ed04c1a70e18bc3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 24 Oct 2011 09:46:32 +0100 Subject: [PATCH] staging:iio:light:tsl2563 missing setting of id in get id function. Signed-off-by: Jonathan Cameron Reported-by: Maxin B. John --- drivers/staging/iio/light/tsl2563.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 5cee5ca..45d04a1 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -227,6 +227,8 @@ static int tsl2563_read_id(struct tsl2563_chip *chip, u8 *id) if (ret < 0) return ret; + *id = ret; + return 0; } -- 1.7.7