Re: [PATCH linux-next] RDMA/mlx4: NULL check before dev_{put, hold} functions is not? needed
From: Leon Romanovsky
Date: Mon Nov 28 2022 - 04:50:54 EST
On Wed, Nov 23, 2022 at 05:08:25PM +0800, zhang.songyi@xxxxxxxxxx wrote:
> From: zhang songyi <zhang.songyi@xxxxxxxxxx>
>
> The call netdev_{put, hold} of dev_{put, hold} will check NULL,
> so there is no need to check before using dev_{put, hold}.
>
> Fix the following coccicheck warnings:
> /drivers/infiniband/hw/mlx4/main.c:1311:2-10: WARNING:
> WARNING NULL check before dev_{put, hold} functions is not needed.
>
> /drivers/infiniband/hw/mlx4/main.c:148:2-10: WARNING:
> WARNING NULL check before dev_{put, hold} functions is not needed.
>
> /drivers/infiniband/hw/mlx4/main.c:1959:3-11: WARNING:
> WARNING NULL check before dev_{put, hold} functions is not needed.
>
> /drivers/infiniband/hw/mlx4/main.c:1962:3-10: WARNING:
> WARNING NULL check before dev_{put, hold} functions is not needed.
>
> Signed-off-by: zhang songyi <zhang.songyi@xxxxxxxxxx>
> ---
> drivers/infiniband/hw/mlx4/main.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
This patch doesn't apply to rdma-next tree.
Please fix commit title "not?" -> "not" and resubmit.
Thanks