[PATCH] drm/i915/display: Use str_true_false() helper

long.yunjian at zte.com.cn long.yunjian at zte.com.cn
Fri May 23 06:14:22 UTC 2025


From: Yumeng Fang <fang.yumeng at zte.com.cn>

Remove hard-coded strings by using the str_true_false() helper.

Signed-off-by: Yumeng Fang <fang.yumeng at zte.com.cn>
Signed-off-by: Yunjian Long <long.yunjian at zte.com.cn>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 8d0a1779dd19..0e3e62468902 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -5,6 +5,7 @@

 #include <linux/debugfs.h>
 #include <linux/string_helpers.h>
+#include <linux/string_choices.h>

 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
@@ -972,7 +973,7 @@ static ssize_t i915_dsc_fec_support_write(struct file *file,
 		return ret;

 	drm_dbg(display->drm, "Got %s for DSC Enable\n",
-		(dsc_enable) ? "true" : "false");
+		str_true_false(dsc_enable));
 	intel_dp->force_dsc_en = dsc_enable;

 	*offp += len;
@@ -1183,7 +1184,7 @@ static ssize_t i915_dsc_fractional_bpp_write(struct file *file,
 		return ret;

 	drm_dbg(display->drm, "Got %s for DSC Fractional BPP Enable\n",
-		(dsc_fractional_bpp_enable) ? "true" : "false");
+		str_true_false(dsc_fractional_bpp_enable));
 	intel_dp->force_dsc_fractional_bpp_en = dsc_fractional_bpp_enable;

 	*offp += len;
-- 
2.25.1


More information about the dri-devel mailing list