Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbbFSEFq (ORCPT ); Fri, 19 Jun 2015 00:05:46 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:45468 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbbFSEFi (ORCPT ); Fri, 19 Jun 2015 00:05:38 -0400 X-AuditID: cbfee68d-f79106d00000728c-3b-5583950f3231 From: Maninder Singh To: alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] drm/radeon: use kzalloc for allocating one thing Date: Fri, 19 Jun 2015 09:35:23 +0530 Message-id: <1434686723-12936-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 2.1.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsWyRsSkSpd/anOowYuXJha9504yWUy7s5vV 4u19IHHl63s2i8u75rBZHJ7fxmJx781WJgd2j9ZLf9k8tn97wOpxv/s4k0ffllWMHp83yQWw RnHZpKTmZJalFunbJXBlzP7BUjCbveLh03/MDYzvWbsYOTkkBEwknl7cwwJhi0lcuLeerYuR i0NIYCmjRMeilXBFt35dZ4RILGKUWPD8FQuEM4lJ4vXTV8wgVWwCehKrdu0BS4gIdDFKPPh+ Aaidg4NZwEli+lc9kBphAVeJ1l/LGUFsFgFVia1rZoGt5hVwl9hz6zgTxDY5ifPHfzKDzJEQ +M8m8fDcMqgGAYlvkw+xgMyUEJCV2HSAGaJeUuLgihssExgFFzAyrGIUTS1ILihOSi8y1CtO zC0uzUvXS87P3cQIDNvT/5717mC8fcD6EKMAB6MSD+/k7uZQIdbEsuLK3EOMpkAbJjJLiSbn A6MjryTe0NjMyMLUxNTYyNzSTEmcV1HqZ7CQQHpiSWp2ampBalF8UWlOavEhRiYOTqkGRhEt x+dKc2L0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X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 41 Use kzalloc for allocating one thing rather than kcalloc(1... The semantic patch that makes this change is as follows: // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index edafd3c..06ac59f 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -719,7 +719,7 @@ static int radeon_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.1 -- 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/