Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018AbbFZIBK (ORCPT ); Fri, 26 Jun 2015 04:01:10 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:47582 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbbFZIBA (ORCPT ); Fri, 26 Jun 2015 04:01:00 -0400 X-AuditID: cbfee68f-f793b6d000005f66-b9-558d06bb9022 From: Maninder Singh To: 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 Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH v2] drm/amdgpu: use kzalloc for allocating one thing Date: Fri, 26 Jun 2015 13:28:50 +0530 Message-id: <1435305530-8011-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsWyRsSkRnc3W2+owe1T0ha9504yWUy7s5vV 4u19IHHl63s2i8u75rBZPH16gc3i8Pw2FosZs9+wWpy9qGtx781WJgcuj9ZLf9k8ZjX0snls //aA1eN+93Emj74tqxg9Pm+SC2CL4rJJSc3JLEst0rdL4Mp4tC+loJO94uKPg2wNjH9Yuxg5 OSQETCQmNV9jh7DFJC7cW8/WxcjFISSwlFHi8aFXTDBFfw/uArOFBKYzSvx6rAtR9JNRon3b PxaQBJuAnsSqXXtYQBIiAtcZJRbMeM/cxcjBwSzgJDH9qx5IjbCAi8Splvdg21gEVCU2TP7M AlLCK+Am0T5ZBsSUEFCQmDPJBmSKhMB0donpC94xQZQLSHybfIgFokZWYtMBZojTJCUOrrjB MoFRcAEjwypG0dSC5ILipPQiY73ixNzi0rx0veT83E2MwLA+/e9Z/w7GuwesDzEKcDAq8fAG 3OkJFWJNLCuuzD3EaAq0YSKzlGhyPjB68k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2qPVUaa+P 2OgmEDijTOlrvcHSAmY7gadbvUM+1HKK/dLyjtx1cEviTSWW4oxEQy3mouJEABTQ5n2wAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 33 Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang Reviewed-by: Christian Konig --- v2: Chnged shortlog prefix - gpu/amdgpu 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 -- 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/