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:   Thu, 5 Sep 2019 11:45:30 +0530
From:   Amit Kucheria <amit.kucheria@...aro.org>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     miquel.raynal@...tlin.com, Zhang Rui <rui.zhang@...el.com>,
        Eduardo Valentin <edubezval@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Eric Anholt <eric@...olt.net>, wahrenst@....net,
        f.fainelli@...il.com, rjui@...adcom.com, sbranden@...adcom.com,
        Markus Mayer <mmayer@...adcom.com>,
        computersforpeace@...il.com, gregory.0xf0@...il.com,
        Matthias Brugger <matthias.bgg@...il.com>,
        Andy Gross <agross@...nel.org>,
        Heiko Stuebner <heiko@...ech.de>, mcoquelin.stm32@...il.com,
        alexandre.torgue@...com, Marc Gonzalez <marc.w.gonzalez@...e.fr>,
        mans@...sr.com, talel@...zon.com, Jun Nie <jun.nie@...aro.org>,
        Shawn Guo <shawnguo@...nel.org>, phil@...pberrypi.org,
        gregkh@...uxfoundation.org, david.hernandezsanchez@...com,
        horms+renesas@...ge.net.au, wsa+renesas@...g-engineering.com,
        bcm-kernel-feedback-list@...adcom.com,
        Linux PM list <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-rpi-kernel@...ts.infradead.org,
        lakml <linux-arm-kernel@...ts.infradead.org>,
        linux-mediatek@...ts.infradead.org,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        linux-rockchip@...ts.infradead.org,
        linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH -next 08/15] thermal: tsens: use devm_platform_ioremap_resource()
 to simplify code

On Wed, Sep 4, 2019 at 6:05 PM YueHaibing <yuehaibing@...wei.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Acked-by: Amit Kucheria <amit.kucheria@...aro.org>

> ---
>  drivers/thermal/qcom/tsens-common.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
> index 528df88..43ce4fb 100644
> --- a/drivers/thermal/qcom/tsens-common.c
> +++ b/drivers/thermal/qcom/tsens-common.c
> @@ -155,7 +155,6 @@ int __init init_common(struct tsens_priv *priv)
>  {
>         void __iomem *tm_base, *srot_base;
>         struct device *dev = priv->dev;
> -       struct resource *res;
>         u32 enabled;
>         int ret, i, j;
>         struct platform_device *op = of_find_device_by_node(priv->dev->of_node);
> @@ -166,8 +165,7 @@ int __init init_common(struct tsens_priv *priv)
>         if (op->num_resources > 1) {
>                 /* DT with separate SROT and TM address space */
>                 priv->tm_offset = 0;
> -               res = platform_get_resource(op, IORESOURCE_MEM, 1);
> -               srot_base = devm_ioremap_resource(&op->dev, res);
> +               srot_base = devm_platform_ioremap_resource(op, 1);
>                 if (IS_ERR(srot_base)) {
>                         ret = PTR_ERR(srot_base);
>                         goto err_put_device;
> @@ -184,8 +182,7 @@ int __init init_common(struct tsens_priv *priv)
>                 priv->tm_offset = 0x1000;
>         }
>
> -       res = platform_get_resource(op, IORESOURCE_MEM, 0);
> -       tm_base = devm_ioremap_resource(&op->dev, res);
> +       tm_base = devm_platform_ioremap_resource(op, 0);
>         if (IS_ERR(tm_base)) {
>                 ret = PTR_ERR(tm_base);
>                 goto err_put_device;
> --
> 2.7.4
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ