diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-30 15:22:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-30 15:22:06 -0500 |
commit | a46621a3a8f24557201a7ef62de151c812f8985c (patch) | |
tree | 9701dd51e082d600ce4b69ee4773805630ab0ada /include/net/genetlink.h | |
parent | 5de658f878d49e952d7b3f3f26a396132829f513 (diff) |
net: Deinline __nlmsg_put and genlmsg_put. -7k code on i386 defconfig.
text data bss dec hex filename
8455963 532732 1810804 10799499 a4c98b vmlinux.o.before
8448899 532732 1810804 10792435 a4adf3 vmlinux.o
This change also removes commented-out copy of __nlmsg_put
which was last touched in 2005 with "Enable once all users
have been converted" comment on top.
Changes in v2: rediffed against net-next.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 7db32995ccd3..ccb68880abf5 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -131,35 +131,8 @@ extern void genl_unregister_mc_group(struct genl_family *family, | |||
131 | extern void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, | 131 | extern void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, |
132 | u32 group, struct nlmsghdr *nlh, gfp_t flags); | 132 | u32 group, struct nlmsghdr *nlh, gfp_t flags); |
133 | 133 | ||
134 | /** | 134 | void *genlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, |
135 | * genlmsg_put - Add generic netlink header to netlink message | 135 | struct genl_family *family, int flags, u8 cmd); |
136 | * @skb: socket buffer holding the message | ||
137 | * @pid: netlink pid the message is addressed to | ||
138 | * @seq: sequence number (usually the one of the sender) | ||
139 | * @family: generic netlink family | ||
140 | * @flags netlink message flags | ||
141 | * @cmd: generic netlink command | ||
142 | * | ||
143 | * Returns pointer to user specific header | ||
144 | */ | ||
145 | static inline void *genlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, | ||
146 | struct genl_family *family, int flags, u8 cmd) | ||
147 | { | ||
148 | struct nlmsghdr *nlh; | ||
149 | struct genlmsghdr *hdr; | ||
150 | |||
151 | nlh = nlmsg_put(skb, pid, seq, family->id, GENL_HDRLEN + | ||
152 | family->hdrsize, flags); | ||
153 | if (nlh == NULL) | ||
154 | return NULL; | ||
155 | |||
156 | hdr = nlmsg_data(nlh); | ||
157 | hdr->cmd = cmd; | ||
158 | hdr->version = family->version; | ||
159 | hdr->reserved = 0; | ||
160 | |||
161 | return (char *) hdr + GENL_HDRLEN; | ||
162 | } | ||
163 | 136 | ||
164 | /** | 137 | /** |
165 | * genlmsg_nlhdr - Obtain netlink header from user specified header | 138 | * genlmsg_nlhdr - Obtain netlink header from user specified header |