Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] drm/i915/ddi: use string choice helpers
@ 2024-10-07 17:33 R Sundar
  2024-10-11 16:31 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: R Sundar @ 2024-10-07 17:33 UTC (permalink / raw)
  To: Jani Nikula, Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin,
	David Airlie, Simona Vetter, intel-gfx, intel-xe, dri-devel,
	linux-kernel, imre.deak
  Cc: R Sundar, kernel test robot, Julia Lawall

Use str_enabled_disabled string helpers for better readability and to
fix cocci warning.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202410071601.TFpXoqgW-lkp@intel.com/
Signed-off-by: R Sundar <prosunofficial@gmail.com>
---

Reported in linux repo:

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/display/intel_ddi.c:2225:7-13: opportunity for str_enabled_disabled(enable)

vim +2225 drivers/gpu/drm/i915/display/intel_ddi.c

compile tested only.

 drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index fe1ded6707f9..ff4c633c8546 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2236,7 +2236,7 @@ static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,
 	if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_CONFIGURATION,
 			       enable ? DP_FEC_READY : 0) <= 0)
 		drm_dbg_kms(display->drm, "Failed to set FEC_READY to %s in the sink\n",
-			    enable ? "enabled" : "disabled");
+			    str_enabled_disabled(enable));
 
 	if (enable &&
 	    drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_STATUS,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-22 10:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 17:33 [PATCH linux-next] drm/i915/ddi: use string choice helpers R Sundar
2024-10-11 16:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-11 16:31 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-11 16:32 ` ✓ CI.KUnit: success " Patchwork
2024-10-11 16:44 ` ✓ CI.Build: " Patchwork
2024-10-11 16:46 ` ✓ CI.Hooks: " Patchwork
2024-10-11 16:48 ` ✗ CI.checksparse: warning " Patchwork
2024-10-11 17:12 ` ✓ CI.BAT: success " Patchwork
2024-10-11 21:54 ` ✗ CI.FULL: failure " Patchwork
2024-10-22 10:26 ` [PATCH linux-next] " Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox