linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: YueHaibing <yuehaibing@huawei.com>,
	mike.marciniszyn@intel.com, dledford@redhat.com, jgg@ziepe.ca,
	sadanand.warrier@intel.com, grzegorz.andrejczuk@intel.com,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] IB/hfi1: Use free_netdev() in hfi1_netdev_free()
Date: Tue, 2 Jun 2020 21:38:56 +0300	[thread overview]
Message-ID: <20200602183856.GY22511@kadam> (raw)
In-Reply-To: <75257c20-3cf2-7ecc-0d66-e1f4155ba105@intel.com>

On Tue, Jun 02, 2020 at 11:30:13AM -0400, Dennis Dalessandro wrote:
> 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>

YueHaibing wasn't on the CC list when I sent forwarded that kbuild bot
email.  Forget about it.  Let's just apply this.

regards,
dan carpenter


  reply	other threads:[~2020-06-02 18:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  7:59 [PATCH -next] IB/hfi1: Remove set but not used variable 'priv' YueHaibing
2020-05-28 11:25 ` Marciniszyn, Mike
2020-06-01 13:45   ` Dennis Dalessandro
2020-06-01 13:56     ` Jason Gunthorpe
2020-06-02  0:59       ` Yuehaibing
2020-06-02  6:16       ` [PATCH -next] IB/hfi1: Use free_netdev() in hfi1_netdev_free() YueHaibing
2020-06-02 15:30         ` Dennis Dalessandro
2020-06-02 18:38           ` Dan Carpenter [this message]
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=20200602183856.GY22511@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=dennis.dalessandro@intel.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;
as well as URLs for NNTP newsgroup(s).