[PATCH net-next 4/4] mlx4: sizeof style usage

2017-08-15 Thread Stephen Hemminger
The kernel coding style is to treat sizeof as a function (ie. with parenthesis) not as an operator. Also use kcalloc and kmalloc_array Signed-off-by: Stephen Hemminger --- drivers/net/ethernet/mellanox/mlx4/alloc.c | 2 +-

[PATCH net-next 3/4] skge: add paren around sizeof arg

2017-08-15 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- drivers/net/ethernet/marvell/skge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 5d7d94de4e00..8a835e82256a 100644 ---

[PATCH net-next 1/4] tun/tap: use paren's with sizeof

2017-08-15 Thread Stephen Hemminger
Although sizeof is an operator in C. The kernel coding style convention is to always use it like a function and add parenthesis. Signed-off-by: Stephen Hemminger --- drivers/net/tap.c | 2 +- drivers/net/tun.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH net-next 0/4] various sizeof cleanups

2017-08-15 Thread Michael S. Tsirkin
On Tue, Aug 15, 2017 at 10:29:15AM -0700, Stephen Hemminger wrote: > Noticed some places that were using sizeof as an operator. > This is legal C but is not the convention used in the kernel. > > Stephen Hemminger (4): > tun/tap: use paren's with sizeof > virtio: put paren around sizeof >