lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 3 Aug 2015 15:48:33 -0400
From:	Alex Deucher <alexdeucher@...il.com>
To:	Nicolas Iooss <nicolas.iooss_linux@....org>
Cc:	David Airlie <airlied@...ux.ie>,
	Alex Deucher <alexander.deucher@....com>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: increment queue when iterating on this variable.

On Sat, Aug 1, 2015 at 9:55 AM, Nicolas Iooss
<nicolas.iooss_linux@....org> wrote:
> gfx_v7_0_print_status contains a for loop on variable queue which does
> not update this variable between each iteration.  This is bug is
> reported by clang while building allmodconfig LLVMLinux on x86_64:
>
>     drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5126:19: error: variable
>     'queue' used in loop condition not modified in loop body
>     [-Werror,-Wloop-analysis]
>                 for (queue = 0; queue < 8; i++) {
>                                 ^~~~~
>
> Fix this by incrementing variable queue instead of i in this loop.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@....org>

Applied.  thanks!

Alex


> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 2db6ab0a543d..5c03420ca5dc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -5122,7 +5122,7 @@ static void gfx_v7_0_print_status(void *handle)
>                 dev_info(adev->dev, "  CP_HPD_EOP_CONTROL=0x%08X\n",
>                          RREG32(mmCP_HPD_EOP_CONTROL));
>
> -               for (queue = 0; queue < 8; i++) {
> +               for (queue = 0; queue < 8; queue++) {
>                         cik_srbm_select(adev, me, pipe, queue, 0);
>                         dev_info(adev->dev, "  queue: %d\n", queue);
>                         dev_info(adev->dev, "  CP_PQ_WPTR_POLL_CNTL=0x%08X\n",
> --
> 2.5.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ