• Wu Fengguang's avatar
    qed: fix kzalloc-simple.cocci warnings · 561ed233
    Wu Fengguang authored
    drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1230:13-20: WARNING: kzalloc should be used for dcbx_info, instead of kmalloc/memset
    drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1192:13-20: WARNING: kzalloc should be used for dcbx_info, instead of kmalloc/memset
    
     Use kzalloc rather than kmalloc followed by memset with 0
    
     This considers some simple cases that are common and easy to validate
     Note in particular that there are no ...s in the rule, so all of the
     matched code has to be contiguous
    
    Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
    
    CC: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
    Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
    Acked-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    561ed233
qed_dcbx.c 61.1 KB