public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org, vishalo@qti.qualcomm.com
Subject: Re: [PATCH] ArmPkg/ArmGicLib: use correct loop variable
Date: Fri, 9 Sep 2016 16:45:20 +0100	[thread overview]
Message-ID: <20160909154520.GQ16080@bivouac.eciton.net> (raw)
In-Reply-To: <1473231890-23205-1-git-send-email-ard.biesheuvel@linaro.org>

On Wed, Sep 07, 2016 at 08:04:50AM +0100, Ard Biesheuvel wrote:
> The ArmGicLib API function GicGetCpuRedistributorBase () declares
> GicCpuRedistributorBase to iterate over the redistributors of all
> CPUs, but then inadvertently advances GicRedistributorBase instead.
> 
> Reported-by: "Oliyil Kunnil, Vishal" <vishalo@qti.qualcomm.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Right, so I was contemplating a minor rewrite of the gic driver to
make this sort of thing less likely in the future ... but quickly
realised it wouldn't be a minor one. So:

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  ArmPkg/Drivers/ArmGic/ArmGicLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
> index 73795ed4e56c..e658e9bff5d8 100644
> --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c
> +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
> @@ -76,7 +76,7 @@ GicGetCpuRedistributorBase (
>      }
>  
>      // Move to the next GIC Redistributor frame
> -    GicRedistributorBase += GicRedistributorGranularity;
> +    GicCpuRedistributorBase += GicRedistributorGranularity;
>    }
>  
>    // The Redistributor has not been found for the current CPU
> -- 
> 2.7.4
> 


      parent reply	other threads:[~2016-09-09 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  7:04 [PATCH] ArmPkg/ArmGicLib: use correct loop variable Ard Biesheuvel
2016-09-08  9:39 ` Ard Biesheuvel
2016-09-09 15:45 ` Leif Lindholm [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-list 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=20160909154520.GQ16080@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /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