All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nelson, Shannon" <shannon.nelson@amd.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	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>
Cc: 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 09:04:48 -0800	[thread overview]
Message-ID: <dda059ec-ddfb-490e-96f4-08f6cecb7ae0@amd.com> (raw)
In-Reply-To: <cbbc2dbd-2028-4623-8cb3-9d01be341daa@web.de>



On 3/1/2025 2:12 AM, Markus Elfring wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> 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++;
> --
> 2.48.1
> 

Sure, thanks - sln

Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>


  parent reply	other threads:[~2025-03-03 17:04 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
2025-03-03 17:04 ` Nelson, Shannon [this message]
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=dda059ec-ddfb-490e-96f4-08f6cecb7ae0@amd.com \
    --to=shannon.nelson@amd.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.