projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dec64ff
)
ice: replace unnecessary memcpy with direct assignment
author
Bruce Allan
<
[email protected]
>
Thu, 20 Sep 2018 00:23:05 +0000
(17:23 -0700)
committer
Jeff Kirsher
<
[email protected]
>
Thu, 27 Sep 2018 15:06:57 +0000
(08:06 -0700)
Direct assignment is preferred over a memcpy()
Signed-off-by: Bruce Allan <
[email protected]
>
Signed-off-by: Anirudh Venkataramanan <
[email protected]
>
Tested-by: Andrew Bowers <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
drivers/net/ethernet/intel/ice/ice_controlq.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/ice/ice_controlq.c
b/drivers/net/ethernet/intel/ice/ice_controlq.c
index 3c736b90a6bf6c6f3489045ecda5dde3c862306b..6cd86cff6a23858d87711124c80dd6f7ade95928 100644
(file)
--- 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,
details = ICE_CTL_Q_DETAILS(cq->sq, cq->sq.next_to_use);
if (cd)
-
memcpy(details, cd, sizeof(*details))
;
+
*details = *cd
;
else
memset(details, 0, sizeof(*details));