From: wangkailong@jari.cn
To: Kai.Makisara@kolumbus.fi, jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] scsi: st: replace ternary operator with max()
Date: Sat, 29 Oct 2022 23:40:58 +0800 (GMT+08:00) [thread overview]
Message-ID: <317f9e05.40.18424674406.Coremail.wangkailong@jari.cn> (raw)
Fix the following coccicheck warning:
drivers/scsi/st.c:1577: WARNING opportunity for max()
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
drivers/scsi/st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index b90a440e135d..5477897aa920 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -1574,8 +1574,7 @@ static int setup_buffering(struct scsi_tape *STp, const char __user *buf,
if (!STbp->do_dio) {
if (STp->block_size)
- bufsize = STp->block_size > st_fixed_buffer_size ?
- STp->block_size : st_fixed_buffer_size;
+ bufsize = max(STp->block_size, st_fixed_buffer_size);
else {
bufsize = count;
/* Make sure that data from previous user is not leaked even if
--
2.25.1
reply other threads:[~2022-10-29 15:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=317f9e05.40.18424674406.Coremail.wangkailong@jari.cn \
--to=wangkailong@jari.cn \
--cc=Kai.Makisara@kolumbus.fi \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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®