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: <CACRpkdbGCoXGNOveo3GR9OwRgLC_DYEaCXUqthpcojEzbdbN0g@mail.gmail.com>
Date:   Wed, 3 Apr 2019 11:18:18 +0700
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Joel Stanley <joel@....id.au>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Baruch Siach <baruch@...s.co.il>,
        Keguang Zhang <keguang.zhang@...il.com>,
        Vladimir Zapolskiy <vz@...ia.com>,
        Kevin Hilman <khilman@...libre.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Avi Fishman <avifishman70@...il.com>,
        Nancy Yuen <yuenn@...gle.com>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Wan ZongShun <mcuos.com@...il.com>,
        Michal Simek <michal.simek@...inx.com>,
        Sylvain Lemieux <slemieux.tyco@...il.com>,
        Kukjin Kim <kgene@...nel.org>, Barry Song <baohua@...nel.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Patrice Chotard <patrice.chotard@...com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Marc Gonzalez <marc.w.gonzalez@...e.fr>,
        Thierry Reding <thierry.reding@...il.com>,
        Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH] watchdog: Convert to use devm_platform_ioremap_resource

On Wed, Apr 3, 2019 at 2:02 AM Guenter Roeck <linux@...ck-us.net> wrote:

> Use devm_platform_ioremap_resource to reduce source code size,
> improve readability, and reduce the likelyhood of bugs.
>
> The conversion was done automatically with coccinelle using the
> following semantic patch.
>
> @r@
> identifier res, pdev;
> expression a;
> expression index;
> expression e;
> @@
>
> <+...
> - res = platform_get_resource(pdev, IORESOURCE_MEM, index);
> - a = devm_ioremap_resource(e, res);
> + a = devm_platform_ioremap_resource(pdev, index);
> ...+>
>
> @depends on r@
> identifier r.res;
> @@
> - struct resource *res;
>   ... when != res
>
> @@
> identifier res, pdev;
> expression index;
> expression a;
> @@
> - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
> - a = devm_ioremap_resource(&pdev->dev, res);
> + a = devm_platform_ioremap_resource(pdev, index);
>
> Cc: Joel Stanley <joel@....id.au>
> Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>
> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
> Cc: Florian Fainelli <f.fainelli@...il.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Baruch Siach <baruch@...s.co.il>
> Cc: Keguang Zhang <keguang.zhang@...il.com>
> Cc: Vladimir Zapolskiy <vz@...ia.com>
> Cc: Kevin Hilman <khilman@...libre.com>
> Cc: Matthias Brugger <matthias.bgg@...il.com>
> Cc: Avi Fishman <avifishman70@...il.com>
> Cc: Nancy Yuen <yuenn@...gle.com>
> Cc: Brendan Higgins <brendanhiggins@...gle.com>
> Cc: Wan ZongShun <mcuos.com@...il.com>
> Cc: Michal Simek <michal.simek@...inx.com>
> Cc: Sylvain Lemieux <slemieux.tyco@...il.com>
> Cc: Kukjin Kim <kgene@...nel.org>
> Cc: Barry Song <baohua@...nel.org>
> Cc: Orson Zhai <orsonzhai@...il.com>
> Cc: Patrice Chotard <patrice.chotard@...com>
> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>
> Cc: Maxime Ripard <maxime.ripard@...tlin.com>
> Cc: Chen-Yu Tsai <wens@...e.org>
> Cc: Marc Gonzalez <marc.w.gonzalez@...e.fr>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: Shawn Guo <shawnguo@...nel.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

Nice Cocinelle work!!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ