From: Dennis Dalessandro <dennis.dalessandro@intel.com>
To: YueHaibing <yuehaibing@huawei.com>,
mike.marciniszyn@intel.com, dledford@redhat.com, jgg@ziepe.ca,
sadanand.warrier@intel.com, grzegorz.andrejczuk@intel.com
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
dan.carpenter@oracle.com, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] IB/hfi1: Use free_netdev() in hfi1_netdev_free()
Date: Tue, 2 Jun 2020 11:30:13 -0400 [thread overview]
Message-ID: <75257c20-3cf2-7ecc-0d66-e1f4155ba105@intel.com> (raw)
In-Reply-To: <20200602061635.31224-1-yuehaibing@huawei.com>
On 6/2/2020 2:16 AM, YueHaibing wrote:
> dummy_netdev shold be freed by free_netdev() instead of
> kfree(). Also remove unneeded variable 'priv'
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/infiniband/hw/hfi1/netdev_rx.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hfi1/netdev_rx.c b/drivers/infiniband/hw/hfi1/netdev_rx.c
> index 58af6a454761..63688e85e8da 100644
> --- a/drivers/infiniband/hw/hfi1/netdev_rx.c
> +++ b/drivers/infiniband/hw/hfi1/netdev_rx.c
> @@ -371,12 +371,9 @@ int hfi1_netdev_alloc(struct hfi1_devdata *dd)
>
> void hfi1_netdev_free(struct hfi1_devdata *dd)
> {
> - struct hfi1_netdev_priv *priv;
> -
> if (dd->dummy_netdev) {
> - priv = hfi1_netdev_priv(dd->dummy_netdev);
> dd_dev_info(dd, "hfi1 netdev freed\n");
> - kfree(dd->dummy_netdev);
> + free_netdev(dd->dummy_netdev);
> dd->dummy_netdev = NULL;
> }
> }
>
For the kfree->free_netdev, you probably want to add:
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Also can add:
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Thanks
next prev parent reply other threads:[~2020-06-02 15:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200601135644.GD4872@ziepe.ca>
2020-06-02 6:16 ` [PATCH -next] IB/hfi1: Use free_netdev() in hfi1_netdev_free() YueHaibing
2020-06-02 15:30 ` Dennis Dalessandro [this message]
2020-06-02 18:38 ` Dan Carpenter
2020-06-03 0:36 ` Jason Gunthorpe
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=75257c20-3cf2-7ecc-0d66-e1f4155ba105@intel.com \
--to=dennis.dalessandro@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dledford@redhat.com \
--cc=grzegorz.andrejczuk@intel.com \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=sadanand.warrier@intel.com \
--cc=yuehaibing@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox