This patch does the conversion of drm_alloc + memset to drm_zalloc. The memset in loop is also superfluous and can be removed.
Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]> drivers/char/drm/drm_dma.c | 4624 -> 4475 (-149 bytes) drivers/char/drm/drm_dma.o | 104277 -> 103917 (-360 bytes) drivers/char/drm/drm_dma.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) --- linux-2.6.23-rc3-mm1.orig/drivers/char/drm/drm_dma.c +++ linux-2.6.23-rc3-mm1/drivers/char/drm/drm_dma.c @@ -45,17 +45,10 @@ */ int drm_dma_setup(struct drm_device *dev) { - int i; - - dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER); + dev->dma = drm_zalloc(sizeof(*dev->dma), DRM_MEM_DRIVER); if (!dev->dma) return -ENOMEM; - memset(dev->dma, 0, sizeof(*dev->dma)); - - for (i = 0; i <= DRM_MAX_ORDER; i++) - memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); - return 0; } -- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel