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>
This commit is contained in:
parent
45fad027df
commit
e88ed59432
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue