Commit a63fa1cd authored by Mitch Williams's avatar Mitch Williams Committed by David S. Miller

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: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarKevin Scott <kevin.c.scott@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af1a2a9c
...@@ -647,9 +647,8 @@ static u16 i40e_clean_asq(struct i40e_hw *hw) ...@@ -647,9 +647,8 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)
desc_cb = *desc; desc_cb = *desc;
cb_func(hw, &desc_cb); cb_func(hw, &desc_cb);
} }
memset((void *)desc, 0, sizeof(struct i40e_aq_desc)); memset(desc, 0, sizeof(*desc));
memset((void *)details, 0, memset(details, 0, sizeof(*details));
sizeof(struct i40e_asq_cmd_details));
ntc++; ntc++;
if (ntc == asq->count) if (ntc == asq->count)
ntc = 0; ntc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment