All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: pseudoc <atlas.yu@canonical.com>, hkallweit1@gmail.com
Cc: davem@davemloft.net, edumazet@google.com, hau@realtek.com,
	kuba@kernel.org,  netdev@vger.kernel.org, nic_swsd@realtek.com
Subject: Re: [PATCH v2] r8169: skip DASH fw status checks when DASH is disabled
Date: Tue, 26 Mar 2024 10:08:59 +0100	[thread overview]
Message-ID: <bdfd3a4938e2eb37272a9550c869bb557fb70cab.camel@redhat.com> (raw)
In-Reply-To: <20240322082628.46272-1-atlas.yu@canonical.com>

On Fri, 2024-03-22 at 16:26 +0800, pseudoc wrote:
>  drivers/net/ethernet/realtek/r8169_main.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 5c879a5c86d7..a39520a3f41d 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -1317,6 +1317,8 @@ static void rtl8168ep_stop_cmac(struct rtl8169_private *tp)
>  static void rtl8168dp_driver_start(struct rtl8169_private *tp)
>  {
>  	r8168dp_oob_notify(tp, OOB_CMD_DRIVER_START);
> +	if (!tp->dash_enabled)
> +		return;
>  	rtl_loop_wait_high(tp, &rtl_dp_ocp_read_cond, 10000, 10);

You are replicating this chunk several times. It would probably be
better to create a new helper - say rtl_cond_loop_wait_high() or
something similar - and use it where needed.

Cheers,

Paolo


  parent reply	other threads:[~2024-03-26  9:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22  3:46 [PATCH] r8169: skip DASH fw status checks when DASH is disabled pseudoc
2024-03-22  7:01 ` Heiner Kallweit
2024-03-22  8:16   ` Jiri Pirko
2024-03-22  8:26     ` [PATCH v2] " pseudoc
2024-03-22  9:07       ` Jiri Pirko
2024-03-22  9:20         ` Sorry Jiri Pirko pseudoc
2024-03-22  9:10       ` Sorry for the spam, ignore the previous email please pseudoc
2024-03-26  9:08       ` Paolo Abeni [this message]
2024-03-26 10:08         ` DRY rules - extract into rtl_cond_loop_wait_high() Atlas Yu
2024-03-26 20:28           ` Heiner Kallweit
2024-03-27  2:15             ` DRY rules - extract into inline helper functions Atlas Yu
2024-03-27  6:37               ` Heiner Kallweit
2024-03-22  8:33   ` [PATCH] r8169: skip DASH fw status checks when DASH is disabled pseudoc
2024-03-22 10:16     ` Heiner Kallweit
2024-03-22 10:49       ` Heiner Kallweit Atlas Yu
2024-03-22 12:32         ` r8169 DASH-related issue Heiner Kallweit

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=bdfd3a4938e2eb37272a9550c869bb557fb70cab.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=atlas.yu@canonical.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hau@realtek.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.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.