lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZC0uzt+8olV4qzEC@smile.fi.intel.com>
Date:   Wed, 5 Apr 2023 11:18:22 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Chanwoo Choi <cwchoi00@...il.com>
Cc:     Bumwoo Lee <bw365.lee@...sung.com>, linux-kernel@...r.kernel.org,
        MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>
Subject: Re: [PATCH v1 14/14] extcon: Use positive conditional in ternary
 operator

On Mon, Apr 03, 2023 at 11:38:41PM +0900, Chanwoo Choi wrote:
> On 23. 3. 22. 23:40, Andy Shevchenko wrote:
> > It's easier to parse by a human being the positive conditional.

...

> >  const char *extcon_get_edev_name(struct extcon_dev *edev)
> >  {
> > -	return !edev ? NULL : edev->name;
> > +	return edev ? edev->name : NULL;
> >  }
> >  EXPORT_SYMBOL_GPL(extcon_get_edev_name);
> 
> It is not fix-up patch and I'm not sure that it is beneficial patch.
> I will not apply it.

It improves the cognitive perception of the code, but I'm fine with
no patch being applied.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ