public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Arnd Bergmann <arnd@arndb.de>, Alex Deucher <alexander.deucher@amd.com>
Cc: David Airlie <airlied@linux.ie>, Rex Zhu <Rex.Zhu@amd.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] amdgpu: use NULL instead of 0 for pointer
Date: Wed, 15 Jun 2016 22:32:58 +0200	[thread overview]
Message-ID: <5761BB7A.8080209@amd.com> (raw)
In-Reply-To: <20160615201531.3346929-1-arnd@arndb.de>

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@arndb.de>

Reviewed-by: Christian König <christian.koenig@amd.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;

  reply	other threads:[~2016-06-15 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 20:15 [PATCH] amdgpu: use NULL instead of 0 for pointer Arnd Bergmann
2016-06-15 20:32 ` Christian König [this message]
2016-06-15 21:28   ` Alex Deucher

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=5761BB7A.8080209@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Rex.Zhu@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox