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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5761BB7A.8080209@amd.com>
Date:	Wed, 15 Jun 2016 22:32:58 +0200
From:	Christian König <christian.koenig@....com>
To:	Arnd Bergmann <arnd@...db.de>,
	Alex Deucher <alexander.deucher@....com>
CC:	David Airlie <airlied@...ux.ie>, Rex Zhu <Rex.Zhu@....com>,
	<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] amdgpu: use NULL instead of 0 for pointer

Am 15.06.2016 um 22:15 schrieb Arnd Bergmann:
> In the AMD powerplay driver, a pointer is checked for validity by
> comparing against an integer '0', which causes a harmless warning
> when building with "make W=1":
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/processpptables.c:1502:16: error: ordered comparison of pointer with integer zero [-Werror=extra]
>
> This changes the code to the more conventional "if (pointer)" check.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Reviewed-by: Christian König <christian.koenig@....com>.

> ---
>   drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> index 2f1a14fe05b1..b64f42d2c3ae 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
> @@ -1499,7 +1499,7 @@ int get_number_of_vce_state_table_entries(
>   	const ATOM_PPLIB_VCE_State_Table *vce_table =
>   				    get_vce_state_table(hwmgr, table);
>   
> -	if (vce_table > 0)
> +	if (vce_table)
>   		return vce_table->numEntries;
>   
>   	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ