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] [day] [month] [year] [list]
Date:   Wed, 14 Sep 2022 12:23:55 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [RFC PATCH] checkpatch: Check check for places where
 dev_err_probe() would likely be better than dev_err()

On Sun, Sep 11, 2022 at 3:21 PM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
> Le 11/09/2022 à 15:15, Christophe JAILLET a écrit :
> > Some functions are known to potentially return -EPROBE_DEFER. In such a
> > case, it is likely that dev_err_probe() is a better choice than err_err().
> >
> > dev_err_probe():
> >    - is usually less verbose
> >    - generates smaller .o files
> >    - handles -EPROBE_DEFER so that logs are not spammed
> >    - automatically log the error code in a human readable way
> >
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > ---
> > This patch is only a PoC to see if there is some interest in such a new
> > check.
> > The hard coded '5 lines of context' has been chosen because a typical
> > pattern is:
> >
> >       clk = devm_clk_get(dev, "clk_lcd");
> >       if (IS_ERR(clk) {
> >               dev_err(dev, "Error meesage\n");
> >               return PTR_ERR(clk);
> >       }
>
> (adding Linus Walleij)
>
>
> I forgot to say that this patch is a try to address the comment from
> Linus Walleij at [1].
>
> It would not help "fixing a gazillion dev_err_probe()", but it could
> help not having more to fix later :)

Needless to say I am a big fan of this patch!
Acked-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ