Thread (9 messages) 9 messages, 4 authors, 2016-09-04

Re: [PATCH] qed: fix kzalloc-simple.cocci warnings

flat view

From: David Miller <davem@davemloft.net>
Date: 2016-09-01 16:48:18
Also in: lkml

From: Yuval Mintz <redacted>
Date: Thu, 1 Sep 2016 07:37:13 +0000
quoted
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: Fengguang Wu <redacted>
This looks fine; But what's the right process here -
Dave - do we need to re-post this with the the right 'destination' in title
[net/net-next]? Or is it good as-is?
In case of latter,
Acked-by: Yuval Mintz <redacted>
I'll apply this as-is, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help