[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250315124756851v6UQVu4NRD-RV62eoG0va@zte.com.cn>
Date: Sat, 15 Mar 2025 12:47:56 +0800 (CST)
From: <feng.wei8@....com.cn>
To: <mripard@...nel.org>
Cc: <maarten.lankhorst@...ux.intel.com>, <tzimmermann@...e.de>,
<airlied@...il.com>, <simona@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm: Replace nested max() with single max3()
From: FengWei <feng.wei8@....com.cn>
Use max3() macro instead of nesting max() to simplify the return
statement.
Signed-off-by: FengWei <feng.wei8@....com.cn>
---
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.25.1
Powered by blists - more mailing lists