From: Samuel Ortiz <sameo@openedhand.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: pb@handhelds.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] asic3: platform_get_irq() may return signed unnoticed
Date: Thu, 24 Apr 2008 01:16:09 +0200 [thread overview]
Message-ID: <20080423231608.GC18907@caravaggio> (raw)
In-Reply-To: <480FBEFA.3030903@tiscali.nl>
On Thu, Apr 24, 2008 at 12:58:02AM +0200, Roel Kluin wrote:
> Thanks to Joe Perches for catching an error in my previous
Yep, that makes sense now.
> ---
> asic->irq_nr is unsigned. platform_get_irq() may return signed unnoticed
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
> ---
> diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
> index f6f2d96..abd7ffc 100644
> --- a/drivers/mfd/asic3.c
> +++ b/drivers/mfd/asic3.c
> @@ -300,10 +300,13 @@ static int asic3_irq_probe(struct platform_device *pdev)
> struct asic3 *asic = platform_get_drvdata(pdev);
> unsigned long clksel = 0;
> unsigned int irq, irq_base;
> + int ret;
> +
> + ret = platform_get_irq(pdev, 0);
> + if (ret < 0)
> + return ret;
>
> - asic->irq_nr = platform_get_irq(pdev, 0);
> - if (asic->irq_nr < 0)
> - return asic->irq_nr;
> + asic->irq_nr = ret;
>
> /* turn on clock to IRQ controller */
> clksel |= CLOCK_SEL_CX;
>
prev parent reply other threads:[~2008-04-23 23:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 21:32 [PATCH] asic3: platform_get_irq() may return signed unnoticed Roel Kluin
2008-04-23 22:38 ` [PATCH v2] " Roel Kluin
2008-04-23 22:58 ` Roel Kluin
2008-04-23 23:16 ` Samuel Ortiz [this message]
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=20080423231608.GC18907@caravaggio \
--to=sameo@openedhand.com \
--cc=12o3l@tiscali.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=pb@handhelds.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox