From: Jerin Jacob <jerinjacobk@gmail.com>
To: "McDaniel, Timothy" <timothy.mcdaniel@intel.com>
Cc: David Marchand <david.marchand@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH] eventdev: check input parameter for dump op
Date: Mon, 2 Nov 2020 19:34:15 +0530 [thread overview]
Message-ID: <CALBAE1PcD6L+Twhkbw02jFoaHGmKPrgGnVDxpdHm4CeAm+PbRg@mail.gmail.com> (raw)
In-Reply-To: <SN6PR11MB31039B0C23AAE73F9CFC4F529E130@SN6PR11MB3103.namprd11.prod.outlook.com>
On Mon, Nov 2, 2020 at 2:22 AM McDaniel, Timothy
<timothy.mcdaniel@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Sunday, November 1, 2020 2:37 PM
> > To: dev@dpdk.org
> > Cc: McDaniel, Timothy <timothy.mcdaniel@intel.com>; Jerin Jacob
> > <jerinj@marvell.com>
> > 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 <david.marchand@redhat.com>
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 <timothy.mcdaniel@intel.com>
prev parent reply other threads:[~2020-11-02 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 20:36 David Marchand
2020-11-01 20:52 ` McDaniel, Timothy
2020-11-02 14:04 ` Jerin Jacob [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALBAE1PcD6L+Twhkbw02jFoaHGmKPrgGnVDxpdHm4CeAm+PbRg@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=timothy.mcdaniel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).