Re: [PATCH v5 08/12] net: stmmac: dwmac-stm32: add management of stm32mp13 for stm32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/7/24 2:59 PM, Christophe ROULLIER wrote:

On 6/7/24 14:48, Marek Vasut wrote:
On 6/7/24 11:57 AM, Christophe Roullier wrote:

[...]

@@ -224,11 +225,18 @@ static int stm32mp1_configure_pmcr(struct plat_stmmacenet_data *plat_dat)
  {
      struct stm32_dwmac *dwmac = plat_dat->bsp_priv;
      u32 reg = dwmac->mode_reg;
-    int val;
+    int val = 0;

Is the initialization really needed ? It seems the switch-case below does always initialize $val .

Yes it is needed otherwise:

drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:239:4: warning: variable 'val' is uninitialized when used here [-Wuninitialized]

val |= SYSCFG_PMCR_ETH_SEL_MII;
                            ^~~
   drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:228:9: note: initialize the variable 'val' to silence this warning
            int val;

OK, thanks for checking.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux