* [PATCH] drm: Simplify maximum determination in drm_ioctl()
@ 2025-02-28 16:23 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-02-28 16:23 UTC (permalink / raw)
To: dri-devel, David Airlie, Maarten Lankhorst, Maxime Ripard,
Simona Vetter, Thomas Zimmermann
Cc: LKML, kernel-janitors, Qasim Ijaz
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 28 Feb 2025 17:18:07 +0100
Replace nested max() calls by 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/drm_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index f593dc569d31..115a8eb0d8a5 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -856,7 +856,7 @@ long drm_ioctl(struct file *filp,
in_size = 0;
if ((cmd & ioctl->cmd & IOC_OUT) == 0)
out_size = 0;
- ksize = max(max(in_size, out_size), drv_size);
+ ksize = max3(in_size, out_size, drv_size);
drm_dbg_core(dev, "comm=\"%s\" pid=%d, dev=0x%lx, auth=%d, %s\n",
current->comm, task_pid_nr(current),
--
2.48.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-28 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 16:23 [PATCH] drm: Simplify maximum determination in drm_ioctl() Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.