[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210223231120.cwjwihml4zu2qnau@toshiba.co.jp>
Date: Wed, 24 Feb 2021 08:11:20 +0900
From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
To: Wei Yongjun <weiyongjun1@...wei.com>
Cc: Hulk Robot <hulkci@...wei.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>,
Jose Abreu <joabreu@...opsys.com>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] net: stmmac: Fix missing spin_lock_init in
visconti_eth_dwmac_probe()
Hi,
On Tue, Feb 23, 2021 at 10:48:03AM +0000, Wei Yongjun wrote:
> The driver allocates the spinlock but not initialize it.
> Use spin_lock_init() on it to initialize it correctly.
>
> Fixes: b38dd98ff8d0 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
Thanks for your fix.
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
> index b7a0c57dfbfb..d23be45a64e5 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
> @@ -218,6 +218,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
> goto remove_config;
> }
>
> + spin_lock_init(&dwmac->lock);
> dwmac->reg = stmmac_res.addr;
> plat_dat->bsp_priv = dwmac;
> plat_dat->fix_mac_speed = visconti_eth_fix_mac_speed;
>
>
Best regards,
Nobuhiro
Powered by blists - more mailing lists