From: Markus Elfring <Markus.Elfring@web.de>
To: linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
Chandan Babu R <chandanbabu@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Qasim Ijaz <qasdev00@gmail.com>,
Natalie Vock <natalie.vock@gmx.de>
Subject: [PATCH] xfs: Simplify maximum determination in xrep_calc_ag_resblks()
Date: Sat, 1 Mar 2025 11:30:52 +0100 [thread overview]
Message-ID: <2b6b0608-136b-4328-a42f-eb5ca77688a0@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 1 Mar 2025 11:24:52 +0100
Reduce nested max() calls by a single max3() call in this
function implementation.
The source code was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/xfs/scrub/repair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 3b5288d3ef4e..6b23a3943907 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -382,7 +382,7 @@ xrep_calc_ag_resblks(
refcbt_sz);
xfs_perag_put(pag);
- return max(max(bnobt_sz, inobt_sz), max(rmapbt_sz, refcbt_sz));
+ return max3(bnobt_sz, inobt_sz, max(rmapbt_sz, refcbt_sz));
}
#ifdef CONFIG_XFS_RT
--
2.48.1
next reply other threads:[~2025-03-01 10:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <oL08RYG1VC2E9huS2ixv9tI5xAJxx88B60-95yE-8PIDHIdkDkYdqKhA9T_qDEoFzv4qGpCn0M0WtI3JV3f5EA==@protonmail.internalid>
2025-03-01 10:30 ` Markus Elfring [this message]
2025-04-30 8:27 ` Carlos Maiolino
2025-04-30 8:34 ` Markus Elfring
2025-04-30 9:34 ` Carlos Maiolino
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=2b6b0608-136b-4328-a42f-eb5ca77688a0@web.de \
--to=markus.elfring@web.de \
--cc=cem@kernel.org \
--cc=chandanbabu@kernel.org \
--cc=djwong@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=natalie.vock@gmx.de \
--cc=qasdev00@gmail.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®