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/netlink.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/netlink.h')
-rw-r--r-- | include/net/netlink.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index cb1f3504687f..f394fe5d7641 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -441,41 +441,6 @@ static inline int nlmsg_report(const struct nlmsghdr *nlh) | |||
441 | nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \ | 441 | nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \ |
442 | nlmsg_attrlen(nlh, hdrlen), rem) | 442 | nlmsg_attrlen(nlh, hdrlen), rem) |
443 | 443 | ||
444 | #if 0 | ||
445 | /* FIXME: Enable once all users have been converted */ | ||
446 | |||
447 | /** | ||
448 | * __nlmsg_put - Add a new netlink message to an skb | ||
449 | * @skb: socket buffer to store message in | ||
450 | * @pid: netlink process id | ||
451 | * @seq: sequence number of message | ||
452 | * @type: message type | ||
453 | * @payload: length of message payload | ||
454 | * @flags: message flags | ||
455 | * | ||
456 | * The caller is responsible to ensure that the skb provides enough | ||
457 | * tailroom for both the netlink header and payload. | ||
458 | */ | ||
459 | static inline struct nlmsghdr *__nlmsg_put(struct sk_buff *skb, u32 pid, | ||
460 | u32 seq, int type, int payload, | ||
461 | int flags) | ||
462 | { | ||
463 | struct nlmsghdr *nlh; | ||
464 | |||
465 | nlh = (struct nlmsghdr *) skb_put(skb, nlmsg_total_size(payload)); | ||
466 | nlh->nlmsg_type = type; | ||
467 | nlh->nlmsg_len = nlmsg_msg_size(payload); | ||
468 | nlh->nlmsg_flags = flags; | ||
469 | nlh->nlmsg_pid = pid; | ||
470 | nlh->nlmsg_seq = seq; | ||
471 | |||
472 | memset((unsigned char *) nlmsg_data(nlh) + payload, 0, | ||
473 | nlmsg_padlen(payload)); | ||
474 | |||
475 | return nlh; | ||
476 | } | ||
477 | #endif | ||
478 | |||
479 | /** | 444 | /** |
480 | * nlmsg_put - Add a new netlink message to an skb | 445 | * nlmsg_put - Add a new netlink message to an skb |
481 | * @skb: socket buffer to store message in | 446 | * @skb: socket buffer to store message in |