]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe: drop redundant conversion to bool
authorRaag Jadav <raag.jadav@intel.com>
Thu, 29 May 2025 16:09:37 +0000 (21:39 +0530)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 5 Jun 2025 16:06:01 +0000 (18:06 +0200)
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>
Link: https://lore.kernel.org/r/20250529160937.490147-1-raag.jadav@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 61761a6b57f2818983466d24aab60baab471ba21)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_device_sysfs.c

index 2e657692e5b5f41543cff08c317172d8424ae3ae..b9440f8c781e3b22ec686f802049646a31b31319 100644 (file)
@@ -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);