drm: Simplify maximum determination in drm_ioctl()
Subsystems (3)
PATCH 1/1 drm: Simplify maximum determination in drm_ioctl()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/gpu/drm/drm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_ioctl.c +1 -1
@@ -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