Commit e88ed594 authored by Yan Zhen's avatar Yan Zhen Committed by Martin K. Petersen
Browse files

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: default avatarYan Zhen <yanzhen@vivo.com>
Link: https://lore.kernel.org/r/20240902013303.909316-1-yanzhen@vivo.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 45fad027
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.