e1000: Remove unnecessary usages of memset
authorSuraj Upadhyay <usuraj35@gmail.com>
Tue, 14 Jul 2020 19:40:35 +0000 (01:10 +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 assignments.
Issue reported by 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/e1000/e1000_ethtool.c

index 0b4196d..f976e9d 100644 (file)
@@ -1356,8 +1356,8 @@ static void e1000_create_lbtest_frame(struct sk_buff *skb,
        memset(skb->data, 0xFF, frame_size);
        frame_size &= ~1;
        memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1);
-       memset(&skb->data[frame_size / 2 + 10], 0xBE, 1);
-       memset(&skb->data[frame_size / 2 + 12], 0xAF, 1);
+       skb->data[frame_size / 2 + 10] = 0xBE;
+       skb->data[frame_size / 2 + 12] = 0xAF;
 }
 
 static int e1000_check_lbtest_frame(const unsigned char *data,