Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751898AbbFSEIZ (ORCPT ); Fri, 19 Jun 2015 00:08:25 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:34937 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbFSEIR (ORCPT ); Fri, 19 Jun 2015 00:08:17 -0400 X-AuditID: cbfee691-f79ca6d00000456a-e2-558395ab7a93 From: Maninder Singh To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, shannon.nelson@intel.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, matthew.vick@intel.com, john.ronciak@intel.com, mitch.a.williams@intel.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] ixgbe: use kzalloc for allocating one thing Date: Fri, 19 Jun 2015 09:37:55 +0530 Message-id: <1434686875-13040-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 2.1.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsWyRsSkWnf11OZQg7+LNC2aj35ltLiw6hqT xf9bv1ktTmy+z2ix//dsNotZk7YwWVzeNYfN4vD8NhaLPW+PM1nM+yxgcWyBmMW9N1uZLJZ/ 6GVz4PVYvOclk8fJ5lKPvi2rGD0+b5ILYInisklJzcksSy3St0vgytg8/yRjwWTOisUd09ka GG+zdzFycEgImEjcmiLfxcgJZIpJXLi3nq2LkYtDSGApo0T3gxksEAkTiest+xghEosYJX79 6oFyJjFJdCw9yQpSxSagJ7Fq1x4WkISIwE4miUlLVjCBrGAWcJKY/lUPpEZYwEFiTf8jsKks AqoSM+f3MIHYvALuEi+u72OH2CYncf74T2aQORICy9glnr2ZD9UgIPFt8iEWiLNlJTYdYIao l5Q4uOIGywRGwQWMDKsYRVMLkguKk9KLTPWKE3OLS/PS9ZLzczcxAkP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xVXRzzf0ZR6WvVf3yT/hMs9q4YWTj1++VDG07fv684aK/X5jiUXeVR1t gsbRJo8ez/bRq2Caas3r85tj1vY7Lj5KBtNn78kz8pldWMFTd4/DslqJpTgj0VCLuag4EQBT VAXmtwIAAA== 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: 1377 Lines: 44 Use kzalloc rather than kcalloc(1.. The semantic patch that makes this change is as follows: // @@ @@ - kcalloc(1, + kzalloc( ...) // and removing checkpatch below CHECK: CHECK: Prefer kzalloc(sizeof(*fwd_adapter)...) over kzalloc(sizeof(struct ixgbe_fwd_adapter)...) Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3bf2f3c..3f58757 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -8134,7 +8134,7 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev) (adapter->num_rx_pools > IXGBE_MAX_MACVLANS)) return ERR_PTR(-EBUSY); - fwd_adapter = kcalloc(1, sizeof(struct ixgbe_fwd_adapter), GFP_KERNEL); + fwd_adapter = kzalloc(sizeof(*fwd_adapter), GFP_KERNEL); if (!fwd_adapter) return ERR_PTR(-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/