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 13:30:48 -0600
From:   Rob Herring <robh@...nel.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.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>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v4 2/3] treewide: Remove dev_err() usage after platform_get_irq()

On Tue, Jul 23, 2019 at 12: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.

Nice. Would be nice to see this for other commonly called functions in
probe though we have deal with cases of failure being okay.

>
> // <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(...);

What about cases of pr_err, pr_warn, etc.? And the subsystem specific
prints like edac_printk and DRM_ERROR/DRM_DEV_ERROR.

There's also some cases that the irq seems to be optional. They use
dev_info, but will now have an error level print. That's fine with me,
but some may complain...

> )
> ...
> }
> // </smpl>
>
> Cc: Rob Herring <robh@...nel.org>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Cc: Javier Martinez Canillas <javierm@...hat.com>
> Cc: Andrzej Hajda <a.hajda@...sung.com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Russell King - ARM Linux <linux@...linux.org.uk>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Cc: Andy Shevchenko <andy.shevchenko@...il.com>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ