GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values
authorJesper Juhl <jj@chaosbits.net>
Mon, 8 Nov 2010 23:08:25 +0000 (00:08 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 19 Jan 2011 14:24:49 +0000 (15:24 +0100)
The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from drivers/gpu/drm/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/gpu/drm/drm_sman.c

index 463aed9..3466458 100644 (file)
@@ -59,9 +59,7 @@ drm_sman_init(struct drm_sman * sman, unsigned int num_managers,
 {
        int ret = 0;
 
-       sman->mm = (struct drm_sman_mm *) kcalloc(num_managers,
-                                                 sizeof(*sman->mm),
-                                                 GFP_KERNEL);
+       sman->mm = kcalloc(num_managers, sizeof(*sman->mm), GFP_KERNEL);
        if (!sman->mm) {
                ret = -ENOMEM;
                goto out;