diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-11-14 11:14:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-14 17:10:41 -0500 |
commit | 3f5ccd06aecd0eb1651dd451439d5cb365170854 (patch) | |
tree | 422a5d96f5a43193e7792ec93bb6faf10b85dc87 /include | |
parent | 4534de8305b3f1460a527a0cda0e3dc2224c6f0c (diff) |
genetlink: make genl_ops flags a u8 and move to end
To save some space in the struct on 32-bit systems,
make the flags a u8 (only 4 bits are used) and also
move them to the end of the struct.
This has no impact on 64-bit systems as alignment of
the struct in an array uses up the space anyway.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/genetlink.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index d87486aa0611..0b6a144468c6 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -112,15 +112,15 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net) | |||
112 | * @ops_list: operations list | 112 | * @ops_list: operations list |
113 | */ | 113 | */ |
114 | struct genl_ops { | 114 | struct genl_ops { |
115 | u8 cmd; | ||
116 | u8 internal_flags; | ||
117 | unsigned int flags; | ||
118 | const struct nla_policy *policy; | 115 | const struct nla_policy *policy; |
119 | int (*doit)(struct sk_buff *skb, | 116 | int (*doit)(struct sk_buff *skb, |
120 | struct genl_info *info); | 117 | struct genl_info *info); |
121 | int (*dumpit)(struct sk_buff *skb, | 118 | int (*dumpit)(struct sk_buff *skb, |
122 | struct netlink_callback *cb); | 119 | struct netlink_callback *cb); |
123 | int (*done)(struct netlink_callback *cb); | 120 | int (*done)(struct netlink_callback *cb); |
121 | u8 cmd; | ||
122 | u8 internal_flags; | ||
123 | u8 flags; | ||
124 | }; | 124 | }; |
125 | 125 | ||
126 | int __genl_register_family(struct genl_family *family); | 126 | int __genl_register_family(struct genl_family *family); |