diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2018-09-19 20:23:05 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-09-27 11:06:57 -0400 |
commit | daca32a2aa05686065d493fc49f316a5a21afb85 (patch) | |
tree | e2f3824d49abec2df687305bbc85d8a90c141111 /drivers/net/ethernet/intel/ice/ice_controlq.c | |
parent | dec64ff10ed9a2b7ba33be924e3b8329d169fb3f (diff) |
ice: replace unnecessary memcpy with direct assignment
Direct assignment is preferred over a memcpy()
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_controlq.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_controlq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c index 3c736b90a6bf..6cd86cff6a23 100644 --- a/drivers/net/ethernet/intel/ice/ice_controlq.c +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c | |||
@@ -850,7 +850,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq, | |||
850 | 850 | ||
851 | details = ICE_CTL_Q_DETAILS(cq->sq, cq->sq.next_to_use); | 851 | details = ICE_CTL_Q_DETAILS(cq->sq, cq->sq.next_to_use); |
852 | if (cd) | 852 | if (cd) |
853 | memcpy(details, cd, sizeof(*details)); | 853 | *details = *cd; |
854 | else | 854 | else |
855 | memset(details, 0, sizeof(*details)); | 855 | memset(details, 0, sizeof(*details)); |
856 | 856 | ||