* [PATCH] pci: add missing __iomem cast
@ 2017-07-19 12:05 Carlos Palminha
2017-07-20 8:07 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Palminha @ 2017-07-19 12:05 UTC (permalink / raw)
To: linux-kernel, linux-pci; +Cc: bhelgaas, gwshan, Carlos Palminha
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: add missing __iomem cast
2017-07-19 12:05 [PATCH] pci: add missing __iomem cast Carlos Palminha
@ 2017-07-20 8:07 ` Christoph Hellwig
2017-07-21 11:38 ` Carlos Palminha
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2017-07-20 8:07 UTC (permalink / raw)
To: Carlos Palminha; +Cc: linux-kernel, linux-pci, bhelgaas, gwshan
On Wed, Jul 19, 2017 at 01:05:35PM +0100, Carlos Palminha wrote:
> Add missing __iomem annotation to fix sparse warning:
> - incorrect type in return expression (different address spaces)
How is this going to shut up sparse without a __force?
And once you add the __force please also add a comment explaining
why it's safe.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: add missing __iomem cast
2017-07-20 8:07 ` Christoph Hellwig
@ 2017-07-21 11:38 ` Carlos Palminha
0 siblings, 0 replies; 3+ messages in thread
From: Carlos Palminha @ 2017-07-21 11:38 UTC (permalink / raw)
To: Christoph Hellwig, Carlos Palminha
Cc: linux-kernel, linux-pci, bhelgaas, gwshan
Hi Christoph,
Looking deep into to this, i think there is no need to use phy_to_virts since pdev->rom is already a physical address.
That's what pci_platform_rom should return, right?!
I'll probably send a new patch removing the usage of phys_to_virt.
Regards,
C.Palminha
On 20-07-2017 09:07, Christoph Hellwig wrote:
> On Wed, Jul 19, 2017 at 01:05:35PM +0100, Carlos Palminha wrote:
>> Add missing __iomem annotation to fix sparse warning:
>> - incorrect type in return expression (different address spaces)
>
> How is this going to shut up sparse without a __force?
>
> And once you add the __force please also add a comment explaining
> why it's safe.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-21 11:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 12:05 [PATCH] pci: add missing __iomem cast Carlos Palminha
2017-07-20 8:07 ` Christoph Hellwig
2017-07-21 11:38 ` Carlos Palminha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.