summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorYan Zhen <yanzhen@vivo.com>2024-09-02 03:33:03 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2024-09-13 02:23:03 +0200
commite88ed594328900959f8aae72c2e6240703a91f33 (patch)
tree728bfeec71d2c2f0e7b1957705ba3b58c027e3a0 /drivers/message
parentscsi: libcxgbi: Remove an unused field in struct cxgbi_device (diff)
downloadlinux-e88ed594328900959f8aae72c2e6240703a91f33.tar.xz
linux-e88ed594328900959f8aae72c2e6240703a91f33.zip
scsi: fusion: mptctl: Use min() macro
Using the real macro is usually more intuitive and readable when the original file is guaranteed to contain the minmax.h header file and compile correctly. Signed-off-by: Yan Zhen <yanzhen@vivo.com> Link: https://lore.kernel.org/r/20240902013303.909316-1-yanzhen@vivo.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 9f3999750c23..087397ccca59 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1609,7 +1609,7 @@ mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg)
maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
- max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents;
+ max = min(maxEvents, MPTCTL_EVENT_LOG_SIZE);
/* If fewer than 1 event is requested, there must have
* been some type of error.