From: Yan Zhen <yanzhen@vivo.com>
To: sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com,
suganath-prabu.subramani@broadcom.com
Cc: MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, opensource.kernel@vivo.com,
Yan Zhen <yanzhen@vivo.com>
Subject: [PATCH v2] fusion: mptctl: Use min macro
Date: Mon, 2 Sep 2024 09:33:03 +0800 [thread overview]
Message-ID: <20240902013303.909316-1-yanzhen@vivo.com> (raw)
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>
---
Changes in v2:
- Use min(variable, CONSTANT).
drivers/message/fusion/mptctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 9f3999750..17798edf7 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -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.
--
2.34.1
next reply other threads:[~2024-09-02 1:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 1:33 Yan Zhen [this message]
2024-09-13 0:23 ` Martin K. Petersen
2024-09-19 15:53 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240902013303.909316-1-yanzhen@vivo.com \
--to=yanzhen@vivo.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®