From: Markus Elfring <Markus.Elfring@web.de>
To: Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Cc: Chandan Babu R <chandanbabu@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Qasim Ijaz <qasdev00@gmail.com>,
Natalie Vock <natalie.vock@gmx.de>
Subject: Re: [PATCH] xfs: Simplify maximum determination in xrep_calc_ag_resblks()
Date: Wed, 30 Apr 2025 10:34:59 +0200 [thread overview]
Message-ID: <f35da51a-d45a-4be2-81c3-4da25b65c928@web.de> (raw)
In-Reply-To: <wv2ygjx2ste2hfusgp7apsp76wufeegrd26kdkzqmergwhwfqd@spof2npy32p5>
…
>> +++ 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));
>
> I have nothing against the patch itself, but honestly I don't see how it
> improves anything. It boils down to nesting comparison instructions too, and
> doesn't make the code more clear IMHO.
> So, unless somebody else has a stronger reason to have this change, NAK from my side.
Would you be looking for a wrapper call variant like max4()?
Regards,
Markus
next prev parent reply other threads:[~2025-04-30 8:40 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
2025-04-30 8:27 ` Carlos Maiolino
2025-04-30 8:34 ` Markus Elfring [this message]
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=f35da51a-d45a-4be2-81c3-4da25b65c928@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®