From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 58A171A1DF9 for ; Fri, 9 Sep 2016 08:45:24 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id 1so40323369wmz.1 for ; Fri, 09 Sep 2016 08:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=D2GqiOZeYZ2ytZjvcBE1vZmHpL3F7uyxU4a4Pw2mVnY=; b=HVgnTlNrx6jSHXANjaELxZJbzBx2LAl59in9XrtVKaKMFto9MWLt+33XYB82OYJmK6 RpCRoxVpAMMBHT0VSmo+zb+MyHAVG/YtRkubIuCUJOhIdiqiWvly2+iyuJjb8/D5voBc fYQynnlbUrCzkU0ygcnTtqlrxRYeFR/co5QrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=D2GqiOZeYZ2ytZjvcBE1vZmHpL3F7uyxU4a4Pw2mVnY=; b=VnXhCfGS7F9EeLMxJGNU7ISxC3csRpSp6P7TYxDTWMPn1feEwGKRbC/NeVzfEoT/nn npppPkWtOdit4lqWVMFIXmXqU8LVT5XrfluqOrAFUJJyGq6WxaUD3u92T2zi43YzeQxu nZwJ/qChEcfmLDUkzxx6zdgp6Cy8Ep1i2Qg7WV29x3FevVEY0YT6EdZzEKGQESsYZH4p fApOILa3ByLTVr2he3YIHxKuZGPlIs+/M+npLVALTFU1LAZTmjHp0KdMBCB86przIBTc 5x1W1zn8TitrL/daSGTNiiHfvlvfc/JWxwRB4/5eaF7b0M03h7/tuwWp2h1jb+KsUNjk 9S4A== X-Gm-Message-State: AE9vXwNSzNAxRSJy7zqtKPWmEFB3mKiPfytUr5CZEZXgFdJTK7ieWb5FfrxWjBXEVk82sO/I X-Received: by 10.28.154.83 with SMTP id c80mr3857901wme.48.1473435922750; Fri, 09 Sep 2016 08:45:22 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id d8sm3999503wmi.0.2016.09.09.08.45.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 08:45:21 -0700 (PDT) Date: Fri, 9 Sep 2016 16:45:20 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, vishalo@qti.qualcomm.com Message-ID: <20160909154520.GQ16080@bivouac.eciton.net> References: <1473231890-23205-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1473231890-23205-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH] ArmPkg/ArmGicLib: use correct loop variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 15:45:24 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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" > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel 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 > --- > 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 >