Re: [PATCH 1/2] dma-buf/fence-array: add fence_is_array()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux