[bug report] net/mlx5: Change IRQ storage logic from static to dynamic

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

 



Hello Shay Drory,

The patch fc63dd2a85be: "net/mlx5: Change IRQ storage logic from
static to dynamic" from Feb 23, 2021, leads to the following Smatch
static checker warning:

	drivers/net/ethernet/mellanox/mlx5/core/eq.c:1010 mlx5_comp_irq_get_affinity_mask()
	warn: iterator used outside loop: 'eq'

drivers/net/ethernet/mellanox/mlx5/core/eq.c
    1000 {
    1001         struct mlx5_eq_table *table = dev->priv.eq_table;
    1002         struct mlx5_eq_comp *eq;
    1003         int i = 0;
    1004 
    1005         list_for_each_entry(eq, &table->comp_eqs_list, list) {
                                     ^^^
    1006                 if (i++ == vector)
    1007                         break;
    1008         }
    1009 
--> 1010         return mlx5_irq_get_affinity_mask(eq->core.irq);
                                                   ^^^^

I mean probably this function can never fail to find the appropriate
vector and all but generally we are trying to get rid of this business
of using the iterator outside the loop.  Eventually we'll create a
list_for_each_entry() which will not compile with this kind of code.

    1011 }

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux