* [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces
@ 2014-03-21 13:52 Matei Oprea
2014-03-21 14:01 ` Josh Cartwright
2014-03-21 14:04 ` Denis Kirjanov
0 siblings, 2 replies; 3+ messages in thread
From: Matei Oprea @ 2014-03-21 13:52 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Matei Oprea, ROSEdu Kernel Community
Fix different address spaces when unmapping IO. hi->addr_mapped[0]
and hi->addr_mapped[1] should be tagged __iomem.
Signed-off-by: Matei Oprea <eu@opreamatei.ro>
Cc: ROSEdu Kernel Community <firefly@lists.rosedu.org>
---
drivers/staging/cxt1e1/hwprobe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index 9b4198b..f55c27e 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -174,12 +174,12 @@ cleanup_ioremap(void)
if (hi->pci_slot == 0xff)
break;
if (hi->addr_mapped[0]) {
- iounmap((void *)(hi->addr_mapped[0]));
+ iounmap((void __iomem *)(hi->addr_mapped[0]));
release_mem_region((long) hi->addr[0], hi->len[0]);
hi->addr_mapped[0] = 0;
}
if (hi->addr_mapped[1]) {
- iounmap((void *)(hi->addr_mapped[1]));
+ iounmap((void __iomem *)(hi->addr_mapped[1]));
release_mem_region((long) hi->addr[1], hi->len[1]);
hi->addr_mapped[1] = 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces
2014-03-21 13:52 [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces Matei Oprea
@ 2014-03-21 14:01 ` Josh Cartwright
2014-03-21 14:04 ` Denis Kirjanov
1 sibling, 0 replies; 3+ messages in thread
From: Josh Cartwright @ 2014-03-21 14:01 UTC (permalink / raw)
To: Matei Oprea; +Cc: gregkh, devel, linux-kernel, ROSEdu Kernel Community
On Fri, Mar 21, 2014 at 03:52:23PM +0200, Matei Oprea wrote:
> Fix different address spaces when unmapping IO. hi->addr_mapped[0]
> and hi->addr_mapped[1] should be tagged __iomem.
>
> Signed-off-by: Matei Oprea <eu@opreamatei.ro>
> Cc: ROSEdu Kernel Community <firefly@lists.rosedu.org>
> ---
> drivers/staging/cxt1e1/hwprobe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
> index 9b4198b..f55c27e 100644
> --- a/drivers/staging/cxt1e1/hwprobe.c
> +++ b/drivers/staging/cxt1e1/hwprobe.c
> @@ -174,12 +174,12 @@ cleanup_ioremap(void)
> if (hi->pci_slot == 0xff)
> break;
> if (hi->addr_mapped[0]) {
> - iounmap((void *)(hi->addr_mapped[0]));
> + iounmap((void __iomem *)(hi->addr_mapped[0]));
While this may "fix" the sparse warning, it's far from ideal. Like I
had suggested on IRC, a much better cleanup would be to make the
addr_mapped member an array of __iomem-tagged pointers, and fixup the
users.
Josh
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces
2014-03-21 13:52 [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces Matei Oprea
2014-03-21 14:01 ` Josh Cartwright
@ 2014-03-21 14:04 ` Denis Kirjanov
1 sibling, 0 replies; 3+ messages in thread
From: Denis Kirjanov @ 2014-03-21 14:04 UTC (permalink / raw)
To: Matei Oprea; +Cc: gregkh, devel, ROSEdu Kernel Community, linux-kernel
On 3/21/14, Matei Oprea <eu@opreamatei.ro> wrote:
> Fix different address spaces when unmapping IO. hi->addr_mapped[0]
> and hi->addr_mapped[1] should be tagged __iomem.
>
> Signed-off-by: Matei Oprea <eu@opreamatei.ro>
> Cc: ROSEdu Kernel Community <firefly@lists.rosedu.org>
> ---
> drivers/staging/cxt1e1/hwprobe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/cxt1e1/hwprobe.c
> b/drivers/staging/cxt1e1/hwprobe.c
> index 9b4198b..f55c27e 100644
> --- a/drivers/staging/cxt1e1/hwprobe.c
> +++ b/drivers/staging/cxt1e1/hwprobe.c
> @@ -174,12 +174,12 @@ cleanup_ioremap(void)
> if (hi->pci_slot == 0xff)
> break;
> if (hi->addr_mapped[0]) {
> - iounmap((void *)(hi->addr_mapped[0]));
> + iounmap((void __iomem *)(hi->addr_mapped[0]));
> release_mem_region((long) hi->addr[0], hi->len[0]);
> hi->addr_mapped[0] = 0;
> }
> if (hi->addr_mapped[1]) {
> - iounmap((void *)(hi->addr_mapped[1]));
> + iounmap((void __iomem *)(hi->addr_mapped[1]));
> release_mem_region((long) hi->addr[1], hi->len[1]);
> hi->addr_mapped[1] = 0;
> }
__iomem annotations should be added to the private structure pointers.
Look at the iounmap usage in the drivers.
> --
> 1.7.9.5
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>
--
Regards,
Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-21 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 13:52 [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces Matei Oprea
2014-03-21 14:01 ` Josh Cartwright
2014-03-21 14:04 ` Denis Kirjanov
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.