Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yan Zhen and committed by
Martin K. Petersen
e88ed594 45fad027

+1 -1
+1 -1
drivers/message/fusion/mptctl.c
··· 1609 1609 maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS); 1610 1610 1611 1611 1612 - max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents; 1612 + max = min(maxEvents, MPTCTL_EVENT_LOG_SIZE); 1613 1613 1614 1614 /* If fewer than 1 event is requested, there must have 1615 1615 * been some type of error.