]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm: Make drm_clflush_virt_range() void*
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 1 Apr 2014 09:59:08 +0000 (12:59 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 1 Apr 2014 20:58:29 +0000 (22:58 +0200)
Currently drm_cflush_virt_rage() takes a char* so the caller probably
has to do pointless casting to avoid compiler warnings. Make the
argument void* instead to avoid such issues.

v2: Use void* arithmetic (Chris)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_cache.c
include/drm/drmP.h

index bb8f58012189af7651c20c2d9b1da1ed390ebcfd..4bfad5f5a84385ff7301c5dbceed82cabdc08313 100644 (file)
@@ -125,11 +125,11 @@ drm_clflush_sg(struct sg_table *st)
 EXPORT_SYMBOL(drm_clflush_sg);
 
 void
-drm_clflush_virt_range(char *addr, unsigned long length)
+drm_clflush_virt_range(void *addr, unsigned long length)
 {
 #if defined(CONFIG_X86)
        if (cpu_has_clflush) {
-               char *end = addr + length;
+               void *end = addr + length;
                mb();
                for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
                        clflush(addr);
index daac00a93126c87d5787bfe59f7b61f6a95639cc..150780bdd66ba7222ec69372d6d91a54ecf6d8cc 100644 (file)
@@ -1322,7 +1322,7 @@ extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
 /* Cache management (drm_cache.c) */
 void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
 void drm_clflush_sg(struct sg_table *st);
-void drm_clflush_virt_range(char *addr, unsigned long length);
+void drm_clflush_virt_range(void *addr, unsigned long length);
 
                                /* Locking IOCTL support (drm_lock.h) */
 extern int drm_lock(struct drm_device *dev, void *data,