Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ieee1394: eth1394: reduce excessive function inlining

Shrinks eth1394.ko by about 5%.

Many of these functions have only one caller and are therefore auto-
inlined anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+36 -38
+36 -38
drivers/ieee1394/eth1394.c
··· 820 820 ******************************************/ 821 821 822 822 /* Copied from net/ethernet/eth.c */ 823 - static inline u16 ether1394_type_trans(struct sk_buff *skb, 824 - struct net_device *dev) 823 + static u16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev) 825 824 { 826 825 struct eth1394hdr *eth; 827 826 unsigned char *rawp; ··· 854 855 855 856 /* Parse an encapsulated IP1394 header into an ethernet frame packet. 856 857 * We also perform ARP translation here, if need be. */ 857 - static inline u16 ether1394_parse_encap(struct sk_buff *skb, 858 - struct net_device *dev, 859 - nodeid_t srcid, nodeid_t destid, 860 - u16 ether_type) 858 + static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, 859 + nodeid_t srcid, nodeid_t destid, 860 + u16 ether_type) 861 861 { 862 862 struct eth1394_priv *priv = netdev_priv(dev); 863 863 u64 dest_hw; ··· 937 939 return ret; 938 940 } 939 941 940 - static inline int fragment_overlap(struct list_head *frag_list, int offset, int len) 942 + static int fragment_overlap(struct list_head *frag_list, int offset, int len) 941 943 { 942 944 struct fragment_info *fi; 943 945 ··· 949 951 return 0; 950 952 } 951 953 952 - static inline struct list_head *find_partial_datagram(struct list_head *pdgl, int dgl) 954 + static struct list_head *find_partial_datagram(struct list_head *pdgl, int dgl) 953 955 { 954 956 struct partial_datagram *pd; 955 957 ··· 961 963 } 962 964 963 965 /* Assumes that new fragment does not overlap any existing fragments */ 964 - static inline int new_fragment(struct list_head *frag_info, int offset, int len) 966 + static int new_fragment(struct list_head *frag_info, int offset, int len) 965 967 { 966 968 struct list_head *lh; 967 969 struct fragment_info *fi, *fi2, *new; ··· 1013 1015 return 0; 1014 1016 } 1015 1017 1016 - static inline int new_partial_datagram(struct net_device *dev, 1017 - struct list_head *pdgl, int dgl, 1018 - int dg_size, char *frag_buf, 1019 - int frag_off, int frag_len) 1018 + static int new_partial_datagram(struct net_device *dev, struct list_head *pdgl, 1019 + int dgl, int dg_size, char *frag_buf, 1020 + int frag_off, int frag_len) 1020 1021 { 1021 1022 struct partial_datagram *new; 1022 1023 ··· 1052 1055 return 0; 1053 1056 } 1054 1057 1055 - static inline int update_partial_datagram(struct list_head *pdgl, struct list_head *lh, 1056 - char *frag_buf, int frag_off, int frag_len) 1058 + static int update_partial_datagram(struct list_head *pdgl, struct list_head *lh, 1059 + char *frag_buf, int frag_off, int frag_len) 1057 1060 { 1058 1061 struct partial_datagram *pd = list_entry(lh, struct partial_datagram, list); 1059 1062 ··· 1070 1073 return 0; 1071 1074 } 1072 1075 1073 - static inline int is_datagram_complete(struct list_head *lh, int dg_size) 1076 + static int is_datagram_complete(struct list_head *lh, int dg_size) 1074 1077 { 1075 - struct partial_datagram *pd = list_entry(lh, struct partial_datagram, list); 1076 - struct fragment_info *fi = list_entry(pd->frag_info.next, 1077 - struct fragment_info, list); 1078 + struct partial_datagram *pd; 1079 + struct fragment_info *fi; 1080 + 1081 + pd = list_entry(lh, struct partial_datagram, list); 1082 + fi = list_entry(pd->frag_info.next, struct fragment_info, list); 1078 1083 1079 1084 return (fi->len == dg_size); 1080 1085 } ··· 1358 1359 * speed, and unicast FIFO address information between the sender_unique_id 1359 1360 * and the IP addresses. 1360 1361 */ 1361 - static inline void ether1394_arp_to_1394arp(struct sk_buff *skb, 1362 - struct net_device *dev) 1362 + static void ether1394_arp_to_1394arp(struct sk_buff *skb, 1363 + struct net_device *dev) 1363 1364 { 1364 1365 struct eth1394_priv *priv = netdev_priv(dev); 1365 1366 ··· 1381 1382 1382 1383 /* We need to encapsulate the standard header with our own. We use the 1383 1384 * ethernet header's proto for our own. */ 1384 - static inline unsigned int ether1394_encapsulate_prep(unsigned int max_payload, 1385 - __be16 proto, 1386 - union eth1394_hdr *hdr, 1387 - u16 dg_size, u16 dgl) 1385 + static unsigned int ether1394_encapsulate_prep(unsigned int max_payload, 1386 + __be16 proto, 1387 + union eth1394_hdr *hdr, 1388 + u16 dg_size, u16 dgl) 1388 1389 { 1389 1390 unsigned int adj_max_payload = max_payload - hdr_type_len[ETH1394_HDR_LF_UF]; 1390 1391 ··· 1402 1403 return((dg_size + (adj_max_payload - 1)) / adj_max_payload); 1403 1404 } 1404 1405 1405 - static inline unsigned int ether1394_encapsulate(struct sk_buff *skb, 1406 - unsigned int max_payload, 1407 - union eth1394_hdr *hdr) 1406 + static unsigned int ether1394_encapsulate(struct sk_buff *skb, 1407 + unsigned int max_payload, 1408 + union eth1394_hdr *hdr) 1408 1409 { 1409 1410 union eth1394_hdr *bufhdr; 1410 1411 int ftype = hdr->common.lf; ··· 1444 1445 return min(max_payload, skb->len); 1445 1446 } 1446 1447 1447 - static inline struct hpsb_packet *ether1394_alloc_common_packet(struct hpsb_host *host) 1448 + static struct hpsb_packet *ether1394_alloc_common_packet(struct hpsb_host *host) 1448 1449 { 1449 1450 struct hpsb_packet *p; 1450 1451 ··· 1457 1458 return p; 1458 1459 } 1459 1460 1460 - static inline int ether1394_prep_write_packet(struct hpsb_packet *p, 1461 - struct hpsb_host *host, 1462 - nodeid_t node, u64 addr, 1463 - void * data, int tx_len) 1461 + static int ether1394_prep_write_packet(struct hpsb_packet *p, 1462 + struct hpsb_host *host, nodeid_t node, 1463 + u64 addr, void * data, int tx_len) 1464 1464 { 1465 1465 p->node_id = node; 1466 1466 p->data = NULL; ··· 1486 1488 return 0; 1487 1489 } 1488 1490 1489 - static inline void ether1394_prep_gasp_packet(struct hpsb_packet *p, 1490 - struct eth1394_priv *priv, 1491 - struct sk_buff *skb, int length) 1491 + static void ether1394_prep_gasp_packet(struct hpsb_packet *p, 1492 + struct eth1394_priv *priv, 1493 + struct sk_buff *skb, int length) 1492 1494 { 1493 1495 p->header_size = 4; 1494 1496 p->tcode = TCODE_STREAM_DATA; ··· 1510 1512 p->speed_code = priv->bc_sspd; 1511 1513 } 1512 1514 1513 - static inline void ether1394_free_packet(struct hpsb_packet *packet) 1515 + static void ether1394_free_packet(struct hpsb_packet *packet) 1514 1516 { 1515 1517 if (packet->tcode != TCODE_STREAM_DATA) 1516 1518 hpsb_free_tlabel(packet); ··· 1554 1556 1555 1557 1556 1558 /* Task function to be run when a datagram transmission is completed */ 1557 - static inline void ether1394_dg_complete(struct packet_task *ptask, int fail) 1559 + static void ether1394_dg_complete(struct packet_task *ptask, int fail) 1558 1560 { 1559 1561 struct sk_buff *skb = ptask->skb; 1560 1562 struct net_device *dev = skb->dev;