lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers: staging: cxt1e1: hwprobe Fix different address spaces
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


\
 
 \ /
  Last update: 2014-03-21 16:01    [W:0.052 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site