lkml.org 
[lkml]   [2019]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 2/3] treewide: Remove dev_err() usage after platform_get_irq()
From
Date
Quoting Andy Shevchenko (2019-07-23 11:31:54)
> On Tue, Jul 23, 2019 at 9:16 PM Stephen Boyd <swboyd@chromium.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@gmail.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.

\
 
 \ /
  Last update: 2019-07-24 00:23    [W:0.151 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site