On Mon, Nov 2, 2020 at 2:22 AM McDaniel, Timothy <[email protected]> wrote: > > > > > -----Original Message----- > > From: David Marchand <[email protected]> > > Sent: Sunday, November 1, 2020 2:37 PM > > To: [email protected] > > Cc: McDaniel, Timothy <[email protected]>; Jerin Jacob > > <[email protected]> > > Subject: [PATCH] eventdev: check input parameter for dump op > > > > Rather than have drivers check for this, let's ensure the passed FILE * > > is not NULL. > > > > Signed-off-by: David Marchand <[email protected]>
Applied to dpdk-next-eventdev/for-main. Thanks. > > --- > > lib/librte_eventdev/rte_eventdev.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/lib/librte_eventdev/rte_eventdev.c > > b/lib/librte_eventdev/rte_eventdev.c > > index 994bd1eaa9..afbadc535b 100644 > > --- a/lib/librte_eventdev/rte_eventdev.c > > +++ b/lib/librte_eventdev/rte_eventdev.c > > @@ -1153,6 +1153,8 @@ rte_event_dev_dump(uint8_t dev_id, FILE *f) > > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > > dev = &rte_eventdevs[dev_id]; > > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dump, -ENOTSUP); > > + if (f == NULL) > > + return -EINVAL; > > > > (*dev->dev_ops->dump)(dev, f); > > return 0; > > -- > > 2.23.0 > > Looks good to me. > > Reviewed-by: Timothy McDaniel <[email protected]>

