mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
To: <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>
Cc: <bhelgaas@google.com>, <gwshan@linux.vnet.ibm.com>,
	Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
Subject: [PATCH] pci: add missing __iomem cast
Date: Wed, 19 Jul 2017 13:05:35 +0100	[thread overview]
Message-ID: <20170719120535.26350-1-palminha@synopsys.com> (raw)

Add missing __iomem annotation to fix sparse warning:
- incorrect type in return expression (different address spaces)

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 drivers/pci/rom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index b6edb187d160..fa92d8fe6778 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -193,7 +193,7 @@ void __iomem *pci_platform_rom(struct pci_dev *pdev, size_t *size)
 {
 	if (pdev->rom && pdev->romlen) {
 		*size = pdev->romlen;
-		return phys_to_virt((phys_addr_t)pdev->rom);
+		return (void __iomem *)phys_to_virt((phys_addr_t)pdev->rom);
 	}

 	return NULL;
--
2.11.0

             reply	other threads:[~2017-07-19 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 12:05 Carlos Palminha [this message]
2017-07-20  8:07 ` Christoph Hellwig
2017-07-21 11:38   ` Carlos Palminha

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=20170719120535.26350-1-palminha@synopsys.com \
    --to=carlos.palminha@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®