mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Ruibin <11162571@vivo.com>
To: Chris Snook <chris.snook@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v1] drivers:atlx:Use max macro
Date: Thu, 22 Aug 2024 17:40:28 +0800	[thread overview]
Message-ID: <3f994754-2005-420d-9be4-33d7288bc811@vivo.com> (raw)
In-Reply-To: <20240822075004.1367899-1-11162571@vivo.com>

Sorry, please ignore this patch.
Because the corresponding header file is not included, there may be 
compilation errors.

在 2024/8/22 15:50, Yang Ruibin 写道:
> Instead of using the max() implementation of
> the ternary operator, use real macros.
>
> Signed-off-by: Yang Ruibin <11162571@vivo.com>
> ---
>   drivers/net/ethernet/atheros/atlx/atl2.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
> index fa9a4919f..3ff669e72 100644
> --- a/drivers/net/ethernet/atheros/atlx/atl2.c
> +++ b/drivers/net/ethernet/atheros/atlx/atl2.c
> @@ -2971,10 +2971,7 @@ static void atl2_check_options(struct atl2_adapter *adapter)
>   #endif
>   	/* init RXD Flow control value */
>   	adapter->hw.fc_rxd_hi = (adapter->rxd_ring_size / 8) * 7;
> -	adapter->hw.fc_rxd_lo = (ATL2_MIN_RXD_COUNT / 8) >
> -		(adapter->rxd_ring_size / 12) ? (ATL2_MIN_RXD_COUNT / 8) :
> -		(adapter->rxd_ring_size / 12);
> -
> +	adapter->hw.fc_rxd_lo = max(ATL2_MIN_RXD_COUNT / 8, adapter->rxd_ring_size / 12);
>   	/* Interrupt Moderate Timer */
>   	opt.type = range_option;
>   	opt.name = "Interrupt Moderate Timer";

  reply	other threads:[~2024-08-22  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  7:50 Yang Ruibin
2024-08-22  9:40 ` Yang Ruibin [this message]
2024-08-22 12:53   ` Simon Horman

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=3f994754-2005-420d-9be4-33d7288bc811@vivo.com \
    --to=11162571@vivo.com \
    --cc=chris.snook@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=pabeni@redhat.com \
    --cc=sfr@canb.auug.org.au \
    /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®