Skip to content

Commit a1f6347

Browse files
Carolyn WybornyJeff Kirsher
authored andcommitted
igb: Change memcpy to struct assignment
This patch fixes issue found by updated coccicheck. Signed-off-by: Carolyn Wyborny <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent f6f38e2 commit a1f6347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6499,7 +6499,7 @@ static void igb_reuse_rx_page(struct igb_ring *rx_ring,
64996499
rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta : 0;
65006500

65016501
/* transfer page from old buffer to new buffer */
6502-
memcpy(new_buff, old_buff, sizeof(struct igb_rx_buffer));
6502+
*new_buff = *old_buff;
65036503

65046504
/* sync the buffer for use by the device */
65056505
dma_sync_single_range_for_device(rx_ring->dev, old_buff->dma,

0 commit comments

Comments
 (0)