[PATCH 10/23] drm_sman.c: drm_calloc to drm_zalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Mariusz Kozlowski <[email protected]>

 drivers/char/drm/drm_sman.c | 9108 -> 9094 (-14 bytes)
 drivers/char/drm/drm_sman.o | 104466 -> 103946 (-520 bytes)

 drivers/char/drm/drm_sman.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/drm_sman.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/drm_sman.c
@@ -130,10 +130,10 @@ drm_sman_set_range(struct drm_sman * sma
 	BUG_ON(manager >= sman->num_managers);

 	sman_mm = &sman->mm[manager];
-	mm = drm_calloc(1, sizeof(*mm), DRM_MEM_MM);
-	if (!mm) {
+	mm = drm_zalloc(sizeof(*mm), DRM_MEM_MM);
+	if (!mm)
 		return -ENOMEM;
-	}
+
 	sman_mm->private = mm;
 	ret = drm_mm_init(mm, start, size);

@@ -176,7 +176,7 @@ static struct drm_owner_item *drm_sman_g
 				      owner_hash);
 	}

-	owner_item = drm_calloc(1, sizeof(*owner_item), DRM_MEM_MM);
+	owner_item = drm_zalloc(sizeof(*owner_item), DRM_MEM_MM);
 	if (!owner_item)
 		goto out;

@@ -212,8 +212,7 @@ struct drm_memblock_item *drm_sman_alloc
 		return NULL;
 	}

-	memblock = drm_calloc(1, sizeof(*memblock), DRM_MEM_MM);
-
+	memblock = drm_zalloc(sizeof(*memblock), DRM_MEM_MM);
 	if (!memblock)
 		goto out;

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux