From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk,
Andrew Murray <andrew.murray@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>, Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci: iproc-msi: fix __iomem annotation in decode_msi_hwirq()
Date: Thu, 17 Oct 2019 11:17:27 +0100 [thread overview]
Message-ID: <20191017101720.GA9589@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20191015160702.9457-1-ben.dooks@codethink.co.uk>
On Tue, Oct 15, 2019 at 05:07:02PM +0100, Ben Dooks (Codethink) wrote:
> Fix __iomem attribute on msg variable passed to readl() in
> the decode_msi_hwirq() function. Fixes the following sparse
> warning:
>
> drivers/pci/controller/pcie-iproc-msi.c:301:17: warning: incorrect type in argument 1 (different address spaces)
> drivers/pci/controller/pcie-iproc-msi.c:301:17: expected void const volatile [noderef] <asn:2> *addr
> drivers/pci/controller/pcie-iproc-msi.c:301:17: got unsigned int [usertype] *[assigned] msg
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andrew Murray <andrew.murray@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Ray Jui <rjui@broadcom.com>
> Cc: Scott Branden <sbranden@broadcom.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-pci@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> .. (open list)
> ---
> drivers/pci/controller/pcie-iproc-msi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied to pci/misc, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
> index 0a3f61be5625..3176ad3ab0e5 100644
> --- a/drivers/pci/controller/pcie-iproc-msi.c
> +++ b/drivers/pci/controller/pcie-iproc-msi.c
> @@ -293,11 +293,12 @@ static const struct irq_domain_ops msi_domain_ops = {
>
> static inline u32 decode_msi_hwirq(struct iproc_msi *msi, u32 eq, u32 head)
> {
> - u32 *msg, hwirq;
> + u32 __iomem *msg;
> + u32 hwirq;
> unsigned int offs;
>
> offs = iproc_msi_eq_offset(msi, eq) + head * sizeof(u32);
> - msg = (u32 *)(msi->eq_cpu + offs);
> + msg = (u32 __iomem *)(msi->eq_cpu + offs);
> hwirq = readl(msg);
> hwirq = (hwirq >> 5) + (hwirq & 0x1f);
>
> --
> 2.23.0
>
prev parent reply other threads:[~2019-10-17 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 16:07 [PATCH] pci: iproc-msi: fix __iomem annotation in decode_msi_hwirq() Ben Dooks (Codethink)
2019-10-17 10:17 ` Lorenzo Pieralisi [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=20191017101720.GA9589@e121166-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=andrew.murray@arm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=ben.dooks@codethink.co.uk \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
/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).