RE: [PATCH v2 15/15] iio: inkern: fix coding style warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

> Subject: Re: [PATCH v2 15/15] iio: inkern: fix coding style warnings
> 
> On Mon, Jul 11, 2022 at 3:28 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> wrote:
> > > Subject: Re: [PATCH v2 15/15] iio: inkern: fix coding style warnings
> > > On Mon, Jul 11, 2022 at 2:40 PM Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:
> 
> ...
> 
> > > > -       if (name == NULL && channel_name == NULL)
> > > > +       if (!name && !channel_name)
> > > >                 return ERR_PTR(-ENODEV);
> > >
> > > After this change in place, I think it's better to convert it to
> > >
> > >   if (!(name || channel_name))
> >
> > It should be name && channel_name
> >
> > See below.
> >  (! ( 1 || 0)->  (! (1 && 1)
> 
> I didn't get what you are implying here. Please, check again what's in
> the original code and what's being suggested.

Ok, you are right. I was looking at the modified code.

Cheers,
Biju




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux