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: <E20AE017F0DBA04DA661272787510F9813D297B0@DGGEMM527-MBX.china.huawei.com>
Date:   Thu, 17 Oct 2019 09:20:10 +0000
From:   huangdaode <huangdaode@...ilicon.com>
To:     Marc Zyngier <maz@...nel.org>
CC:     "jason@...edaemon.net" <jason@...edaemon.net>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
        "sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
        "alexandre.torgue@...com" <alexandre.torgue@...com>,
        "nm@...com" <nm@...com>, "t-kristo@...com" <t-kristo@...com>,
        "ssantosh@...nel.org" <ssantosh@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>
Subject: 答复: [PATCH] use devm_platform_ioremap_resource() for irqchip drivers

Hi Marc
I am just doing the coccicheck using the command "make coccicheck M=drivers/irqchip/", and it report 
$ make coccicheck M=drivers/irqchip/
.......
drivers/irqchip//irq-mvebu-icu.c:361:1-10: WARNING: Use devm_platform_ioremap_resource for icu -> base
drivers/irqchip//irq-ts4800.c:105:1-11: WARNING: Use devm_platform_ioremap_resource for data -> base
drivers/irqchip//irq-mvebu-pic.c:134:1-10: WARNING: Use devm_platform_ioremap_resource for pic -> base
drivers/irqchip//irq-ti-sci-inta.c:571:1-11: WARNING: Use devm_platform_ioremap_resource for inta -> base
drivers/irqchip//irq-stm32-exti.c:853:1-16: WARNING: Use devm_platform_ioremap_resource for host_data -> base

so just fix the WARNING. 

And after  apply the patch, I do the compile, it's OK, but I lack of hardware to test it. 
That's the case. 

MBR.
Thanks

-----邮件原件-----
发件人: Marc Zyngier [mailto:maz@...nel.org] 
发送时间: 2019年10月17日 16:24
收件人: huangdaode <huangdaode@...ilicon.com>
抄送: jason@...edaemon.net; andrew@...n.ch; gregory.clement@...tlin.com; sebastian.hesselbarth@...il.com; tglx@...utronix.de; mcoquelin.stm32@...il.com; alexandre.torgue@...com; nm@...com; t-kristo@...com; ssantosh@...nel.org; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; linux-stm32@...md-mailman.stormreply.com
主题: Re: [PATCH] use devm_platform_ioremap_resource() for irqchip drivers

On 2019-10-17 08:13, Daode Huang wrote:
> From: Daode Huang <huangdaode@...licon.com>
>
> Use the new helper that wraps the calls to platform_get_resource() and 
> devm_ioremap_resource() together
>
> Signed-off-by: Daode Huang <huangdaode@...licon.com>
> ---
>  drivers/irqchip/irq-mvebu-icu.c   | 3 +--
>  drivers/irqchip/irq-mvebu-pic.c   | 3 +--
>  drivers/irqchip/irq-stm32-exti.c  | 3 +--  
> drivers/irqchip/irq-ti-sci-inta.c | 3 +--
>  drivers/irqchip/irq-ts4800.c      | 3 +--
>  5 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/irqchip/irq-mvebu-icu.c 
> b/drivers/irqchip/irq-mvebu-icu.c index 547045d..ddf9b0d 100644
> --- a/drivers/irqchip/irq-mvebu-icu.c
> +++ b/drivers/irqchip/irq-mvebu-icu.c
> @@ -357,8 +357,7 @@ static int mvebu_icu_probe(struct platform_device
> *pdev)
>
>  	icu->dev = &pdev->dev;
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	icu->base = devm_ioremap_resource(&pdev->dev, res);
> +	icu->base = devm_platform_ioremap_resource(pdev, res);

void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
                                              unsigned int index)

What could possibly go wrong? I'd suggest you start compiling (and possibly
testing) the code you change before sending patches...

         M.
--
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ