From: Leon Romanovsky <leon@kernel.org>
To: zhang.songyi@zte.com.cn
Cc: yishaih@nvidia.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next] RDMA/mlx4: remove NULL check before dev_{put, hold}
Date: Mon, 28 Nov 2022 14:13:03 +0200 [thread overview]
Message-ID: <Y4Slz8XC5/m+TZef@unreal> (raw)
In-Reply-To: <202211282000293202417@zte.com.cn>
On Mon, Nov 28, 2022 at 08:00:29PM +0800, zhang.songyi@zte.com.cn wrote:
> From: zhang songyi <zhang.songyi@zte.com.cn>
>
> 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@zte.com.cn>
> ---
> drivers/infiniband/hw/mlx4/main.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
The patch needs to be based on this repository:
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/
branch: for-next
Thanks
prev parent reply other threads:[~2022-11-28 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 12:00 [PATCH linux-next] RDMA/mlx4: remove NULL check before dev_{put, hold} zhang.songyi
2022-11-28 12:13 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4Slz8XC5/m+TZef@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yishaih@nvidia.com \
--cc=zhang.songyi@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.