mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jason Yan <yanaijie@huawei.com>,
	alexander.deucher@amd.com, David1.Zhou@amd.com, airlied@linux.ie,
	daniel@ffwll.ch, sumit.semwal@linaro.org,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
Date: Mon, 27 Apr 2020 10:02:21 +0200	[thread overview]
Message-ID: <69374bbb-7e17-8b3a-8a24-591de2c55ee3@amd.com> (raw)
In-Reply-To: <20200427063655.21169-1-yanaijie@huawei.com>

Am 27.04.20 um 08:36 schrieb Jason Yan:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3d601d5dd5af..ad94de3632d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>   	INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
>   
>   	adev->gfx.gfx_off_req_count = 1;
> -	adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> +	adev->pm.ac_power = power_supply_is_system_supplied() > 0;
>   
>   	/* Registers mapping */
>   	/* TODO: block userspace mapping of io register */


  reply	other threads:[~2020-04-27  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  6:36 Jason Yan
2020-04-27  8:02 ` Christian König [this message]
2020-04-27 19:30   ` 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=69374bbb-7e17-8b3a-8a24-591de2c55ee3@amd.com \
    --to=christian.koenig@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=yanaijie@huawei.com \
    /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

all inboxes | Powered by JetHome®