drm: use kvfree instead of opencoding
Subsystems (3)
Dave Airlie
maintainerPATCH 1/1 drm: use kvfree instead of opencoding
From: Dave Airlie <[email protected]>
Al Viro added this to the mm finally, so instead
of opencoding it use kvfree instead.
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_gem.c | 5 +---- include/drm/drm_mem_util.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +1 -4
@@ -552,10 +552,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,static inline void u_free (void *addr) { -if (!is_vmalloc_addr (addr)) -kfree (addr); -else -vfree (addr); +kvfree (addr); } static inline void *
include/drm/drm_mem_util.h +1 -4
@@ -56,10 +56,7 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)static __inlinevoid drm_free_large (void *ptr) { -if (!is_vmalloc_addr (ptr)) -return kfree (ptr); - -vfree (ptr); +kvfree (ptr); }#endif
Signature · 6 lines
1.9.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 34 lines · Dave Airlie
From: Dave Airlie <[email protected]>
Al Viro added this to the mm finally, so instead
of opencoding it use kvfree instead.Signed-off-by Dave Airlie <[email protected]>--- drivers/gpu/drm/nouveau/nouveau_gem.c | 5 +---- include/drm/drm_mem_util.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)drivers/gpu/drm/nouveau/nouveau_gem.c +1
-4@@ -552,10 +552,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,static inline void u_free (void *addr) { -if (!is_vmalloc_addr (addr)) -kfree (addr); -else -vfree (addr); +kvfree (addr); } static inline void *include/drm/drm_mem_util.h +0
-0@@ -56,10 +56,7 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
include/drm/drm_mem_util.h static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) · line 62
Quoted 10 lines
include/drm/drm_mem_util.h +1
-4static __inlinevoid drm_free_large (void *ptr) { -if (!is_vmalloc_addr (ptr)) -return kfree (ptr); - -vfree (ptr); +kvfree (ptr); }#endif
Any reason for keeping the u_free and drm_free_large wrappers?
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel