mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	krzk@kernel.org, jic23@kernel.org
Subject: Re: [PATCH net-next v2 RESEND] net: dsa: Simplify with scoped for each OF child loop
Date: Fri, 30 Aug 2024 16:44:22 +0200	[thread overview]
Message-ID: <a7a985b4-d22f-4918-a837-893c4e7efe05@lunn.ch> (raw)
In-Reply-To: <20240830070037.3529832-1-ruanjinjie@huawei.com>

On Fri, Aug 30, 2024 at 03:00:37PM +0800, Jinjie Ruan wrote:
> Use scoped for_each_available_child_of_node_scoped() when iterating over
> device nodes to make code a bit simpler.
> 
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
> v1 -> v2 RESNED:
> - Remove the goto.
> - next -> net-next
> ---
>  net/dsa/dsa.c | 24 ++++++++++--------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index 668c729946ea..24f566838621 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -1264,9 +1264,8 @@ static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
>  static int dsa_switch_parse_ports_of(struct dsa_switch *ds,
>  				     struct device_node *dn)
>  {
> -	struct device_node *ports, *port;
> +	struct device_node *ports;
>  	struct dsa_port *dp;
> -	int err = 0;

Why?


Patches should be small, simple, obviously correct. This change makes
the patch more complex, harder to review, and less obviously correct.

All these patches have questionable value. Most probably don't fix
anything which is broken. They are using up a lot of
Reviewer/Maintainer time. Don't make it worse by making unneeded
changes.

    Andrew

---
pw-bot: cr

      reply	other threads:[~2024-08-30 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  7:00 Jinjie Ruan
2024-08-30 14:44 ` Andrew Lunn [this message]

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=a7a985b4-d22f-4918-a837-893c4e7efe05@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=ruanjinjie@huawei.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®