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

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>
---
 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


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

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 16:09 Raag Jadav [this message]
2025-05-29 16:16 ` ✓ CI.Patch_applied: success for drm/xe: drop redundant conversion to bool Patchwork
2025-05-29 16:16 ` ✓ CI.checkpatch: " Patchwork
2025-05-29 16:18 ` ✓ CI.KUnit: " Patchwork
2025-05-29 16:18 ` [PATCH v1] " Rodrigo Vivi
2025-05-29 16:28 ` ✓ CI.Build: success for " 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=20250529160937.490147-1-raag.jadav@intel.com \
    --to=raag.jadav@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lkp@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@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