lkml.org 
[lkml]   [2023]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 3/5] net: dsa: microchip: remove ksz_port:on variable
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>

\
 
 \ /
  Last update: 2023-05-26 11:56    [W:0.140 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site