]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ravb: Combine if conditions in RX csum validation
authorPaul Barker <paul.barker.ct@bp.renesas.com>
Tue, 15 Oct 2024 13:36:28 +0000 (14:36 +0100)
committerAndrew Lunn <andrew@lunn.ch>
Fri, 18 Oct 2024 02:24:24 +0000 (21:24 -0500)
commit5a2d973e36061cbf8d1ba00a9294244522715e53
tree30e5676d301de3754c32dd0bf845be2eb630f62a
parent8d2109c1a51525c3586c5bf6f78ab1ce3c2908f8
net: ravb: Combine if conditions in RX csum validation

We can merge the two if conditions on skb_is_nonlinear(). Since
skb_frag_size_sub() and skb_trim() do not free memory, it is still safe
to access the trimmed bytes at the end of the packet after these calls.

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
drivers/net/ethernet/renesas/ravb_main.c