Skip to content

Commit

Permalink
staging: qlge: qlge_ethtool: Remove one byte memset.
Browse files Browse the repository at this point in the history
Use direct assignment instead of using memset with just one byte as an
argument.
Issue found by checkpatch.pl.

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/b5eb87576cef4bf1b968481d6341013e6c7e9650.1594642213.git.usuraj35@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Suraj Upadhyay authored and Greg Kroah-Hartman committed Jul 13, 2020
1 parent 45170f1 commit caaba08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/qlge/qlge_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ static void ql_create_lb_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] = (unsigned char)0xBE;
skb->data[frame_size / 2 + 12] = (unsigned char)0xAF;
}

void ql_check_lb_frame(struct ql_adapter *qdev,
Expand Down

0 comments on commit caaba08

Please sign in to comment.