Message ID | 20220111091144.651526-1-deng.changcheng@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | scsi: megaraid: use max() to make code cleaner | expand |
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;