From: David Laight <David.Laight@ACULAB.COM>
To: 'Yan Zhen' <yanzhen@vivo.com>,
"sathya.prakash@broadcom.com" <sathya.prakash@broadcom.com>,
"sreekanth.reddy@broadcom.com" <sreekanth.reddy@broadcom.com>,
"suganath-prabu.subramani@broadcom.com"
<suganath-prabu.subramani@broadcom.com>
Cc: "MPT-FusionLinux.pdl@broadcom.com"
<MPT-FusionLinux.pdl@broadcom.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"opensource.kernel@vivo.vom" <opensource.kernel@vivo.vom>
Subject: RE: [PATCH v1] fusion: mptctl: Use min macro
Date: Sat, 31 Aug 2024 12:19:57 +0000 [thread overview]
Message-ID: <27dfad1261db41988d31dbb62af13fc4@AcuMS.aculab.com> (raw)
In-Reply-To: <20240827113922.3898849-1-yanzhen@vivo.com>
From: Yan Zhen
> Sent: 27 August 2024 12:39
>
> 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>
> ---
> 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(MPTCTL_EVENT_LOG_SIZE, maxEvents);
IMHO the arguments should be swapped.
min(variable, CONSTANT);
is better.
David.
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
prev parent reply other threads:[~2024-08-31 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 11:39 Yan Zhen
2024-08-31 12:19 ` David Laight [this message]
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=27dfad1261db41988d31dbb62af13fc4@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=opensource.kernel@vivo.vom \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=yanzhen@vivo.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®