lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d38cac6d-77a7-e411-73b0-78adad9cbd5f@mellanox.com>
Date:   Sun, 20 Aug 2017 13:27:14 +0300
From:   Tariq Toukan <tariqt@...lanox.com>
To:     Stephen Hemminger <stephen@...workplumber.org>,
        mlindner@...vell.com, mst@...hat.com, jasowang@...hat.com
Cc:     netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [PATCH net-next 4/4] mlx4: sizeof style usage

Thanks Stephen.
Sorry for the late reply, I was on vacation.
I know this is already accepted, but still I have one comment.

On 15/08/2017 8:29 PM, Stephen Hemminger wrote:
> 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@...workplumber.org>
> ---
> @@ -726,7 +726,7 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
>   			}
>   			memcpy(&priv->mfunc.master.comm_arm_bit_vector,
>   			       eqe->event.comm_channel_arm.bit_vec,
> -			       sizeof eqe->event.comm_channel_arm.bit_vec);
> +			       sizeof(eqe)->event.comm_channel_arm.bit_vec);

I think the brackets here are misplaced.
Shouldn't they be as follows?

sizeof(eqe->event.comm_channel_arm.bit_vec));

>   			queue_work(priv->mfunc.master.comm_wq,
>   				   &priv->mfunc.master.comm_work);
>   			break;

Thanks,
Tariq

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ