Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbbFZHb5 (ORCPT ); Fri, 26 Jun 2015 03:31:57 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35574 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbbFZHbz (ORCPT ); Fri, 26 Jun 2015 03:31:55 -0400 Date: Fri, 26 Jun 2015 09:34:43 +0200 From: Daniel Vetter To: Maninder Singh Cc: airlied@linux.ie, alexander.deucher@amd.com, christian.koenig@amd.com, michel.daenzer@amd.com, monk.liu@amd.com, maarten.lankhorst@canonical.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, pankaj.m@samsung.com Subject: Re: [PATCH 1/1] gpu/drm: use kzalloc for allocating one thing Message-ID: <20150626073443.GU25769@phenom.ffwll.local> Mail-Followup-To: Maninder Singh , airlied@linux.ie, alexander.deucher@amd.com, christian.koenig@amd.com, michel.daenzer@amd.com, monk.liu@amd.com, maarten.lankhorst@canonical.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, pankaj.m@samsung.com References: <1435299850-48390-1-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435299850-48390-1-git-send-email-maninder1.s@samsung.com> X-Operating-System: Linux phenom 4.0.0-rc3+ User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1422 Lines: 44 On Fri, Jun 26, 2015 at 11:54:10AM +0530, Maninder Singh wrote: > Use kzalloc rather than kcalloc(1.. for allocating > one thing. > > Signed-off-by: Maninder Singh > Reviewed-by: Vaneet Narang Applied to drm-misc, thanks. -Daniel > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > index d3706a4..dd3415d 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > @@ -674,7 +674,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm) > return 0; > > if (gtt && gtt->userptr) { > - ttm->sg = kcalloc(1, sizeof(struct sg_table), GFP_KERNEL); > + ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL); > if (!ttm->sg) > return -ENOMEM; > > -- > 1.7.9.5 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch -- 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/