From: Vladimir Oltean <olteanv@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Woojung Huh <woojung.huh@microchip.com>,
Arun Ramadoss <arun.ramadoss@microchip.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
"Russell King (Oracle)" <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v2 3/5] net: dsa: microchip: remove ksz_port:on variable
Date: Fri, 26 May 2023 12:55:37 +0300 [thread overview]
Message-ID: <20230526095537.yaa3dgn56rwioxcv@skbuf> (raw)
In-Reply-To: <20230526073445.668430-4-o.rempel@pengutronix.de> <20230526073445.668430-4-o.rempel@pengutronix.de>
On Fri, May 26, 2023 at 09:34:43AM +0200, Oleksij Rempel wrote:
> The only place where this variable would be set to false is the
> ksz8_config_cpu_port() function. But it is done in a bogus way:
>
> for (i = 0; i < dev->phy_port_cnt; i++) {
> if (i == dev->phy_port_cnt) <--- will be never executed.
> break;
> p->on = 1;
>
> So, we never have a situation where p->on = 0. In this case, we can just
> remove it.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
next prev parent reply other threads:[~2023-05-26 9:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 7:34 [PATCH net-next v2 0/5] Microchip DSA Driver Improvements Oleksij Rempel
2023-05-26 7:34 ` [PATCH net-next v2 1/5] net: dsa: microchip: improving error handling for 8-bit register RMW operations Oleksij Rempel
2023-05-26 7:34 ` [PATCH net-next v2 2/5] net: dsa: microchip: add an enum for regmap widths Oleksij Rempel
2023-05-26 7:34 ` [PATCH net-next v2 3/5] net: dsa: microchip: remove ksz_port:on variable Oleksij Rempel
2023-05-26 9:55 ` Vladimir Oltean [this message]
2023-05-26 7:34 ` [PATCH net-next v2 4/5] net: dsa: microchip: ksz8: Prepare ksz8863_smi for regmap register access validation Oleksij Rempel
2023-05-26 9:54 ` Vladimir Oltean
2023-05-26 7:34 ` [PATCH net-next v2 5/5] net: dsa: microchip: Add register access control for KSZ8873 chip Oleksij Rempel
2023-05-30 9:41 ` [PATCH net-next v2 0/5] Microchip DSA Driver Improvements patchwork-bot+netdevbpf
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=20230526095537.yaa3dgn56rwioxcv@skbuf \
--to=olteanv@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=woojung.huh@microchip.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