lkml.org 
[lkml]   [2016]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface
Date
> > +struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc)
> > +{
> > + struct dpaa2_io *obj = kmalloc(sizeof(*obj), GFP_KERNEL);
> > +
> > + if (!obj)
> > + return NULL;
> > +
> > + /* check if CPU is out of range (-1 means any cpu) */
> > + if (desc->cpu >= num_possible_cpus())
>
> We leak 'obj' on this error path.

Will fix.

> > +
> > +/**
> > + * dpaa2_io_service_rearm() - Rearm the notification for the given DPIO service.
> > + * @service: the given DPIO service.
>
> s/@service/@d/

Will fix.

> > +/**
> > + * dpaa2_io_store_next() - Determine when the next dequeue result is available.
> > + * @s: the dpaa2_io_store object.
> > + * @is_last: indicate whether this is the last frame in the pull command.
> > + *
> > + * When an object driver performs dequeues to a dpaa2_io_store, this function
> > + * can be used to determine when the next frame result is available. Once
> > + * this function returns non-NULL, a subsequent call to it will try to find
> > + * the next dequeue result.
> > + *
> > + * Note that if a pull-dequeue has a NULL result because the target FQ/channel
> > + * was empty, then this function will also return NULL (rather than expecting
> > + * the caller to always check for this. As such, "is_last" can be used to
> > + * differentiate between "end-of-empty-dequeue" and "still-waiting".
> > + *
> > + * Return dequeue result for a valid dequeue result, or NULL for empty dequeue.
> > + */
> > +struct dpaa2_dq *dpaa2_io_store_next(struct dpaa2_io_store *s, int *is_last)
>
> "bool *is_last"?

Same comment here as on the other patch...let's get Roy's input on this
and make it a TODO if deemed a good idea.

Thanks,
Stuartt

\
 
 \ /
  Last update: 2016-12-16 02:22    [W:0.067 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site