Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: <lucas.demarchi@intel.com>, <riana.tauro@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v1] drm/xe: drop redundant conversion to bool
Date: Thu, 29 May 2025 12:18:33 -0400	[thread overview]
Message-ID: <aDiI2QhloEEaMnMb@intel.com> (raw)
In-Reply-To: <20250529160937.490147-1-raag.jadav@intel.com>

On Thu, May 29, 2025 at 09:39:37PM +0530, Raag Jadav wrote:
> The result of integer comparison already evaluates to bool. No need for
> explicit conversion.
> 
> No functional impact.
> 
> Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505292205.MoljmkjQ-lkp@intel.com/
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
> index 2e657692e5b5..b9440f8c781e 100644
> --- a/drivers/gpu/drm/xe/xe_device_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
> @@ -115,7 +115,7 @@ auto_link_downgrade_capable_show(struct device *dev, struct device_attribute *at
>  	xe_pm_runtime_put(xe);
>  
>  	cap = REG_FIELD_GET(LINK_DOWNGRADE, val);
> -	return sysfs_emit(buf, "%u\n", cap == DOWNGRADE_CAPABLE ? true : false);
> +	return sysfs_emit(buf, "%u\n", cap == DOWNGRADE_CAPABLE);
>  }
>  static DEVICE_ATTR_ADMIN_RO(auto_link_downgrade_capable);
>  
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2025-05-29 16:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 16:09 [PATCH v1] drm/xe: drop redundant conversion to bool Raag Jadav
2025-05-29 16:16 ` ✓ CI.Patch_applied: success for " Patchwork
2025-05-29 16:16 ` ✓ CI.checkpatch: " Patchwork
2025-05-29 16:18 ` ✓ CI.KUnit: " Patchwork
2025-05-29 16:18 ` Rodrigo Vivi [this message]
2025-05-29 16:28 ` ✓ CI.Build: " Patchwork
2025-05-29 16:31 ` ✓ CI.Hooks: " Patchwork
2025-05-29 16:32 ` ✓ CI.checksparse: " Patchwork
2025-05-30  2:18 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-30  7:02 ` ✓ CI.Patch_applied: success for drm/xe: drop redundant conversion to bool (rev2) Patchwork
2025-05-30  7:02 ` ✓ CI.checkpatch: " Patchwork
2025-05-30  7:03 ` ✓ CI.KUnit: " Patchwork
2025-05-30  7:14 ` ✓ CI.Build: " Patchwork
2025-05-30  7:16 ` ✓ CI.Hooks: " Patchwork
2025-05-30  7:18 ` ✓ CI.checksparse: " Patchwork
2025-05-30  7:53 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-31  8:37 ` ✗ Xe.CI.Full: failure " Patchwork

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=aDiI2QhloEEaMnMb@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lkp@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.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