* [PATCH 3/4] igb/igb_ethtool.c : Remove unnecessary usages of memset.
@ 2020-07-14 19:41 Suraj Upadhyay
2020-07-28 20:49 ` Brown, Aaron F
0 siblings, 1 reply; 2+ messages in thread
From: Suraj Upadhyay @ 2020-07-14 19:41 UTC (permalink / raw)
To: jeffrey.t.kirsher, davem, kuba
Cc: intel-wired-lan, netdev, linux-kernel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 963 bytes --]
Replace memsets of 1 byte with simple assignment.
Issue found with checkpatch.pl
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index c2cf414d126b..6e8231c1ddf0 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -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,
--
2.17.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH 3/4] igb/igb_ethtool.c : Remove unnecessary usages of memset.
2020-07-14 19:41 [PATCH 3/4] igb/igb_ethtool.c : Remove unnecessary usages of memset Suraj Upadhyay
@ 2020-07-28 20:49 ` Brown, Aaron F
0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2020-07-28 20:49 UTC (permalink / raw)
To: Suraj Upadhyay, Kirsher, Jeffrey T, davem, kuba
Cc: intel-wired-lan, netdev, linux-kernel, kernel-janitors
> From: Suraj Upadhyay <usuraj35@gmail.com>
> Sent: Tuesday, July 14, 2020 12:42 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; davem@davemloft.net;
> kuba@kernel.org
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH 3/4] igb/igb_ethtool.c : Remove unnecessary usages of
> memset.
>
> Replace memsets of 1 byte with simple assignment.
> Issue found with checkpatch.pl
>
> Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-28 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 19:41 [PATCH 3/4] igb/igb_ethtool.c : Remove unnecessary usages of memset Suraj Upadhyay
2020-07-28 20:49 ` Brown, Aaron F
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).