From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
Brett Creeley <brett.creeley@amd.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shannon Nelson <shannon.nelson@amd.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Qasim Ijaz <qasdev00@gmail.com>,
Natalie Vock <natalie.vock@gmx.de>
Subject: Re: [PATCH net-next] ionic: Simplify maximum determination in ionic_adminq_napi()
Date: Mon, 3 Mar 2025 08:15:00 +0100 [thread overview]
Message-ID: <Z8VW9IXnN+M8KVtZ@mev-dev.igk.intel.com> (raw)
In-Reply-To: <cbbc2dbd-2028-4623-8cb3-9d01be341daa@web.de>
On Sat, Mar 01, 2025 at 11:12:31AM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 1 Mar 2025 11:01:28 +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>
> ---
> drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index 7707a9e53c43..85c4b02bd054 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -1242,7 +1242,7 @@ static int ionic_adminq_napi(struct napi_struct *napi, int budget)
> if (lif->hwstamp_txq)
> tx_work = ionic_tx_cq_service(&lif->hwstamp_txq->cq, budget, !!budget);
>
> - work_done = max(max(n_work, a_work), max(rx_work, tx_work));
> + work_done = max3(n_work, a_work, max(rx_work, tx_work));
> if (work_done < budget && napi_complete_done(napi, work_done)) {
> flags |= IONIC_INTR_CRED_UNMASK;
> intr->rearm_count++;
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> --
> 2.48.1
next prev parent reply other threads:[~2025-03-03 7:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-01 10:12 [PATCH net-next] ionic: Simplify maximum determination in ionic_adminq_napi() Markus Elfring
2025-03-03 7:15 ` Michal Swiatkowski [this message]
2025-03-03 17:04 ` Nelson, Shannon
2025-03-05 1:06 ` Jakub Kicinski
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=Z8VW9IXnN+M8KVtZ@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=Markus.Elfring@web.de \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=natalie.vock@gmx.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qasdev00@gmail.com \
--cc=shannon.nelson@amd.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;
as well as URLs for NNTP newsgroup(s).