linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuehaibing <yuehaibing@huawei.com>
To: huangdaode <huangdaode@hisilicon.com>, Marc Zyngier <maz@kernel.org>
Cc: "jason@lakedaemon.net" <jason@lakedaemon.net>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"sebastian.hesselbarth@gmail.com"
	<sebastian.hesselbarth@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	"alexandre.torgue@st.com" <alexandre.torgue@st.com>,
	"nm@ti.com" <nm@ti.com>, "t-kristo@ti.com" <t-kristo@ti.com>,
	"ssantosh@kernel.org" <ssantosh@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: 答复: [PATCH] use devm_platform_ioremap_resource() for irqchip drivers
Date: Thu, 17 Oct 2019 17:24:01 +0800	[thread overview]
Message-ID: <3a98da01-4f69-2624-e49f-5e2316c433e0@huawei.com> (raw)
In-Reply-To: <E20AE017F0DBA04DA661272787510F9813D297B0@DGGEMM527-MBX.china.huawei.com>

On 2019/10/17 17:20, huangdaode wrote:
> 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@kernel.org] 
> 发送时间: 2019年10月17日 16:24
> 收件人: huangdaode <huangdaode@hisilicon.com>
> 抄送: jason@lakedaemon.net; andrew@lunn.ch; gregory.clement@bootlin.com; sebastian.hesselbarth@gmail.com; tglx@linutronix.de; mcoquelin.stm32@gmail.com; alexandre.torgue@st.com; nm@ti.com; t-kristo@ti.com; ssantosh@kernel.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-stm32@st-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@hislicon.com>
>>
>> Use the new helper that wraps the calls to platform_get_resource() and 
>> devm_ioremap_resource() together
>>
>> Signed-off-by: Daode Huang <huangdaode@hislicon.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);

It should be :

+	icu->base = devm_platform_ioremap_resource(pdev, 0);

> 
> 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...
> 


      reply	other threads:[~2019-10-17  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  7:13 [PATCH] use devm_platform_ioremap_resource() for irqchip drivers Daode Huang
2019-10-17  8:23 ` Marc Zyngier
2019-10-17  9:20   ` 答复: " huangdaode
2019-10-17  9:24     ` Yuehaibing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a98da01-4f69-2624-e49f-5e2316c433e0@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@bootlin.com \
    --cc=huangdaode@hisilicon.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maz@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nm@ti.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).