From: Johannes Berg Date: Thu, 14 Nov 2013 16:14:47 +0000 (+0100) Subject: genetlink: make genl_ops flags a u8 and move to end X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f5ccd06aecd0eb1651dd451439d5cb365170854;p=linux-beck.git 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 Signed-off-by: David S. Miller --- 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) * @ops_list: operations list */ struct genl_ops { - u8 cmd; - u8 internal_flags; - unsigned int flags; const struct nla_policy *policy; int (*doit)(struct sk_buff *skb, struct genl_info *info); int (*dumpit)(struct sk_buff *skb, struct netlink_callback *cb); int (*done)(struct netlink_callback *cb); + u8 cmd; + u8 internal_flags; + u8 flags; }; int __genl_register_family(struct genl_family *family);