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 +-
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
---
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(-)
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
>