From: Tushar Behera <tushar.behera@linaro.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org, patches@linaro.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 05/14] [media] atmel-isi: Update error check for unsigned variables
Date: Mon, 19 Nov 2012 09:25:20 +0530 [thread overview]
Message-ID: <50A9ADA8.60804@linaro.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1211180014330.30062@axis700.grange>
On 11/18/2012 04:46 AM, Guennadi Liakhovetski wrote:
> On Fri, 16 Nov 2012, Tushar Behera wrote:
>
>> Checking '< 0' for unsigned variables always returns false. For error
>> codes, use IS_ERR_VALUE() instead.
>
> Wouldn't just changing "irq" type to "int" also work? I think that would
> be a more straight-forward solution. If however there are strong arguments
> against that, I'm fine with this fix too.
>
By changing irq to signed variable, we would get compilation warning in
subsequent line (request_irq).
> Thanks
> Guennadi
>
>>
>> CC: Mauro Carvalho Chehab <mchehab@infradead.org>
>> CC: linux-media@vger.kernel.org
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>> drivers/media/platform/soc_camera/atmel-isi.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c
>> index 6274a91..5bd65df 100644
>> --- a/drivers/media/platform/soc_camera/atmel-isi.c
>> +++ b/drivers/media/platform/soc_camera/atmel-isi.c
>> @@ -1020,7 +1020,7 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
>> isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
>>
>> irq = platform_get_irq(pdev, 0);
>> - if (irq < 0) {
>> + if (IS_ERR_VALUE(irq)) {
>> ret = irq;
>> goto err_req_irq;
>> }
>> --
>> 1.7.4.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
>
--
Tushar Behera
next prev parent reply other threads:[~2012-11-19 3:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 6:50 [PATCH 00/14] Modify signed comparisons of unsigned variables Tushar Behera
2012-11-16 6:50 ` [PATCH 01/14] [media] ivtv: Remove redundant check on unsigned variable Tushar Behera
2012-11-16 6:50 ` [PATCH 02/14] [media] meye: " Tushar Behera
2012-11-16 6:50 ` [PATCH 03/14] [media] saa7134: " Tushar Behera
2012-11-16 6:50 ` [PATCH 04/14] [media] tlg2300: " Tushar Behera
2012-11-16 6:50 ` [PATCH 05/14] [media] atmel-isi: Update error check for unsigned variables Tushar Behera
2012-11-17 23:16 ` Guennadi Liakhovetski
2012-11-19 3:55 ` Tushar Behera [this message]
2012-11-16 6:50 ` [PATCH 06/14] pinctrl: samsung: " Tushar Behera
2012-11-17 20:31 ` Linus Walleij
2012-11-19 1:29 ` Kukjin Kim
2012-11-16 6:50 ` [PATCH 07/14] pinctrl: SPEAr: " Tushar Behera
2012-11-16 7:05 ` viresh kumar
2012-11-23 7:34 ` Linus Walleij
2012-11-16 6:50 ` [PATCH 08/14] xen: netback: Remove redundant check on unsigned variable Tushar Behera
2012-11-16 9:16 ` Ian Campbell
2012-12-28 5:15 ` Tushar Behera
2012-12-28 10:41 ` [Xen-devel] " Wei Liu
2013-01-02 21:40 ` Konrad Rzeszutek Wilk
2012-11-16 6:50 ` [PATCH 09/14] xen: events: " Tushar Behera
2012-11-16 16:09 ` Konrad Rzeszutek Wilk
2012-11-16 16:09 ` Konrad Rzeszutek Wilk
2012-11-16 16:53 ` Jeremy Fitzhardinge
[not found] ` <b0cd27cf-919f-46b0-afa1-4566f6ea0f61@email.android.com>
2012-11-19 3:52 ` Tushar Behera
2012-11-19 3:52 ` Tushar Behera
2012-11-19 10:31 ` [Xen-devel] " Ian Campbell
2012-11-19 11:00 ` Tushar Behera
2012-11-19 11:00 ` Tushar Behera
2012-11-19 10:31 ` Ian Campbell
2012-11-16 6:50 ` Tushar Behera
2012-11-16 6:50 ` [PATCH 10/14] atm: Removed " Tushar Behera
2012-12-28 5:16 ` Tushar Behera
2012-12-31 15:18 ` chas williams - CONTRACTOR
2012-11-16 6:50 ` [PATCH 11/14] HID: hiddev: Remove " Tushar Behera
2012-11-16 9:27 ` Jiri Kosina
2012-11-16 6:50 ` [PATCH 12/14] gru: " Tushar Behera
2012-11-16 6:50 ` [PATCH 13/14] misc: tsl2550: " Tushar Behera
2012-11-16 8:09 ` Arnd Bergmann
2012-11-16 6:50 ` [PATCH 14/14] wlcore: " Tushar Behera
2012-11-16 18:24 ` Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A9ADA8.60804@linaro.org \
--to=tushar.behera@linaro.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=patches@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.