All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] avr32: off by one in at32_init_pio()
Date: Thu, 14 Jul 2016 11:08:41 +0000	[thread overview]
Message-ID: <20160714110841.GA13155@samfundet.no> (raw)
In-Reply-To: <20160713100855.GE29468@mwanda>

Around Wed 13 Jul 2016 13:08:55 +0300 or thereabout, Dan Carpenter wrote:
> The pio_dev[] array has MAX_NR_PIO_DEVICES elements so the > should be
>>=.

So it should, no off by one error in the kernel anyway, since at32ap700x only
probes 5 PIO instances.

> Fixes: 5f97f7f9400d ('[PATCH] avr32 architecture')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>

I will add this to my linux-next branch for the next merge window.

> diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
> index 83c2a00..13d3fc4 100644
> --- a/arch/avr32/mach-at32ap/pio.c
> +++ b/arch/avr32/mach-at32ap/pio.c
> @@ -435,7 +435,7 @@ void __init at32_init_pio(struct platform_device *pdev)
>  	struct resource *regs;
>  	struct pio_device *pio;
>  
> -	if (pdev->id > MAX_NR_PIO_DEVICES) {
> +	if (pdev->id >= MAX_NR_PIO_DEVICES) {
>  		dev_err(&pdev->dev, "only %d PIO devices supported\n",
>  			MAX_NR_PIO_DEVICES);
>  		return;
> 
-- 
mvh
Hans-Christian Noren Egtvedt

WARNING: multiple messages have this Message-ID (diff)
From: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] avr32: off by one in at32_init_pio()
Date: Thu, 14 Jul 2016 13:08:41 +0200	[thread overview]
Message-ID: <20160714110841.GA13155@samfundet.no> (raw)
In-Reply-To: <20160713100855.GE29468@mwanda>

Around Wed 13 Jul 2016 13:08:55 +0300 or thereabout, Dan Carpenter wrote:
> The pio_dev[] array has MAX_NR_PIO_DEVICES elements so the > should be
>>=.

So it should, no off by one error in the kernel anyway, since at32ap700x only
probes 5 PIO instances.

> Fixes: 5f97f7f9400d ('[PATCH] avr32 architecture')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>

I will add this to my linux-next branch for the next merge window.

> diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
> index 83c2a00..13d3fc4 100644
> --- a/arch/avr32/mach-at32ap/pio.c
> +++ b/arch/avr32/mach-at32ap/pio.c
> @@ -435,7 +435,7 @@ void __init at32_init_pio(struct platform_device *pdev)
>  	struct resource *regs;
>  	struct pio_device *pio;
>  
> -	if (pdev->id > MAX_NR_PIO_DEVICES) {
> +	if (pdev->id >= MAX_NR_PIO_DEVICES) {
>  		dev_err(&pdev->dev, "only %d PIO devices supported\n",
>  			MAX_NR_PIO_DEVICES);
>  		return;
> 
-- 
mvh
Hans-Christian Noren Egtvedt

  reply	other threads:[~2016-07-14 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:08 [patch] avr32: off by one in at32_init_pio() Dan Carpenter
2016-07-13 10:08 ` Dan Carpenter
2016-07-14 11:08 ` Hans-Christian Noren Egtvedt [this message]
2016-07-14 11:08   ` Hans-Christian Noren Egtvedt

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=20160714110841.GA13155@samfundet.no \
    --to=egtvedt@samfundet.no \
    --cc=dan.carpenter@oracle.com \
    --cc=hskinnemoen@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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.