All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: "Marciniszyn, Mike" <mike.marciniszyn@intel.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Doug Ledford <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"Dan Carpenter (dan.carpenter@oracle.com)"
	<dan.carpenter@oracle.com>
Subject: Re: [PATCH -next] IB/hfi1: Remove set but not used variable 'priv'
Date: Mon, 01 Jun 2020 13:56:45 +0000	[thread overview]
Message-ID: <20200601135644.GD4872@ziepe.ca> (raw)
In-Reply-To: <86634519-3dd8-0c6a-a8d2-19f4b986fd3d@intel.com>

On Mon, Jun 01, 2020 at 09:45:52AM -0400, Dennis Dalessandro wrote:
> On 5/28/2020 7:25 AM, Marciniszyn, Mike wrote:
> > > From: YueHaibing <yuehaibing@huawei.com>
> > > Sent: Thursday, May 28, 2020 4:00 AM
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > >   drivers/infiniband/hw/hfi1/netdev_rx.c | 11 +++--------
> > >   1 file changed, 3 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > b/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > index 58af6a454761..bd6546b52159 100644
> > > +++ b/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > @@ -371,14 +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);
> > > -dd->dummy_netdev = NULL;
> > > -}
> > > +dd_dev_info(dd, "hfi1 netdev freed\n");
> > > +kfree(dd->dummy_netdev);
> > 
> > Dan Carpenter has reported kfree() should be free_netdev()...
> > 
> > Mike
> > 
> 
> I'm OK with this patch going in and then adding a separate one to fix the
> kfree. Or this one can be touched up to include that as well.

Please resend it with both things fixed

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: "Marciniszyn, Mike" <mike.marciniszyn@intel.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Doug Ledford <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"Dan Carpenter (dan.carpenter@oracle.com)"
	<dan.carpenter@oracle.com>
Subject: Re: [PATCH -next] IB/hfi1: Remove set but not used variable 'priv'
Date: Mon, 1 Jun 2020 10:56:45 -0300	[thread overview]
Message-ID: <20200601135644.GD4872@ziepe.ca> (raw)
In-Reply-To: <86634519-3dd8-0c6a-a8d2-19f4b986fd3d@intel.com>

On Mon, Jun 01, 2020 at 09:45:52AM -0400, Dennis Dalessandro wrote:
> On 5/28/2020 7:25 AM, Marciniszyn, Mike wrote:
> > > From: YueHaibing <yuehaibing@huawei.com>
> > > Sent: Thursday, May 28, 2020 4:00 AM
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > >   drivers/infiniband/hw/hfi1/netdev_rx.c | 11 +++--------
> > >   1 file changed, 3 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > b/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > index 58af6a454761..bd6546b52159 100644
> > > +++ b/drivers/infiniband/hw/hfi1/netdev_rx.c
> > > @@ -371,14 +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);
> > > -dd->dummy_netdev = NULL;
> > > -}
> > > +dd_dev_info(dd, "hfi1 netdev freed\n");
> > > +kfree(dd->dummy_netdev);
> > 
> > Dan Carpenter has reported kfree() should be free_netdev()...
> > 
> > Mike
> > 
> 
> I'm OK with this patch going in and then adding a separate one to fix the
> kfree. Or this one can be touched up to include that as well.

Please resend it with both things fixed

Jason

  reply	other threads:[~2020-06-01 13:56 UTC|newest]

Thread overview: 17+ 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  7:59 ` YueHaibing
2020-05-28 11:25 ` Marciniszyn, Mike
2020-06-01 13:45   ` Dennis Dalessandro
2020-06-01 13:45     ` Dennis Dalessandro
2020-06-01 13:56     ` Jason Gunthorpe [this message]
2020-06-01 13:56       ` Jason Gunthorpe
2020-06-02  0:59       ` Yuehaibing
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  6:16         ` YueHaibing
2020-06-02 15:30         ` Dennis Dalessandro
2020-06-02 15:30           ` Dennis Dalessandro
2020-06-02 18:38           ` Dan Carpenter
2020-06-02 18:38             ` Dan Carpenter
2020-06-03  0:36         ` Jason Gunthorpe
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=20200601135644.GD4872@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dan.carpenter@oracle.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@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 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.