netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxgb4: fix coccinelle warnings
@ 2015-03-10 12:14 Hariprasad Shenai
  2015-03-10 17:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Shenai @ 2015-03-10 12:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, leedom, anish, nirranjan, kumaras, swise,
	Hariprasad Shenai

Commit 16e47624e76b43db ("cxgb4: Add new scheme to update T4/T5 firmware")
introduced below coccinelle warning.

>> drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:994:2-8: Replace memcpy with
   struct assignment

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 1498d07..afbe168 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -1120,7 +1120,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
 		}
 
 		/* Installed successfully, update the cached header too. */
-		memcpy(card_fw, fs_fw, sizeof(*card_fw));
+		*card_fw = *fs_fw;
 		card_fw_usable = 1;
 		*reset = 0;	/* already reset as part of load_fw */
 	}
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cxgb4: fix coccinelle warnings
  2015-03-10 12:14 [PATCH] cxgb4: fix coccinelle warnings Hariprasad Shenai
@ 2015-03-10 17:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-03-10 17:42 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, leedom, anish, nirranjan, kumaras, swise

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Tue, 10 Mar 2015 17:44:52 +0530

> Commit 16e47624e76b43db ("cxgb4: Add new scheme to update T4/T5 firmware")
> introduced below coccinelle warning.
> 
>>> drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:994:2-8: Replace memcpy with
>    struct assignment
> 
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-10 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 12:14 [PATCH] cxgb4: fix coccinelle warnings Hariprasad Shenai
2015-03-10 17:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).