From patchwork Sat Dec 19 07:16:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 41463 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 74BADB70B3 for ; Sat, 19 Dec 2009 18:17:36 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbZLSHQ6 (ORCPT ); Sat, 19 Dec 2009 02:16:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751982AbZLSHQ4 (ORCPT ); Sat, 19 Dec 2009 02:16:56 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:49312 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbZLSHQy (ORCPT ); Sat, 19 Dec 2009 02:16:54 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 2F17919BBA9; Sat, 19 Dec 2009 08:16:54 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05852-04; Sat, 19 Dec 2009 08:16:53 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id 1153519BB9E; Sat, 19 Dec 2009 08:16:53 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 180DF6DFAB0; Sat, 19 Dec 2009 08:12:54 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id E942B4924; Sat, 19 Dec 2009 08:16:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id E2C3C4632; Sat, 19 Dec 2009 08:16:52 +0100 (CET) Date: Sat, 19 Dec 2009 08:16:52 +0100 (CET) From: Julia Lawall To: Divy Le Ray , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing Message-ID: MIME-Version: 1.0 X-Virus-Scanned: amavisd-new at diku.dk Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julia Lawall Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Julia Lawall Acked-by: Divy Le Ray --- drivers/net/cxgb3/cxgb3_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -p a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c --- a/drivers/net/cxgb3/cxgb3_offload.c 2009-09-14 14:55:49.000000000 +0200 +++ b/drivers/net/cxgb3/cxgb3_offload.c 2009-12-19 07:52:52.000000000 +0100 @@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapte struct mtutab mtutab; unsigned int l2t_capacity; - t = kcalloc(1, sizeof(*t), GFP_KERNEL); + t = kzalloc(sizeof(*t), GFP_KERNEL); if (!t) return -ENOMEM;