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: <Zlg_PP3PomxYGJ8A@hovoldconsulting.com>
Date: Thu, 30 May 2024 10:56:28 +0200
From: Johan Hovold <johan@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Johan Hovold <johan+linaro@...nel.org>, Lee Jones <lee@...nel.org>,
	Mark Brown <broonie@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...aro.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Das Srinagesh <quic_gurus@...cinc.com>,
	Satya Priya Kakitapalli <quic_skakitap@...cinc.com>,
	Stephen Boyd <swboyd@...omium.org>,
	Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
	linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v2 13/14] regulator: add pm8008 pmic regulator driver

On Thu, May 30, 2024 at 11:46:12AM +0300, Andy Shevchenko wrote:
> On Thu, May 30, 2024 at 11:14 AM Johan Hovold <johan@...nel.org> wrote:
> > On Wed, May 29, 2024 at 11:02:57PM +0300, Andy Shevchenko wrote:
> > > On Wed, May 29, 2024 at 7:30 PM Johan Hovold <johan+linaro@...nel.org> wrote:
> 
> ...
> 
> > > > +#include <linux/array_size.h>
> > > > +#include <linux/bits.h>
> > > > +#include <linux/device.h>
> > > > +#include <linux/math.h>
> > > > +#include <linux/module.h>
> > >
> > > > +#include <linux/of.h>
> > > > +#include <linux/platform_device.h>
> > > > +#include <linux/regmap.h>
> > > > +#include <linux/regulator/driver.h>
> > >
> > > + types.h
> >
> > This one is already pulled in indirectly and I'm not going to respin for
> > this.
> >
> > > + asm/byteorder.h
> >
> > Already explicitly included in the code you left out.
> 
> Is there any guarantee it will be like this? I don't think so. That's
> why there is an IWYU principle to give more flexibility of reshuffling
> the (core) headers. And I believe you know that we have way too far
> dependency hell in the headers in the kernel. Have you seen what Ingo
> tried to do and what the potential achievements are?

The driver is using cpu_to_le16() from asm/byteorder.h so the __le16
type definition will be pulled in.

> 
> ...
> 
> > > > +               rdev = devm_regulator_register(dev, desc, &config);
> > > > +               if (IS_ERR(rdev)) {
> > > > +                       ret = PTR_ERR(rdev);
> > > > +                       dev_err(dev, "failed to register regulator %s: %d\n",
> > > > +                                       desc->name, ret);
> > > > +                       return ret;
> > >
> > > It's possible to use
> > >
> > >   return dev_err_probe(...);
> > >
> > > even for non-probe functions.
> 
> (this should be "non-probe deferred functions")
> 
> > This is a probe function(), but as I've told you repeatedly I'm not
> > going to use dev_err_probe() here.
> 
> Yeah, I got it, some developers are leaving in the previous decades to
> make code very verbose for no benefit, no problem.

And some developers write unreadable code just to save a few lines of
code. I prefer clarity.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ