linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>,
	target-devel@vger.kernel.org, Joel Becker <jlbec@evilplan.org>,
	Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 09/33] configfs: Introduce config_item_get_unless_zero()
Date: Sun, 28 May 2017 02:33:10 -0700	[thread overview]
Message-ID: <20170528093310.GC14519@infradead.org> (raw)
In-Reply-To: <20170523234854.21452-10-bart.vanassche@sandisk.com>

> +struct config_item *config_item_get_unless_zero(struct config_item *item)
> +{
> +	return item && kref_get_unless_zero(&item->ci_kref) ? item : NULL;
> +}
> +EXPORT_SYMBOL(config_item_get_unless_zero);

Style nipick, I'd prefer something like:

	if (item && !kref_get_unless_zero(&item->ci_kref))
		item = NULL;
	return item;

Otherwise this looks fine to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

or should I pick it up through the configfs tree?

  reply	other threads:[~2017-05-28  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170523234854.21452-1-bart.vanassche@sandisk.com>
2017-05-23 23:48 ` [PATCH 09/33] configfs: Introduce config_item_get_unless_zero() Bart Van Assche
2017-05-28  9:33   ` Christoph Hellwig [this message]
2017-05-28 16:37     ` Bart Van Assche
2017-06-13 23:22   ` Mike Christie

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=20170528093310.GC14519@infradead.org \
    --to=hch@infradead.org \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=jlbec@evilplan.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /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).