From: Carolyn Wyborny Date: Fri, 11 Apr 2014 02:20:44 +0000 (+0000) Subject: igb: Change memcpy to struct assignment X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a1f6347328f5ba1c64dd01ec2e9615e39be9301b;p=deliverable%2Flinux.git igb: Change memcpy to struct assignment This patch fixes issue found by updated coccicheck. Signed-off-by: Carolyn Wyborny Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 5e8c5cc3abc6..bfcda8a455f4 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -6499,7 +6499,7 @@ static void igb_reuse_rx_page(struct igb_ring *rx_ring, rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta : 0; /* transfer page from old buffer to new buffer */ - memcpy(new_buff, old_buff, sizeof(struct igb_rx_buffer)); + *new_buff = *old_buff; /* sync the buffer for use by the device */ dma_sync_single_range_for_device(rx_ring->dev, old_buff->dma,