• M
    net: mvpp2: Don't use dynamic allocs for local variables · 0c6d9b44
    Maxime Chevallier 提交于
    Some helper functions that search for given entries in the TCAM filter
    on PPv2 controller make use of dynamically alloced temporary variables,
    allocated with GFP_KERNEL. These functions can be called in atomic
    context, and dynamic alloc is not really needed in these cases anyways.
    
    This commit gets rid of dynamic allocs and use stack allocation in the
    following functions, and where they're used :
     - mvpp2_prs_flow_find
     - mvpp2_prs_vlan_find
     - mvpp2_prs_double_vlan_find
     - mvpp2_prs_mac_da_range_find
    
    For all these functions, instead of returning an temporary object
    representing the TCAM entry, we simply return the TCAM id that matches
    the requested entry.
    Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    0c6d9b44
mvpp2.c 248.9 KB