Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543162

RE: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface

From Stuart Yoder <stuart.yoder@nxp.com>
Newsgroups linux.kernel
Subject RE: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface
Date 2016-12-16 02:30 +0100
Message-ID <sOPvr-4XG-3@gated-at.bofh.it> (permalink)
References <sJVBw-3XH-23@gated-at.bofh.it> <sJZ2p-6fQ-25@gated-at.bofh.it> <sJZ2p-6fQ-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > +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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: [PATCH v3 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service  interface Stuart Yoder <stuart.yoder@nxp.com> - 2016-12-16 02:30 +0100

csiph-web