[net-next v9 5/6] net: stmmac: Add glue layer for StarFive JH7110 SoC

Jakub Kicinski kuba at kernel.org
Tue Mar 28 19:17:16 PDT 2023


On Tue, 28 Mar 2023 14:20:08 +0800 Samin Guo wrote:
> This adds StarFive dwmac driver support on the StarFive JH7110 SoC.
> 
> Tested-by: Tommaso Merciai <tomm.merciai at gmail.com>
> Co-developed-by: Emil Renner Berthing <kernel at esmil.dk>
> Signed-off-by: Emil Renner Berthing <kernel at esmil.dk>
> Signed-off-by: Samin Guo <samin.guo at starfivetech.com>

Excellent, now it applies cleanly :)

Our clang build with W=1 complains that:

drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:37:2: warning: variable 'rate' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
        default:
        ^~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:42:36: note: uninitialized use occurs here
        err = clk_set_rate(dwmac->clk_tx, rate);
                                          ^~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:24:20: note: initialize the variable 'rate' to silence this warning
        unsigned long rate;
                          ^
                           = 0


not sure how you prefer to fix this. Maybe return early?



More information about the linux-riscv mailing list