Skip to contentSkip to conversation

rtnetlink: remove unused ifla_stats_policy

PATCH Applied Stephen Hemminger 3 participants 4 messages Sep 7, 2016 – Sep 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtnetlink: remove unused ifla_stats_policy

This structure is defined but never used. Flagged with W=1

net/core/rtnetlink.c +0 -4
@@ -3669,10 +3669,6 @@ nla_put_failure:
 	return -EMSGSIZE;
 }
 
-static const struct nla_policy ifla_stats_policy[IFLA_STATS_MAX + 1] = {
-	[IFLA_STATS_LINK_64]	= { .len = sizeof(struct rtnl_link_stats64) },
-};
-
 static size_t if_nlmsg_stats_size(const struct net_device *dev,
 				  u32 filter_mask)
 {
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Wed, 7 Sep 2016 13:57:36 -0700

Quoted 3 lines

This structure is defined but never used. Flagged with W=1

This comes from commit 10c9ead9f3c6bb24bddc9a96681f7d58e6623966 ("rtnetlink: add new RTM_GETSTATS message to dump link stats")

Roopa, did you intentionally put this here unreferenced for the purposes or documentation or something like that?

Acked-by
#2 lore raw
Quoted 11 lines · David Miller

From: Stephen Hemminger <[email protected]>
Date: Wed, 7 Sep 2016 13:57:36 -0700

Quoted 3 lines

This structure is defined but never used. Flagged with W=1

This comes from commit 10c9ead9f3c6bb24bddc9a96681f7d58e6623966 ("rtnetlink: add new RTM_GETSTATS message to dump link stats")

Roopa, did you intentionally put this here unreferenced for the purposes or documentation or something like that?

I went back and looked at all my submissions to remember why i had it. I don't seem to have used it anywhere...but i had expressed an intent to use it to parse filter attributes in incoming stats requests in my first few versions.

I possibly just forgot to drop it after i moved to a mask to filter incoming stats requests. thanks for checking...

and thanks stephen for cleaning this up.