netpoll: Improve code clarity with explicit struct size calculations
authorBreno Leitao <leitao@debian.org>
Wed, 2 Jul 2025 10:06:33 +0000 (03:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 01:52:55 +0000 (18:52 -0700)
commit4b52cdfcce21d3cc207a1ddb691e1f8c1fcda6fc
tree8caa8a595dde84f59cca8c80356d5270ce84f2a5
parent49402a628e959c1cb42c0b3bd9336b20f358c632
netpoll: Improve code clarity with explicit struct size calculations

Replace pointer-dereference sizeof() operations with explicit struct names
for improved readability and maintainability. This change:

1. Replaces `sizeof(*udph)` with `sizeof(struct udphdr)`
2. Replaces `sizeof(*ip6h)` with `sizeof(struct ipv6hdr)`
3. Replaces `sizeof(*iph)` with `sizeof(struct iphdr)`

This will make it easy to move code in the upcoming patches.

No functional changes are introduced by this patch.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250702-netpoll_untagle_ip-v2-1-13cf3db24e2b@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/netpoll.c