net: gro: Fix a 'directive in macro's argument list' sparse warning
Subsystems (2)
PATCH v2 1/1 net: gro: Fix a 'directive in macro's argument list' sparse warning
Following the cited commit, sparse started complaining about:../include/net/gro.h:58:1: warning: directive in macro's argument list ../include/net/gro.h:59:1: warning: directive in macro's argument list
Fix that by moving the defines out of the struct_group() macro.
---
Changelog -v1->v2: https://lore.kernel.org/netdev/[email protected]/
* Add a comment and fix alignment
--- include/net/gro.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/net/gro.h +3 -2
@@ -35,6 +35,9 @@ struct napi_gro_cb {/* jiffies when first packet was created/queued */ unsigned long age; +/* Used in napi_gro_cb::free */ +#define NAPI_GRO_FREE 1 +#define NAPI_GRO_FREE_STOLEN_HEAD 2/* portion of the cb set to zero at every gro iteration */ struct_group(zeroed,
@@ -55,8 +58,6 @@ struct napi_gro_cb {/* Free the skb? */ u8 free:2; -#define NAPI_GRO_FREE 1 -#define NAPI_GRO_FREE_STOLEN_HEAD 2/* Used in foo-over-udp, set in udp[46]_gro_receive */ u8 is_ipv6:1;
Signature · 1 line
2.25.1
Quoted 33 lines · Gal Pressman
Following the cited commit, sparse started complaining about:
../include/net/gro.h:58:1: warning: directive in macro's argument list../include/net/gro.h:59:1: warning: directive in macro's argument listFix that by moving the defines out of the
struct_group()macro.Fixes de5a1f3ce4c8 ("net: gro: minor optimization for dev_gro_receive()")Reviewed-by Maxim Mikityanskiy <[email protected]>Signed-off-by Gal Pressman <[email protected]>---
Changelog -v1->v2: https://lore.kernel.org/netdev/[email protected]/
* Add a comment and fix alignment--- include/net/gro.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)include/net/gro.h +3
-0@@ -35,6 +35,9 @@ struct napi_gro_cb {/* jiffies when first packet was created/queued */ unsigned long age; +/* Used in napi_gro_cb::free */ +#define NAPI_GRO_FREE 1 +#define NAPI_GRO_FREE_STOLEN_HEAD 2/* portion of the cb set to zero at every gro iteration */ struct_group(zeroed,
include/net/gro.h struct napi_gro_cb { · line 63
Quoted 8 lines
include/net/gro.h +0
-2@@ -55,8 +58,6 @@ struct napi_gro_cb {/* Free the skb? */ u8 free:2; -#define NAPI_GRO_FREE 1 -#define NAPI_GRO_FREE_STOLEN_HEAD 2/* Used in foo-over-udp, set in udp[46]_gro_receive */ u8 is_ipv6:1;
LGTM, thanks!
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 4 lines · On Thu, 17 Feb 2022 10:07:55 +0200 you wrote:
Following the cited commit, sparse started complaining about:
../include/net/gro.h:58:1: warning: directive in macro's argument list../include/net/gro.h:59:1: warning: directive in macro's argument list
Quoted 8 lines
Fix that by moving the defines out of the
struct_group()macro.Fixes de5a1f3ce4c8 ("net: gro: minor optimization for dev_gro_receive()")Reviewed-by Maxim Mikityanskiy <[email protected]>Signed-off-by Gal Pressman <[email protected]>[...]
Here is the summary with links:
- [net-next,v2] net: gro: Fix a 'directive in macro's argument list' sparse warning
https://git.kernel.org/netdev/net-next/c/8467fadc115c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html