From: Anirudh Venkataramanan Date: Wed, 28 Sep 2022 22:42:10 +0000 (-0700) Subject: ixgbe: Remove local variable X-Git-Tag: v6.6.7~3913^2~263^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a6f9e3e03aec34fa0eb3c3efca6da777c57187a;p=platform%2Fkernel%2Flinux-starfive.git ixgbe: Remove local variable Remove local variable "match" and directly return evaluated conditional instead. Suggested-by: Alexander Duyck Signed-off-by: Anirudh Venkataramanan Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index d737e85..6cfc9dc 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -1996,18 +1996,13 @@ static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer, unsigned int frame_size) { unsigned char *data; - bool match = true; frame_size >>= 1; data = page_address(rx_buffer->page) + rx_buffer->page_offset; - if (data[3] != 0xFF || - data[frame_size + 10] != 0xBE || - data[frame_size + 12] != 0xAF) - match = false; - - return match; + return data[3] == 0xFF && data[frame_size + 10] == 0xBE && + data[frame_size + 12] == 0xAF; } static u16 ixgbe_clean_test_rings(struct ixgbe_ring *rx_ring,