[Intel-wired-lan] [bug report] i40e: Add hardware configuration for software based DCB

Kubalewski, Arkadiusz arkadiusz.kubalewski at intel.com
Tue Feb 16 21:59:30 UTC 2021


>Hello Arkadiusz Kubalewski,
>
>The patch 90bc8e003be2: "i40e: Add hardware configuration for software based DCB" from Oct 19, 2020, leads to the following static checker warning:
>
>	drivers/net/ethernet/intel/i40e/i40e_dcb.c:1645 i40e_dcb_hw_calculate_pool_sizes()
>	error: uninitialized symbol 'mfs_max'.
>
>drivers/net/ethernet/intel/i40e/i40e_dcb.c
>  1628  void i40e_dcb_hw_calculate_pool_sizes(struct i40e_hw *hw,
>  1629                                        u8 num_ports, bool eee_enabled,
>  1630                                        u8 pfc_en, u32 *mfs_tc,
>  1631                                        struct i40e_rx_pb_config *pb_cfg)
>  1632  {
>  1633          u32 pool_size[I40E_MAX_TRAFFIC_CLASS];
>  1634          u32 high_wm[I40E_MAX_TRAFFIC_CLASS];
>  1635          u32 low_wm[I40E_MAX_TRAFFIC_CLASS];
>  1636          u32 total_pool_size = 0;
>  1637          int shared_pool_size; /* Need signed variable */
>  1638          u32 port_pb_size;
>  1639          u32 mfs_max;
>  1640          u32 pcirtt;
>  1641          u8 i;
>  1642  
>  1643          /* Get the MFS(max) for the port */
>  1644          for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
>  1645                  if (mfs_tc[i] > mfs_max)
>                                        ^^^^^^^ Uninitialized.
>
>  1646                          mfs_max = mfs_tc[i];
>  1647          }
>  1648  
>
>regards,
>dan carpenter
>

This is already fixed in:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/drivers/net/ethernet/intel?id=f6724cd497974dcd74ea54bfb478dd47750cd52b

Thank you!


More information about the Intel-wired-lan mailing list