i40evf: clean up memsets
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 13 Feb 2014 11:48:42 +0000 (03:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 22:27:28 +0000 (17:27 -0500)
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@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_adminq.c

index a50e6b3479ae9c779475681634535f1c8181f309..ed3902bf249b3e4ceb047ed14762d6ea50b1a4c0 100644 (file)
@@ -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;