All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH v2 2/8] nvmet-rdma: wrap raw kref_get/put() with corresponding helpers
Date: Tue, 5 Jun 2018 06:43:47 +0200	[thread overview]
Message-ID: <20180605044347.GA29420@lst.de> (raw)
In-Reply-To: <20180604214916.GC24926@ziepe.ca>

On Mon, Jun 04, 2018@03:49:16PM -0600, Jason Gunthorpe wrote:
> > +{
> > +	return kref_put(&dev->ref, nvmet_rdma_free_device);
> > +}
> > +
> > +static int nvmet_rdma_dev_get(struct nvmet_rdma_device *dev)
> > +{
> > +	return kref_get_unless_zero(&dev->ref);
> > +}
> 
> Don't wrap get_unless_zero with something called get..

Agreed.  And I hate all these wrappers.  Either we use kref_*
or we use wrappers and plain refcount_* ops, not both.

  reply	other threads:[~2018-06-05  4:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 12:29 [PATCH v2 0/8] use ib_client API to wrap ib_device Roman Pen
2018-06-04 12:29 ` Roman Pen
2018-06-04 12:29 ` [PATCH v2 1/8] nvme-rdma: " Roman Pen
2018-06-04 21:38   ` Jason Gunthorpe
2018-06-05  8:24     ` Max Gurtovoy
2018-06-05 10:18       ` Roman Penyaev
2018-06-05 10:18     ` Roman Penyaev
2018-06-04 12:29 ` [PATCH v2 2/8] nvmet-rdma: wrap raw kref_get/put() with corresponding helpers Roman Pen
2018-06-04 21:49   ` Jason Gunthorpe
2018-06-05  4:43     ` Christoph Hellwig [this message]
2018-06-05 10:19       ` Roman Penyaev
2018-06-05 10:19     ` Roman Penyaev
2018-06-04 12:29 ` [PATCH v2 3/8] nvmet-rdma: use ib_client API to wrap ib_device Roman Pen

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=20180605044347.GA29420@lst.de \
    --to=hch@lst.de \
    /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.