]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
igb: Remove unnecessary usages of memset
authorSuraj Upadhyay <usuraj35@gmail.com>
Tue, 14 Jul 2020 19:41:47 +0000 (01:11 +0530)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 30 Jul 2020 17:51:25 +0000 (10:51 -0700)
Replace memsets of 1 byte with simple assignment.
Issue found with checkpatch.pl

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb_ethtool.c

index c2cf414d126b1a6e88ce65cf593288f6e02d0b7c..6e8231c1ddf0ab0dc75237da62cf93465b6ec085 100644 (file)
@@ -1782,8 +1782,8 @@ static void igb_create_lbtest_frame(struct sk_buff *skb,
        memset(skb->data, 0xFF, frame_size);
        frame_size /= 2;
        memset(&skb->data[frame_size], 0xAA, frame_size - 1);
-       memset(&skb->data[frame_size + 10], 0xBE, 1);
-       memset(&skb->data[frame_size + 12], 0xAF, 1);
+       skb->data[frame_size + 10] = 0xBE;
+       skb->data[frame_size + 12] = 0xAF;
 }
 
 static int igb_check_lbtest_frame(struct igb_rx_buffer *rx_buffer,