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]
Date:   Tue, 23 Jul 2019 15:23:10 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Rob Herring <robh@...nel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Andrzej Hajda <a.hajda@...sung.com>,
        Mark Brown <broonie@...nel.org>,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH v4 2/3] treewide: Remove dev_err() usage after platform_get_irq()

Quoting Andy Shevchenko (2019-07-23 11:31:54)
> On Tue, Jul 23, 2019 at 9:16 PM Stephen Boyd <swboyd@...omium.org> wrote:
> >
> > We don't need dev_err() messages when platform_get_irq() fails now that
> > platform_get_irq() prints an error message itself when something goes
> > wrong. Let's remove these prints with a simple semantic patch.
> >
> > // <smpl>
> > @@
> > expression ret;
> > struct platform_device *E;
> > @@
> >
> > ret =
> > (
> > platform_get_irq(E, ...)
> > |
> > platform_get_irq_byname(E, ...)
> > );
> >
> > if ( \( ret < 0 \| ret <= 0 \) )
> > {
> > (
> > -if (ret != -EPROBE_DEFER)
> > -{ ...
> > -dev_err(...);
> > -... }
> > |
> > ...
> > -dev_err(...);
> > )
> > ...
> > }
> > // </smpl>
> >
> 
> Can you teach it to remove curly braces when it's appropriate? (see
> below for examples)

I don't know if that works. I was hoping that checkpatch might do that
for me with --fix but it doesn't seem to warn about anything so I guess
not. Is there some sort of tidy script I can run on my patches to do
this?

> 
> >  drivers/i2c/busses/i2c-cht-wc.c               |  1 -
> 
> >  drivers/mfd/intel_soc_pmic_bxtwc.c            |  1 -
> 
> >  drivers/pinctrl/intel/pinctrl-cherryview.c    |  1 -
> >  drivers/pinctrl/intel/pinctrl-intel.c         |  1 -
> 
> >  drivers/platform/x86/intel_bxtwc_tmu.c        |  1 -
> >  drivers/platform/x86/intel_int0002_vgpio.c    |  1 -
> >  drivers/platform/x86/intel_pmc_ipc.c          |  1 -
> 
> Can you split this on per subsystem level?
> 
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> after addressing above.

It depends on the previous patch to make behavior match, so maybe it
doesn't matter because it will go through one tree instead of many?
Either way I'm fine, I just don't want to spend the time on it until a
potential maintainer accepts or rejects it because of this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ