linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: oe-kbuild-all@lists.linux.dev, linus.walleij@linaro.org,
	brgl@bgdev.pl,  palmer@dabbelt.com, paul.walmsley@sifive.com,
	linux-gpio@vger.kernel.org,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] gpio: sifive: Add missing check for platform_get_irq
Date: Mon, 5 Jun 2023 12:15:53 +0300	[thread overview]
Message-ID: <CAHp75VcO2LRFyZV0nsmMsPRHByStyQ5AzeWSM9S99Qh60=UHvQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VdZct58EiLDL0ebCvcQBVMzuZxJZ8z=bs8D2UDaCsuo9A@mail.gmail.com>

On Mon, Jun 5, 2023 at 12:13 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Mon, Jun 5, 2023 at 4:49 AM Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:
> >
> > Add the missing check for platform_get_irq() and return error code
> > if it fails.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Actually, the change is functional and now the wrong IRQ numbering in
the DT will fail the ->probe(). This needs an additional explanation
in the commit message why it's not a problem.

> > -       for (i = 0; i < ngpio; i++)
> > -               chip->irq_number[i] = platform_get_irq(pdev, i);
> > +       for (i = 0; i < ngpio; i++) {
> > +               ret = platform_get_irq(pdev, i);
> > +               if (ret < 0)
> > +                       return ret;
> > +               chip->irq_number[i] = ret;
> > +       }

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-06-05  9:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05  1:48 [PATCH v3] gpio: sifive: Add missing check for platform_get_irq Jiasheng Jiang
2023-06-05  9:13 ` Andy Shevchenko
2023-06-05  9:15   ` Andy Shevchenko [this message]
2023-06-06  2:20 Jiasheng Jiang
2023-06-06  2:21 Jiasheng Jiang
2023-06-06  3:11 Jiasheng Jiang
2023-06-13 14:22 ` Bartosz Golaszewski

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='CAHp75VcO2LRFyZV0nsmMsPRHByStyQ5AzeWSM9S99Qh60=UHvQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).