[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1392292133-32120-5-git-send-email-aaron.f.brown@intel.com>
Date: Thu, 13 Feb 2014 03:48:42 -0800
From: Aaron Brown <aaron.f.brown@...el.com>
To: davem@...emloft.net
Cc: Mitch Williams <mitch.a.williams@...el.com>,
netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com,
Kevin Scott <kevin.c.scott@...el.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Aaron Brown <aaron.f.brown@...el.com>
Subject: [net-next 04/15] i40evf: clean up memsets
From: Mitch Williams <mitch.a.williams@...el.com>
As politely pointed out by Dave Miller, calls to memset do not need a
void pointer cast. Additionally, it is preferred to use sizeof(*the
actual object) instead of sizeof(type).
Change-ID: Id6a02429b7040111531f3865ea03fbe619167cb3
Signed-off-by: Mitch Williams <mitch.a.williams@...el.com>
Signed-off-by: Kevin Scott <kevin.c.scott@...el.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@...el.com>
Signed-off-by: Aaron Brown <aaron.f.brown@...el.com>
---
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index a50e6b3..ed3902b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -647,9 +647,8 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)
desc_cb = *desc;
cb_func(hw, &desc_cb);
}
- memset((void *)desc, 0, sizeof(struct i40e_aq_desc));
- memset((void *)details, 0,
- sizeof(struct i40e_asq_cmd_details));
+ memset(desc, 0, sizeof(*desc));
+ memset(details, 0, sizeof(*details));
ntc++;
if (ntc == asq->count)
ntc = 0;
--
1.8.5.GIT
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists