From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: <shao.mingyin@zte.com.cn>
Cc: <james.bottomley@hansenpartnership.com>,
<martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <yang.yang29@zte.com.cn>,
<xu.xin16@zte.com.cn>, <ye.xingchen@zte.com.cn>,
<li.haoran7@zte.com.cn>
Subject: Re: [PATCH] scsi: scsi_transport_srp: replace min/max nesting with clamp()
Date: Thu, 03 Apr 2025 10:55:34 -0400 [thread overview]
Message-ID: <yq1y0whthuq.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <202503311555115618U8Md16mKpRYOIy2TOmB6@zte.com.cn> (shao mingyin's message of "Mon, 31 Mar 2025 15:55:11 +0800 (CST)")
> This patch replaces min(a, max(b, c)) by clamp(val, lo, hi) in the SRP
> transport layer. The clamp() macro explicitly expresses the intent of
> constraining a value within bounds, improving code readability.
Applied to 6.15/scsi-staging, thanks!
--
Martin K. Petersen
prev parent reply other threads:[~2025-04-03 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 7:55 shao.mingyin
2025-04-01 15:59 ` Bart Van Assche
2025-04-03 14:55 ` Martin K. Petersen [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=yq1y0whthuq.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=li.haoran7@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=shao.mingyin@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
--cc=ye.xingchen@zte.com.cn \
/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®