Re: [PATCH 3/5] powerpc/ftw: Implement a simple FTW driver

From: Sukadev Bhattiprolu
Date: Thu Jan 18 2018 - 11:45:23 EST


Randy Dunlap [rdunlap@xxxxxxxxxxxxx] wrote:
> > +
> > + default:
> > + return -EINVAL;
> > + }
> > +}
>
> Nit: some versions of gcc (or maybe clang) complain about a typed function
> not always having a return value in code like above, so it is often done as:

Ok.
>
> > +static long ftw_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
> > +{
> > + switch (cmd) {
> > +
> > + case FTW_SETUP:
> > + return ftw_ioc_ftw_setup(fp, arg);
> > +
> > + default:
> > + break;
> > + }
>
> return -EINVAL;
> > +}
>
> Do you expect to implement more ioctls? If not, just change the switch to
> an if ().
Maybe a couple more but changed it to an 'if' for now (and fixed an
error handling issue in ftw_file_init()).

Here is the updated patch.

---