lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 30 Jun 2016 22:55:54 +0100
From:	Chris Wilson <chris@...is-wilson.co.uk>
To:	Gustavo Padovan <gustavo@...ovan.org>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	Daniel Stone <daniels@...labora.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Rob Clark <robdclark@...il.com>,
	Greg Hackmann <ghackmann@...gle.com>,
	John Harrison <John.C.Harrison@...el.com>,
	laurent.pinchart@...asonboard.com, seanpaul@...gle.com,
	marcheu@...gle.com, m.chehab@...sung.com,
	Sumit Semwal <sumit.semwal@...aro.org>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
	Christian König <christian.koenig@....com>
Subject: Re: [PATCH 1/2] dma-buf/fence-array: add fence_is_array()

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@...labora.co.uk>
> > 
> > Add helper to check if fence is array.
> > 
> > Cc: Chris Wilson <chris@...is-wilson.co.uk>
> > Cc: Christian König <christian.koenig@....com>
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@...labora.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@...is-wilson.co.uk>

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

-- 
Chris Wilson, Intel Open Source Technology Centre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ