diff mbox series

[09/32] riscv: Fix SiFive gpio probe

Message ID 20201107081420.60325-10-damien.lemoal@wdc.com (mailing list archive)
State New, archived
Headers show
Series RISC-V Kendryte K210 support improvments | expand

Commit Message

Damien Le Moal Nov. 7, 2020, 8:13 a.m. UTC
Fix the check on the number of IRQs to allow up to the maximum (32)
instead of only the maximum minus one.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 drivers/gpio/gpio-sifive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Nov. 10, 2020, 2:39 p.m. UTC | #1
On Sat, Nov 7, 2020 at 9:14 AM Damien Le Moal <damien.lemoal@wdc.com> wrote:

> Fix the check on the number of IRQs to allow up to the maximum (32)
> instead of only the maximum minus one.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>

I just ripped this patch out of your patch set and applied it to
the GPIO tree with some minor change to the subject.

Yours,
Linus Walleij
Damien Le Moal Nov. 11, 2020, 7 a.m. UTC | #2
On Tue, 2020-11-10 at 15:39 +0100, Linus Walleij wrote:
> On Sat, Nov 7, 2020 at 9:14 AM Damien Le Moal <damien.lemoal@wdc.com> wrote:
> 
> > Fix the check on the number of IRQs to allow up to the maximum (32)
> > instead of only the maximum minus one.
> > 
> > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> 
> I just ripped this patch out of your patch set and applied it to
> the GPIO tree with some minor change to the subject.

Thanks for that. I will remove this patch from V2 of the series.

I just realized that I forgot to add a Fixes and CC stable tags. The patch
should have:

Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs")
Cc: stable@vger.kernel.org

Do you want me to resend the patch with the added tags ?

> 
> Yours,
> Linus Walleij
Linus Walleij Nov. 11, 2020, 8:54 a.m. UTC | #3
On Wed, Nov 11, 2020 at 8:00 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:

> I just realized that I forgot to add a Fixes and CC stable tags. The patch
> should have:
>
> Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs")
> Cc: stable@vger.kernel.org
>
> Do you want me to resend the patch with the added tags ?

No I just moved the path to the fixes branch and added the tags.

Yours,
Linus Walleij
Damien Le Moal Nov. 11, 2020, 8:56 a.m. UTC | #4
On 2020/11/11 17:54, Linus Walleij wrote:
> On Wed, Nov 11, 2020 at 8:00 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> 
>> I just realized that I forgot to add a Fixes and CC stable tags. The patch
>> should have:
>>
>> Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs")
>> Cc: stable@vger.kernel.org
>>
>> Do you want me to resend the patch with the added tags ?
> 
> No I just moved the path to the fixes branch and added the tags.
> 
> Yours,
> Linus Walleij
> 

Thanks !
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index c54dd08f2cbf..d5eb9ca11901 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -183,7 +183,7 @@  static int sifive_gpio_probe(struct platform_device *pdev)
 		return PTR_ERR(chip->regs);
 
 	ngpio = of_irq_count(node);
-	if (ngpio >= SIFIVE_GPIO_MAX) {
+	if (ngpio > SIFIVE_GPIO_MAX) {
 		dev_err(dev, "Too many GPIO interrupts (max=%d)\n",
 			SIFIVE_GPIO_MAX);
 		return -ENXIO;