Skip to content

Commit e88ed59

Browse files
Yan Zhenmartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 45fad02 commit e88ed59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/message/fusion/mptctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg)
16091609
maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
16101610

16111611

1612-
max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents;
1612+
max = min(maxEvents, MPTCTL_EVENT_LOG_SIZE);
16131613

16141614
/* If fewer than 1 event is requested, there must have
16151615
* been some type of error.

0 commit comments

Comments
 (0)