mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
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>
This commit is contained in:
parent
5de658f878
commit
a46621a3a8
5 changed files with 53 additions and 80 deletions
|
@ -441,41 +441,6 @@ static inline int nlmsg_report(const struct nlmsghdr *nlh)
|
|||
nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \
|
||||
nlmsg_attrlen(nlh, hdrlen), rem)
|
||||
|
||||
#if 0
|
||||
/* FIXME: Enable once all users have been converted */
|
||||
|
||||
/**
|
||||
* __nlmsg_put - Add a new netlink message to an skb
|
||||
* @skb: socket buffer to store message in
|
||||
* @pid: netlink process id
|
||||
* @seq: sequence number of message
|
||||
* @type: message type
|
||||
* @payload: length of message payload
|
||||
* @flags: message flags
|
||||
*
|
||||
* The caller is responsible to ensure that the skb provides enough
|
||||
* tailroom for both the netlink header and payload.
|
||||
*/
|
||||
static inline struct nlmsghdr *__nlmsg_put(struct sk_buff *skb, u32 pid,
|
||||
u32 seq, int type, int payload,
|
||||
int flags)
|
||||
{
|
||||
struct nlmsghdr *nlh;
|
||||
|
||||
nlh = (struct nlmsghdr *) skb_put(skb, nlmsg_total_size(payload));
|
||||
nlh->nlmsg_type = type;
|
||||
nlh->nlmsg_len = nlmsg_msg_size(payload);
|
||||
nlh->nlmsg_flags = flags;
|
||||
nlh->nlmsg_pid = pid;
|
||||
nlh->nlmsg_seq = seq;
|
||||
|
||||
memset((unsigned char *) nlmsg_data(nlh) + payload, 0,
|
||||
nlmsg_padlen(payload));
|
||||
|
||||
return nlh;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* nlmsg_put - Add a new netlink message to an skb
|
||||
* @skb: socket buffer to store message in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue