nouveau: __iomem misannotations
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 31 Aug 2014 19:06:09 +0000 (15:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 Oct 2014 06:39:11 +0000 (02:39 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/gpu/drm/nouveau/nouveau_nvif.c
drivers/gpu/drm/nouveau/nvif/driver.h
drivers/gpu/drm/nouveau/nvif/object.h

index 47ca886237530c50fa9f6788ba86ac288487800b..6544b84f03034716e6e465f97366cba1151707ff 100644 (file)
 #include "nouveau_usif.h"
 
 static void
-nvkm_client_unmap(void *priv, void *ptr, u32 size)
+nvkm_client_unmap(void *priv, void __iomem *ptr, u32 size)
 {
        iounmap(ptr);
 }
 
-static void *
+static void __iomem *
 nvkm_client_map(void *priv, u64 handle, u32 size)
 {
        return ioremap(handle, size);
index b72a8f0c2758e56ce866717cb0e1a90d0aa027d0..ac4bdb3ea506c518cf87eefc3c2e793cbc8bc23f 100644 (file)
@@ -9,8 +9,8 @@ struct nvif_driver {
        int (*suspend)(void *priv);
        int (*resume)(void *priv);
        int (*ioctl)(void *priv, bool super, void *data, u32 size, void **hack);
-       void *(*map)(void *priv, u64 handle, u32 size);
-       void (*unmap)(void *priv, void *ptr, u32 size);
+       void __iomem *(*map)(void *priv, u64 handle, u32 size);
+       void (*unmap)(void *priv, void __iomem *ptr, u32 size);
        bool keep;
 };
 
index fac3a3bbec44e15b9cc8f7a673f86a6550486635..fe519179b76c7d146d0a882400431dd1f44ec53b 100644 (file)
@@ -14,7 +14,7 @@ struct nvif_object {
        void *priv; /*XXX: hack */
        void (*dtor)(struct nvif_object *);
        struct {
-               void *ptr;
+               void __iomem *ptr;
                u32 size;
        } map;
 };
@@ -42,7 +42,7 @@ void nvif_object_unmap(struct nvif_object *);
        struct nvif_object *_object = nvif_object(a);                          \
        u32 _data;                                                             \
        if (likely(_object->map.ptr))                                          \
-               _data = ioread##b##_native((u8 *)_object->map.ptr + (c));      \
+               _data = ioread##b##_native((u8 __iomem *)_object->map.ptr + (c));      \
        else                                                                   \
                _data = nvif_object_rd(_object, (b) / 8, (c));                 \
        _data;                                                                 \
@@ -50,7 +50,7 @@ void nvif_object_unmap(struct nvif_object *);
 #define nvif_wr(a,b,c,d) ({                                                    \
        struct nvif_object *_object = nvif_object(a);                          \
        if (likely(_object->map.ptr))                                          \
-               iowrite##b##_native((d), (u8 *)_object->map.ptr + (c));        \
+               iowrite##b##_native((d), (u8 __iomem *)_object->map.ptr + (c));        \
        else                                                                   \
                nvif_object_wr(_object, (b) / 8, (c), (d));                    \
 })