[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220111091144.651526-1-deng.changcheng@zte.com.cn>
Date: Tue, 11 Jan 2022 09:11:44 +0000
From: cgel.zte@...il.com
To: kashyap.desai@...adcom.com
Cc: sumit.saxena@...adcom.com, shivasharan.srikanteshwara@...adcom.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com,
megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Changcheng Deng <deng.changcheng@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] scsi: megaraid: use max() to make code cleaner
From: Changcheng Deng <deng.changcheng@....com.cn>
Use max() in order to make code cleaner.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@....com.cn>
---
drivers/scsi/megaraid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index bf987f3a7f3f..17e8a9aeedc4 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -3475,8 +3475,7 @@ mega_m_to_n(void __user *arg, nitioctl_t *uioc)
/*
* Choose the xferlen bigger of input and output data
*/
- uioc->xferlen = uioc_mimd.outlen > uioc_mimd.inlen ?
- uioc_mimd.outlen : uioc_mimd.inlen;
+ uioc->xferlen = max(uioc_mimd.outlen, uioc_mimd.inlen);
if( uioc_mimd.outlen ) uioc->flags = UIOC_RD;
if( uioc_mimd.inlen ) uioc->flags |= UIOC_WR;
--
2.25.1
Powered by blists - more mailing lists