netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ixgbe: use kzalloc for allocating one thing
@ 2015-06-19  4:07 Maninder Singh
  2015-09-02  2:24 ` [Intel-wired-lan] " Singh, Krishneil K
  0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2015-06-19  4:07 UTC (permalink / raw)
  To: jeffrey.t.kirsher, jesse.brandeburg, shannon.nelson,
	carolyn.wyborny, donald.c.skidmore, matthew.vick, john.ronciak,
	mitch.a.williams, intel-wired-lan, netdev, linux-kernel
  Cc: pankaj.m, Maninder Singh

Use kzalloc rather than kcalloc(1..

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

and removing checkpatch below CHECK:
CHECK: Prefer kzalloc(sizeof(*fwd_adapter)...) over 
kzalloc(sizeof(struct ixgbe_fwd_adapter)...)

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [Intel-wired-lan] [PATCH 1/1] ixgbe: use kzalloc for allocating one thing
  2015-06-19  4:07 [PATCH 1/1] ixgbe: use kzalloc for allocating one thing Maninder Singh
@ 2015-09-02  2:24 ` Singh, Krishneil K
  0 siblings, 0 replies; 2+ messages in thread
From: Singh, Krishneil K @ 2015-09-02  2:24 UTC (permalink / raw)
  To: Maninder Singh, Kirsher, Jeffrey T, Brandeburg, Jesse, Nelson,
	Shannon, Wyborny, Carolyn, Skidmore, Donald C, Vick, Matthew,
	Ronciak, John, Williams, Mitch A, intel-wired-lan, netdev,
	linux-kernel
  Cc: pankaj.m


-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On Behalf Of Maninder Singh
Sent: Thursday, June 18, 2015 9:08 PM
To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nelson, Shannon <shannon.nelson@intel.com>; Wyborny, Carolyn <carolyn.wyborny@intel.com>; Skidmore, Donald C <donald.c.skidmore@intel.com>; Vick, Matthew <matthew.vick@intel.com>; Ronciak, John <john.ronciak@intel.com>; Williams, Mitch A <mitch.a.williams@intel.com>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Cc: Maninder Singh <maninder1.s@samsung.com>; pankaj.m@samsung.com
Subject: [Intel-wired-lan] [PATCH 1/1] ixgbe: use kzalloc for allocating one thing

Use kzalloc rather than kcalloc(1..

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

and removing checkpatch below CHECK:
CHECK: Prefer kzalloc(sizeof(*fwd_adapter)...) over kzalloc(sizeof(struct ixgbe_fwd_adapter)...)

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 
Tested-By: Krishneil Singh <krishneil.k.singh@intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-02  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19  4:07 [PATCH 1/1] ixgbe: use kzalloc for allocating one thing Maninder Singh
2015-09-02  2:24 ` [Intel-wired-lan] " Singh, Krishneil K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).