* [PATCH] drm/sun4i: dsi: Simplify maximum determination in sun6i_dsi_setup_timings()
@ 2025-02-28 17:33 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-02-28 17:33 UTC (permalink / raw)
To: dri-devel, linux-sunxi, linux-arm-kernel, Chen-Yu Tsai,
David Airlie, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Samuel Holland, Simona Vetter, Thomas Zimmermann
Cc: LKML, kernel-janitors, Qasim Ijaz
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 28 Feb 2025 18:25:31 +0100
Reduce nested max() calls by a single max3() call in this
function implementation.
This issue was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index c35b70d83e53..7765a29e2ef6 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -597,7 +597,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
}
/* How many bytes do we need to send all payloads? */
- bytes = max_t(size_t, max(max(hfp, hblk), max(hsa, hbp)), vblk);
+ bytes = max_t(size_t, max3(hfp, hblk, max(hsa, hbp)), vblk);
buffer = kmalloc(bytes, GFP_KERNEL);
if (WARN_ON(!buffer))
return;
--
2.48.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-28 17:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-28 17:33 [PATCH] drm/sun4i: dsi: Simplify maximum determination in sun6i_dsi_setup_timings() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®