• Jack Morgenstein's avatar
    net/mlx4_en: Cleanups suggested by clang static checker · c2a3d4b4
    Jack Morgenstein authored
    clang flagged the following. All are actually cosmetic cleanups, not really bugs:
    
    drivers/net/ethernet/mellanox/mlx4/en_main.c:233:3: warning: Value stored to 'err' is never read
                    err = -ENOMEM;
                    ^     ~~~~~~~
    drivers/net/ethernet/mellanox/mlx4/en_main.c:293:3: warning: Value stored to 'err' is never read
                    err = -ENOMEM;
    
    drivers/net/ethernet/mellanox/mlx4/en_netdev.c:648:16: warning: Assigned value is garbage or undefined
            entry->reg_id = reg_id;
                          ^ ~~~~~~
    drivers/net/ethernet/mellanox/mlx4/en_netdev.c:659:2: warning: Function call argument is an uninitialized value
            mlx4_en_uc_steer_release(priv, priv->dev->dev_addr, *qpn, reg_id);
    (NOTE: reg_id is only used in the device-managed flow steering path, in which is it always initialized.
     This is not a bug. Cleanup here is therefore cosmetic only).
    
    drivers/net/ethernet/mellanox/mlx4/en_rx.c:122:3: warning: Value stored to 'frag_info' is never read
                    frag_info = &priv->frag_info[i];
                    ^           ~~~~~~~~~~~~~~~~~~~
    Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c2a3d4b4
en_rx.c 31.4 KB