> -----Original Message-----
> From: David Marchand <[email protected]>
> Sent: Saturday, October 31, 2020 5:00 PM
> To: McDaniel, Timothy <[email protected]>
> Cc: dev <[email protected]>; Carrillo, Erik G <[email protected]>; Eads,
> Gage <[email protected]>; Van Haaren, Harry
> <[email protected]>; Jerin Jacob Kollanukkaran
> <[email protected]>; Thomas Monjalon <[email protected]>
> Subject: Re: [dpdk-dev] [PATCH v14 09/23] event/dlb: add xstats
> 
> On Sat, Oct 31, 2020 at 7:21 PM Timothy McDaniel
> <[email protected]> wrote:
> > +void
> > +dlb_eventdev_dump(struct rte_eventdev *dev, FILE *f)
> > +{
> > +       struct dlb_eventdev *dlb;
> > +       struct dlb_hw_dev *handle;
> > +       int i;
> > +
> > +       if (f == NULL) {
> > +               printf("Invalid file pointer\n");
> 
> No printf in a driver!
> 
> This check should probably be at eventdev layer level.
> 
> > +               return;
> > +       }
> > +
> > +       if (dev == NULL) {
> 
> dev can't be NULL.
> 
> 
> > +               fprintf(f, "Invalid event device\n");
> > +               return;
> > +       }
> > +
> > +       dlb = dlb_pmd_priv(dev);
> > +
> > +       if (dlb == NULL) {
> 
> I wonder if this can happen, dev_private is allocated at the same time
> the eventdev dev is.
> 
> > +               fprintf(f, "DLB Event device cannot be dumped!\n");
> > +               return;
> > +       }
> > +
> 
> 
> --
> David Marchand

Addressed in next patchset

Reply via email to