From a63fa1cdb667609cd9f99435ecbbcda61861b38f Mon Sep 17 00:00:00 2001 From: Mitch Williams Date: Thu, 13 Feb 2014 03:48:42 -0800 Subject: [PATCH] i40evf: clean up memsets 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 Signed-off-by: Kevin Scott Signed-off-by: Jesse Brandeburg Tested-by: Kavindya Deegala Signed-off-by: Aaron Brown Signed-off-by: David S. Miller --- 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 a50e6b3479ae..ed3902bf249b 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; -- 2.20.1