[PATCH 34/34] iio: inkern: fix coding style warnings

Nuno Sá noname.nuno at gmail.com
Sat Jun 11 05:51:15 AEST 2022


On Fri, 2022-06-10 at 11:53 -0400, Joe Simmons-Talbott wrote:
> On Fri, Jun 10, 2022 at 10:45:45AM +0200, Nuno Sá wrote:
> > Just cosmetics. No functional change intended...
> > 
> > Signed-off-by: Nuno Sá <nuno.sa at analog.com>
> > ---
> >  drivers/iio/inkern.c | 64 ++++++++++++++++++++++------------------
> > ----
> >  1 file changed, 32 insertions(+), 32 deletions(-)
> > 
> > diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> > index 7eb536560ded..526519cefcb9 100644
> > --- a/drivers/iio/inkern.c
> > +++ b/drivers/iio/inkern.c
> > @@ -45,13 +45,13 @@ int iio_map_array_register(struct iio_dev
> > *indio_dev, struct iio_map *maps)
> >         int i = 0, ret = 0;
> >         struct iio_map_internal *mapi;
> >  
> > -       if (maps == NULL)
> > +       if (!maps)
> >                 return 0;
> >  
> >         mutex_lock(&iio_map_list_lock);
> > -       while (maps[i].consumer_dev_name != NULL) {
> > +       while (!maps[i].consumer_dev_name) {
> 
> Shouldn't this be?:
> while (maps[i].consumer_dev_name) {
> 

Ups... Nice catch! I was probably in bot mode already.

- Nuno Sá



More information about the openbmc mailing list