lkml.org 
[lkml]   [2007]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 15/23] i915_irq.c: drm_calloc to drm_zalloc and bugfix
This patch does drm_calloc to drm_zalloc conversion. Also it
seems that unpatched version allocated wrong nr of bytes.

drm_i915_vbl_swap_t *vbl_swap;

...

sizeof(vbl_swap) vs. sizeof(*vbl_swap)

No?

Please review.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

drivers/char/drm/i915_irq.c | 15749 -> 15746 (-3 bytes)
drivers/char/drm/i915_irq.o | 128940 -> 128856 (-84 bytes)

drivers/char/drm/i915_irq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)


--- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/i915_irq.c
+++ linux-2.6.23-rc3-mm1/drivers/char/drm/i915_irq.c
@@ -541,8 +541,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
return DRM_ERR(EBUSY);
}

- vbl_swap = drm_calloc(1, sizeof(vbl_swap), DRM_MEM_DRIVER);
-
+ vbl_swap = drm_zalloc(sizeof(*vbl_swap), DRM_MEM_DRIVER);
if (!vbl_swap) {
DRM_ERROR("Failed to allocate memory to queue swap\n");
return DRM_ERR(ENOMEM);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-27 23:25    [W:0.157 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site