mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Gustavo Padovan" <gustavo@padovan.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Daniel Stone" <daniels@collabora.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Rob Clark" <robdclark@gmail.com>,
	"Greg Hackmann" <ghackmann@google.com>,
	"John Harrison" <John.C.Harrison@Intel.com>,
	laurent.pinchart@ideasonboard.com, seanpaul@google.com,
	marcheu@google.com, m.chehab@samsung.com,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 1/2] dma-buf/fence-array: add fence_is_array()
Date: Thu, 30 Jun 2016 22:55:54 +0100	[thread overview]
Message-ID: <20160630215554.GA28931@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20160630142359.GC28577@nuc-i3427.alporthouse.com>

On Thu, Jun 30, 2016 at 03:23:59PM +0100, Chris Wilson wrote:
> On Thu, Jun 30, 2016 at 11:09:47AM -0300, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > 
> > Add helper to check if fence is array.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Christian König <christian.koenig@amd.com>
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  include/linux/fence-array.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/include/linux/fence-array.h b/include/linux/fence-array.h
> > index 86baaa4..d2e9f40 100644
> > --- a/include/linux/fence-array.h
> > +++ b/include/linux/fence-array.h
> > @@ -52,6 +52,16 @@ struct fence_array {
> >  extern const struct fence_ops fence_array_ops;
> >  
> >  /**
> > + * fence_is_array - check if a fence is from the array subsclass
> > + *
> > + * Return true if it is a fence_array and false otherwise.
> > + */
> > +static inline bool fence_is_array(struct fence *fence)
> > +{
> > +	return (fence->ops == &fence_array_ops) ? true : false;
> 
> Just return fence->ops == &fence_array_ops; It's a logical operation, it
> is already a boolean. With that,
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Oops, this needs an EXPORT_SYMBOL(fence_array_ops);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2016-06-30 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 14:09 [PATCH 0/2] dma-buf/sync_file: rework fences on struct sync_file Gustavo Padovan
2016-06-30 14:09 ` [PATCH 1/2] dma-buf/fence-array: add fence_is_array() Gustavo Padovan
2016-06-30 14:23   ` Chris Wilson
2016-06-30 21:55     ` Chris Wilson [this message]
2016-06-30 14:09 ` [PATCH 2/2] dma-buf/sync_file: rework fence storage in struct file Gustavo Padovan
2016-06-30 14:22   ` Chris Wilson

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=20160630215554.GA28931@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=John.C.Harrison@Intel.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ghackmann@google.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcheu@google.com \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@google.com \
    --cc=sumit.semwal@linaro.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

all inboxes | Powered by JetHome®