mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
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
@ -1609,7 +1609,7 @@ mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg)
|
|||||||
maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
|
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
|
/* If fewer than 1 event is requested, there must have
|
||||||
* been some type of error.
|
* been some type of error.
|
||||||
|
Loading…
Reference in New Issue
Block a user