diff options
author | stephen hemminger | 2017-08-15 19:29:19 +0200 |
---|---|---|
committer | David S. Miller | 2017-08-16 20:01:57 +0200 |
commit | 31975e27a4b5ca3ff1ca42d7d12bc936d3166d4c (patch) | |
tree | 4f2fefae3cefb1d569b3a6ecca857b77a1cf978b /drivers/net/ethernet/mellanox/mlx4/en_tx.c | |
parent | skge: add paren around sizeof arg (diff) | |
download | kernel-qcow2-linux-31975e27a4b5ca3ff1ca42d7d12bc936d3166d4c.tar.gz kernel-qcow2-linux-31975e27a4b5ca3ff1ca42d7d12bc936d3166d4c.tar.xz kernel-qcow2-linux-31975e27a4b5ca3ff1ca42d7d12bc936d3166d4c.zip |
mlx4: sizeof style usage
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 <stephen@networkplumber.org>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_tx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 73faa3d77921..bcf422efd3b8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c @@ -643,7 +643,7 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, void *fragptr) { struct mlx4_wqe_inline_seg *inl = &tx_desc->inl; - int spc = MLX4_INLINE_ALIGN - CTRL_SIZE - sizeof *inl; + int spc = MLX4_INLINE_ALIGN - CTRL_SIZE - sizeof(*inl); unsigned int hlen = skb_headlen(skb); if (skb->len <= spc) { |