fusion: mptctl: Use min macro
Subsystems (2)
PATCH v2 1/1 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]>
---
Changes in v2:
- Use min(variable, CONSTANT).
drivers/message/fusion/mptctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/message/fusion/mptctl.c +1 -1
@@ -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.
Signature · 1 line
2.34.1
Martin K. Petersen
AppliedYan,
Quoted 3 lines
Using the real macro is usually more intuitive and readable, When the original file is guaranteed to contain the
minmax.hheader file and compile correctly.
Applied to 6.12/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 5 lines · Yan Zhen
Using the real macro is usually more intuitive and readable, When the original file is guaranteed to contain the
minmax.hheader file and compile correctly.
Applied to 6.12/scsi-queue, thanks!
[1/1] fusion: mptctl: Use min macro
https://git.kernel.org/mkp/scsi/c/e88ed5943289
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering