[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9f15203a-349f-48f3-a812-ca3f7ec995ab@lunn.ch>
Date: Sat, 21 Dec 2024 16:06:11 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Ariel Otilibili <ariel.otilibili-anieli@...ecom.fr>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Andrei Botila <andrei.botila@....nxp.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH 2/2] net/phy,neterion: Remove dead values
On Sat, Dec 21, 2024 at 01:39:33PM +0100, Ariel Otilibili wrote:
> Coverity-ID: 1269173, 1575053
> Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@...ecom.fr>
> ---
> drivers/net/ethernet/neterion/s2io.c | 2 --
> drivers/net/phy/nxp-c45-tja11xx-macsec.c | 1 -
Please split this into a patch per driver.
> 2 files changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
> index f8016dc25e0a..4f89f9fd8043 100644
> --- a/drivers/net/ethernet/neterion/s2io.c
> +++ b/drivers/net/ethernet/neterion/s2io.c
> @@ -1969,8 +1969,6 @@ static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)
> MC_ERR_REG_ECC_ALL_DBL | PLL_LOCK_N, flag,
> &bar0->mc_err_mask);
> }
> - nic->general_int_mask = gen_int_mask;
> -
> /* Remove this line when alarm interrupts are enabled */
> nic->general_int_mask = 0;
So this change looks reasonable, but you need to update the comment,
because it is now wrong.
> }
> diff --git a/drivers/net/phy/nxp-c45-tja11xx-macsec.c b/drivers/net/phy/nxp-c45-tja11xx-macsec.c
> index 550ef08970f4..e15ab9ba2f50 100644
> --- a/drivers/net/phy/nxp-c45-tja11xx-macsec.c
> +++ b/drivers/net/phy/nxp-c45-tja11xx-macsec.c
> @@ -818,7 +818,6 @@ static void nxp_c45_rx_sc_update(struct phy_device *phydev,
> u32 cfg = 0;
>
> nxp_c45_macsec_read(phydev, MACSEC_RXSC_CFG, &cfg);
> - cfg &= ~MACSEC_RXSC_CFG_VF_MASK;
> cfg = phy_secy->secy->validate_frames << MACSEC_RXSC_CFG_VF_OFF;
I can see why a static analysis tool would point this out, but you
need to include some justification why your change is correct, and it
is not a bug, maybe cfg should be written back after being masked? Or
the assignment to cfg should actually be an |= not = ?
Andrew
Powered by blists - more mailing lists