]> granicus.if.org Git - ipset/commitdiff
netfilter: ipset: remove inline from static functions in .c files.
authorJeremy Sowden <jeremy@azazel.net>
Thu, 3 Oct 2019 19:56:02 +0000 (20:56 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 7 Oct 2019 19:49:48 +0000 (21:49 +0200)
The inline function-specifier should not be used for static functions
defined in .c files since it bloats the kernel.  Instead leave the
compiler to decide which functions to inline.

While a couple of the files affected (ip_set_*_gen.h) are technically
headers, they contain templates for generating the common parts of
particular set-types and so we treat them like .c files.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
19 files changed:
kernel/net/netfilter/ipset/ip_set_bitmap_gen.h
kernel/net/netfilter/ipset/ip_set_bitmap_ip.c
kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c
kernel/net/netfilter/ipset/ip_set_bitmap_port.c
kernel/net/netfilter/ipset/ip_set_core.c
kernel/net/netfilter/ipset/ip_set_hash_gen.h
kernel/net/netfilter/ipset/ip_set_hash_ip.c
kernel/net/netfilter/ipset/ip_set_hash_ipmac.c
kernel/net/netfilter/ipset/ip_set_hash_ipmark.c
kernel/net/netfilter/ipset/ip_set_hash_ipport.c
kernel/net/netfilter/ipset/ip_set_hash_ipportip.c
kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c
kernel/net/netfilter/ipset/ip_set_hash_mac.c
kernel/net/netfilter/ipset/ip_set_hash_net.c
kernel/net/netfilter/ipset/ip_set_hash_netiface.c
kernel/net/netfilter/ipset/ip_set_hash_netnet.c
kernel/net/netfilter/ipset/ip_set_hash_netport.c
kernel/net/netfilter/ipset/ip_set_hash_netportnet.c
kernel/net/netfilter/ipset/ip_set_list_set.c

index 452e7d2e43fa3d8bcccef5ec0576bd92997636b1..aeabdecf6aa662272764c6c6d7a87542c2bba078 100644 (file)
@@ -198,7 +198,7 @@ mtype_del(struct ip_set *set, void *value, const struct ip_set_ext *ext,
 }
 
 #ifndef IP_SET_BITMAP_STORED_TIMEOUT
-static inline bool
+static bool
 mtype_is_filled(const struct mtype_elem *x)
 {
        return true;
index 6f051fec2465c95c33c1362f6c80280a40f5a10b..4c0a6592d8bb636a6f3fb72047e0f76063a38160 100644 (file)
@@ -60,7 +60,7 @@ struct bitmap_ip_adt_elem {
        u16 id;
 };
 
-static inline u32
+static u32
 ip_to_id(const struct bitmap_ip *m, u32 ip)
 {
        return ((ip & ip_set_hostmask(m->netmask)) - m->first_ip) / m->hosts;
@@ -68,33 +68,33 @@ ip_to_id(const struct bitmap_ip *m, u32 ip)
 
 /* Common functions */
 
-static inline int
+static int
 bitmap_ip_do_test(const struct bitmap_ip_adt_elem *e,
                  struct bitmap_ip *map, size_t dsize)
 {
        return !!test_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_ip_gc_test(u16 id, const struct bitmap_ip *map, size_t dsize)
 {
        return !!test_bit(id, map->members);
 }
 
-static inline int
+static int
 bitmap_ip_do_add(const struct bitmap_ip_adt_elem *e, struct bitmap_ip *map,
                 u32 flags, size_t dsize)
 {
        return !!test_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_ip_do_del(const struct bitmap_ip_adt_elem *e, struct bitmap_ip *map)
 {
        return !test_and_clear_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_ip_do_list(struct sk_buff *skb, const struct bitmap_ip *map, u32 id,
                  size_t dsize)
 {
@@ -102,7 +102,7 @@ bitmap_ip_do_list(struct sk_buff *skb, const struct bitmap_ip *map, u32 id,
                        htonl(map->first_ip + id * map->hosts));
 }
 
-static inline int
+static int
 bitmap_ip_do_head(struct sk_buff *skb, const struct bitmap_ip *map)
 {
        return nla_put_ipaddr4(skb, IPSET_ATTR_IP, htonl(map->first_ip)) ||
index bf8da83a06e8e5b9afbf3327ed12131735caaee2..d067f5b2a34eb1942b6cb0abe4486b77f5b19c91 100644 (file)
@@ -71,7 +71,7 @@ struct bitmap_ipmac_elem {
        unsigned char filled;
 } __aligned(__alignof__(u64));
 
-static inline u32
+static u32
 ip_to_id(const struct bitmap_ipmac *m, u32 ip)
 {
        return ip - m->first_ip;
@@ -85,7 +85,7 @@ ip_to_id(const struct bitmap_ipmac *m, u32 ip)
 
 /* Common functions */
 
-static inline int
+static int
 bitmap_ipmac_do_test(const struct bitmap_ipmac_adt_elem *e,
                     const struct bitmap_ipmac *map, size_t dsize)
 {
@@ -100,7 +100,7 @@ bitmap_ipmac_do_test(const struct bitmap_ipmac_adt_elem *e,
        return -EAGAIN;
 }
 
-static inline int
+static int
 bitmap_ipmac_gc_test(u16 id, const struct bitmap_ipmac *map, size_t dsize)
 {
        const struct bitmap_ipmac_elem *elem;
@@ -112,13 +112,13 @@ bitmap_ipmac_gc_test(u16 id, const struct bitmap_ipmac *map, size_t dsize)
        return elem->filled == MAC_FILLED;
 }
 
-static inline int
+static int
 bitmap_ipmac_is_filled(const struct bitmap_ipmac_elem *elem)
 {
        return elem->filled == MAC_FILLED;
 }
 
-static inline int
+static int
 bitmap_ipmac_add_timeout(unsigned long *timeout,
                         const struct bitmap_ipmac_adt_elem *e,
                         const struct ip_set_ext *ext, struct ip_set *set,
@@ -145,7 +145,7 @@ bitmap_ipmac_add_timeout(unsigned long *timeout,
        return 0;
 }
 
-static inline int
+static int
 bitmap_ipmac_do_add(const struct bitmap_ipmac_adt_elem *e,
                    struct bitmap_ipmac *map, u32 flags, size_t dsize)
 {
@@ -183,14 +183,14 @@ bitmap_ipmac_do_add(const struct bitmap_ipmac_adt_elem *e,
        return IPSET_ADD_STORE_PLAIN_TIMEOUT;
 }
 
-static inline int
+static int
 bitmap_ipmac_do_del(const struct bitmap_ipmac_adt_elem *e,
                    struct bitmap_ipmac *map)
 {
        return !test_and_clear_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_ipmac_do_list(struct sk_buff *skb, const struct bitmap_ipmac *map,
                     u32 id, size_t dsize)
 {
@@ -203,7 +203,7 @@ bitmap_ipmac_do_list(struct sk_buff *skb, const struct bitmap_ipmac *map,
                nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, elem->ether));
 }
 
-static inline int
+static int
 bitmap_ipmac_do_head(struct sk_buff *skb, const struct bitmap_ipmac *map)
 {
        return nla_put_ipaddr4(skb, IPSET_ATTR_IP, htonl(map->first_ip)) ||
index 9495acd60179274ef04112921452cda63d9f28ae..1b492d8a276444f26b3cf7869a028f9d009e7ee3 100644 (file)
@@ -52,7 +52,7 @@ struct bitmap_port_adt_elem {
        u16 id;
 };
 
-static inline u16
+static u16
 port_to_id(const struct bitmap_port *m, u16 port)
 {
        return port - m->first_port;
@@ -60,34 +60,34 @@ port_to_id(const struct bitmap_port *m, u16 port)
 
 /* Common functions */
 
-static inline int
+static int
 bitmap_port_do_test(const struct bitmap_port_adt_elem *e,
                    const struct bitmap_port *map, size_t dsize)
 {
        return !!test_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_port_gc_test(u16 id, const struct bitmap_port *map, size_t dsize)
 {
        return !!test_bit(id, map->members);
 }
 
-static inline int
+static int
 bitmap_port_do_add(const struct bitmap_port_adt_elem *e,
                   struct bitmap_port *map, u32 flags, size_t dsize)
 {
        return !!test_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_port_do_del(const struct bitmap_port_adt_elem *e,
                   struct bitmap_port *map)
 {
        return !test_and_clear_bit(e->id, map->members);
 }
 
-static inline int
+static int
 bitmap_port_do_list(struct sk_buff *skb, const struct bitmap_port *map, u32 id,
                    size_t dsize)
 {
@@ -95,7 +95,7 @@ bitmap_port_do_list(struct sk_buff *skb, const struct bitmap_port *map, u32 id,
                             htons(map->first_port + id));
 }
 
-static inline int
+static int
 bitmap_port_do_head(struct sk_buff *skb, const struct bitmap_port *map)
 {
        return nla_put_net16(skb, IPSET_ATTR_PORT, htons(map->first_port)) ||
index 6c4c0f7e3ac138d6c3532f3ed1b5063f6fd80ac6..e3b06ab9fa04be07abf4690648f3268cc358b195 100644 (file)
@@ -38,7 +38,7 @@ struct ip_set_net {
 
 static unsigned int ip_set_net_id __read_mostly;
 
-static inline struct ip_set_net *ip_set_pernet(struct net *net)
+static struct ip_set_net *ip_set_pernet(struct net *net)
 {
        return net_generic(net, ip_set_net_id);
 }
@@ -70,13 +70,13 @@ MODULE_ALIAS_NFNL_SUBSYS(NFNL_SUBSYS_IPSET);
  * serialized by ip_set_type_mutex.
  */
 
-static inline void
+static void
 ip_set_type_lock(void)
 {
        mutex_lock(&ip_set_type_mutex);
 }
 
-static inline void
+static void
 ip_set_type_unlock(void)
 {
        mutex_unlock(&ip_set_type_mutex);
@@ -280,7 +280,7 @@ ip_set_free(void *members)
 }
 EXPORT_SYMBOL_GPL(ip_set_free);
 
-static inline bool
+static bool
 flag_nested(const struct nlattr *nla)
 {
        return nla->nla_type & NLA_F_NESTED;
@@ -361,7 +361,7 @@ const struct ip_set_ext_type ip_set_extensions[] = {
 };
 EXPORT_SYMBOL_GPL(ip_set_extensions);
 
-static inline bool
+static bool
 add_extension(enum ip_set_ext_id id, u32 flags, struct nlattr *tb[])
 {
        return ip_set_extensions[id].flag ?
@@ -511,7 +511,7 @@ EXPORT_SYMBOL_GPL(ip_set_match_extensions);
  * The set behind an index may change by swapping only, from userspace.
  */
 
-static inline void
+static void
 __ip_set_get(struct ip_set *set)
 {
        write_lock_bh(&ip_set_ref_lock);
@@ -519,7 +519,7 @@ __ip_set_get(struct ip_set *set)
        write_unlock_bh(&ip_set_ref_lock);
 }
 
-static inline void
+static void
 __ip_set_put(struct ip_set *set)
 {
        write_lock_bh(&ip_set_ref_lock);
@@ -531,7 +531,7 @@ __ip_set_put(struct ip_set *set)
 /* set->ref can be swapped out by ip_set_swap, netlink events (like dump) need
  * a separate reference counter
  */
-static inline void
+static void
 __ip_set_put_netlink(struct ip_set *set)
 {
        write_lock_bh(&ip_set_ref_lock);
@@ -546,7 +546,7 @@ __ip_set_put_netlink(struct ip_set *set)
  * so it can't be destroyed (or changed) under our foot.
  */
 
-static inline struct ip_set *
+static struct ip_set *
 ip_set_rcu_get(struct net *net, ip_set_id_t index)
 {
        struct ip_set *set;
@@ -675,7 +675,7 @@ EXPORT_SYMBOL_GPL(ip_set_get_byname);
  *
  */
 
-static inline void
+static void
 __ip_set_put_byindex(struct ip_set_net *inst, ip_set_id_t index)
 {
        struct ip_set *set;
index c42b3039515a4e2179ca9821ccf69b028dcfd6d7..da538b7ca2fa47a2f8b1ce5086332e6eacdeefeb 100644 (file)
@@ -43,7 +43,7 @@
 #ifdef IP_SET_HASH_WITH_MULTI
 #define AHASH_MAX(h)                   ((h)->ahash_max)
 
-static inline u8
+static u8
 tune_ahash_max(u8 curr, u32 multi)
 {
        u32 n;
@@ -915,7 +915,7 @@ out:
        return ret;
 }
 
-static inline int
+static int
 mtype_data_match(struct mtype_elem *data, const struct ip_set_ext *ext,
                 struct ip_set_ext *mext, struct ip_set *set, u32 flags)
 {
index 7b82bf1104ce04ce5e87da9ab393df5e46c238e6..b25eca45ad3979ae4ecfafb1d97b4d235d8efdd2 100644 (file)
@@ -48,7 +48,7 @@ struct hash_ip4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ip4_data_equal(const struct hash_ip4_elem *e1,
                    const struct hash_ip4_elem *e2,
                    u32 *multi)
@@ -67,7 +67,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ip4_data_next(struct hash_ip4_elem *next, const struct hash_ip4_elem *e)
 {
        next->ip = e->ip;
@@ -175,7 +175,7 @@ struct hash_ip6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ip6_data_equal(const struct hash_ip6_elem *ip1,
                    const struct hash_ip6_elem *ip2,
                    u32 *multi)
@@ -183,7 +183,7 @@ hash_ip6_data_equal(const struct hash_ip6_elem *ip1,
        return ipv6_addr_equal(&ip1->ip.in6, &ip2->ip.in6);
 }
 
-static inline void
+static void
 hash_ip6_netmask(union nf_inet_addr *ip, u8 prefix)
 {
        ip6_netmask(ip, prefix);
@@ -200,7 +200,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ip6_data_next(struct hash_ip6_elem *next, const struct hash_ip6_elem *e)
 {
 }
index 25560ea742d666283d7417ddd316e1bb7aec55e3..d49a4379bdbf0785d84577b5c3b66019274e0822 100644 (file)
@@ -50,7 +50,7 @@ struct hash_ipmac4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipmac4_data_equal(const struct hash_ipmac4_elem *e1,
                       const struct hash_ipmac4_elem *e2,
                       u32 *multi)
@@ -70,7 +70,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipmac4_data_next(struct hash_ipmac4_elem *next,
                      const struct hash_ipmac4_elem *e)
 {
@@ -157,7 +157,7 @@ struct hash_ipmac6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipmac6_data_equal(const struct hash_ipmac6_elem *e1,
                       const struct hash_ipmac6_elem *e2,
                       u32 *multi)
@@ -178,7 +178,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipmac6_data_next(struct hash_ipmac6_elem *next,
                      const struct hash_ipmac6_elem *e)
 {
index 7d468f98a2529abe20df84457db5837fb1483cce..2530fc6198aec8b6735eef003e683786f9e41910 100644 (file)
@@ -47,7 +47,7 @@ struct hash_ipmark4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipmark4_data_equal(const struct hash_ipmark4_elem *ip1,
                        const struct hash_ipmark4_elem *ip2,
                        u32 *multi)
@@ -69,7 +69,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipmark4_data_next(struct hash_ipmark4_elem *next,
                       const struct hash_ipmark4_elem *d)
 {
@@ -170,7 +170,7 @@ struct hash_ipmark6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipmark6_data_equal(const struct hash_ipmark6_elem *ip1,
                        const struct hash_ipmark6_elem *ip2,
                        u32 *multi)
@@ -192,7 +192,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipmark6_data_next(struct hash_ipmark6_elem *next,
                       const struct hash_ipmark6_elem *d)
 {
index d358ee69d04bd14290d94fa53a97a8baf88482fc..0250f9f7e97c6ff1b26b001ce3c26b967edca19d 100644 (file)
@@ -51,7 +51,7 @@ struct hash_ipport4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipport4_data_equal(const struct hash_ipport4_elem *ip1,
                        const struct hash_ipport4_elem *ip2,
                        u32 *multi)
@@ -75,7 +75,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipport4_data_next(struct hash_ipport4_elem *next,
                       const struct hash_ipport4_elem *d)
 {
@@ -206,7 +206,7 @@ struct hash_ipport6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipport6_data_equal(const struct hash_ipport6_elem *ip1,
                        const struct hash_ipport6_elem *ip2,
                        u32 *multi)
@@ -230,7 +230,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipport6_data_next(struct hash_ipport6_elem *next,
                       const struct hash_ipport6_elem *d)
 {
index 0a304785f912d220ef8b26f0ba28aff2e905707f..656aaf7e4f234ccb4d3c7074c2e0c722b3d9501f 100644 (file)
@@ -50,7 +50,7 @@ struct hash_ipportip4_elem {
        u8 padding;
 };
 
-static inline bool
+static bool
 hash_ipportip4_data_equal(const struct hash_ipportip4_elem *ip1,
                          const struct hash_ipportip4_elem *ip2,
                          u32 *multi)
@@ -76,7 +76,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipportip4_data_next(struct hash_ipportip4_elem *next,
                         const struct hash_ipportip4_elem *d)
 {
@@ -214,7 +214,7 @@ struct hash_ipportip6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipportip6_data_equal(const struct hash_ipportip6_elem *ip1,
                          const struct hash_ipportip6_elem *ip2,
                          u32 *multi)
@@ -240,7 +240,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipportip6_data_next(struct hash_ipportip6_elem *next,
                         const struct hash_ipportip6_elem *d)
 {
index 245f7d714870416e4e6b7177f6f5774e55088afe..c72610718083baa3b9352f3f6e95deae3a3dc42d 100644 (file)
@@ -63,7 +63,7 @@ struct hash_ipportnet4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipportnet4_data_equal(const struct hash_ipportnet4_elem *ip1,
                           const struct hash_ipportnet4_elem *ip2,
                           u32 *multi)
@@ -75,25 +75,25 @@ hash_ipportnet4_data_equal(const struct hash_ipportnet4_elem *ip1,
               ip1->proto == ip2->proto;
 }
 
-static inline int
+static int
 hash_ipportnet4_do_data_match(const struct hash_ipportnet4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_ipportnet4_data_set_flags(struct hash_ipportnet4_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_ipportnet4_data_reset_flags(struct hash_ipportnet4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_ipportnet4_data_netmask(struct hash_ipportnet4_elem *elem, u8 cidr)
 {
        elem->ip2 &= ip_set_netmask(cidr);
@@ -120,7 +120,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipportnet4_data_next(struct hash_ipportnet4_elem *next,
                          const struct hash_ipportnet4_elem *d)
 {
@@ -312,7 +312,7 @@ struct hash_ipportnet6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_ipportnet6_data_equal(const struct hash_ipportnet6_elem *ip1,
                           const struct hash_ipportnet6_elem *ip2,
                           u32 *multi)
@@ -324,25 +324,25 @@ hash_ipportnet6_data_equal(const struct hash_ipportnet6_elem *ip1,
               ip1->proto == ip2->proto;
 }
 
-static inline int
+static int
 hash_ipportnet6_do_data_match(const struct hash_ipportnet6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_ipportnet6_data_set_flags(struct hash_ipportnet6_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_ipportnet6_data_reset_flags(struct hash_ipportnet6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_ipportnet6_data_netmask(struct hash_ipportnet6_elem *elem, u8 cidr)
 {
        ip6_netmask(&elem->ip2, cidr);
@@ -369,7 +369,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_ipportnet6_data_next(struct hash_ipportnet6_elem *next,
                          const struct hash_ipportnet6_elem *d)
 {
index 3d1fc71dac387ee5d3d70525c25c81d49ea7c59d..574ac9f816e1dfd9ffff6ed89c2c3aff85e5a47f 100644 (file)
@@ -41,7 +41,7 @@ struct hash_mac4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_mac4_data_equal(const struct hash_mac4_elem *e1,
                     const struct hash_mac4_elem *e2,
                     u32 *multi)
@@ -49,7 +49,7 @@ hash_mac4_data_equal(const struct hash_mac4_elem *e1,
        return ether_addr_equal(e1->ether, e2->ether);
 }
 
-static inline bool
+static bool
 hash_mac4_data_list(struct sk_buff *skb, const struct hash_mac4_elem *e)
 {
        if (nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, e->ether))
@@ -60,7 +60,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_mac4_data_next(struct hash_mac4_elem *next,
                    const struct hash_mac4_elem *e)
 {
index 470701fda2311535e9b677e084e5d88ff9e8b5a3..28c2557a7a6697c7fb8c0dc145a488130d7087c7 100644 (file)
@@ -51,7 +51,7 @@ struct hash_net4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_net4_data_equal(const struct hash_net4_elem *ip1,
                     const struct hash_net4_elem *ip2,
                     u32 *multi)
@@ -60,25 +60,25 @@ hash_net4_data_equal(const struct hash_net4_elem *ip1,
               ip1->cidr == ip2->cidr;
 }
 
-static inline int
+static int
 hash_net4_do_data_match(const struct hash_net4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_net4_data_set_flags(struct hash_net4_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_net4_data_reset_flags(struct hash_net4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_net4_data_netmask(struct hash_net4_elem *elem, u8 cidr)
 {
        elem->ip &= ip_set_netmask(cidr);
@@ -101,7 +101,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_net4_data_next(struct hash_net4_elem *next,
                    const struct hash_net4_elem *d)
 {
@@ -216,7 +216,7 @@ struct hash_net6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_net6_data_equal(const struct hash_net6_elem *ip1,
                     const struct hash_net6_elem *ip2,
                     u32 *multi)
@@ -225,25 +225,25 @@ hash_net6_data_equal(const struct hash_net6_elem *ip1,
               ip1->cidr == ip2->cidr;
 }
 
-static inline int
+static int
 hash_net6_do_data_match(const struct hash_net6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_net6_data_set_flags(struct hash_net6_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_net6_data_reset_flags(struct hash_net6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_net6_data_netmask(struct hash_net6_elem *elem, u8 cidr)
 {
        ip6_netmask(&elem->ip, cidr);
@@ -266,7 +266,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_net6_data_next(struct hash_net6_elem *next,
                    const struct hash_net6_elem *d)
 {
index 4916acc01c95f0c6328f341d2f70910ac9f21f8f..88da2f55e128e7c294d9f37670eba0cd48e3e33a 100644 (file)
@@ -66,7 +66,7 @@ struct hash_netiface4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netiface4_data_equal(const struct hash_netiface4_elem *ip1,
                          const struct hash_netiface4_elem *ip2,
                          u32 *multi)
@@ -78,25 +78,25 @@ hash_netiface4_data_equal(const struct hash_netiface4_elem *ip1,
               strcmp(ip1->iface, ip2->iface) == 0;
 }
 
-static inline int
+static int
 hash_netiface4_do_data_match(const struct hash_netiface4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netiface4_data_set_flags(struct hash_netiface4_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_netiface4_data_reset_flags(struct hash_netiface4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netiface4_data_netmask(struct hash_netiface4_elem *elem, u8 cidr)
 {
        elem->ip &= ip_set_netmask(cidr);
@@ -123,7 +123,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netiface4_data_next(struct hash_netiface4_elem *next,
                         const struct hash_netiface4_elem *d)
 {
@@ -289,7 +289,7 @@ struct hash_netiface6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netiface6_data_equal(const struct hash_netiface6_elem *ip1,
                          const struct hash_netiface6_elem *ip2,
                          u32 *multi)
@@ -301,25 +301,25 @@ hash_netiface6_data_equal(const struct hash_netiface6_elem *ip1,
               strcmp(ip1->iface, ip2->iface) == 0;
 }
 
-static inline int
+static int
 hash_netiface6_do_data_match(const struct hash_netiface6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netiface6_data_set_flags(struct hash_netiface6_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_netiface6_data_reset_flags(struct hash_netiface6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netiface6_data_netmask(struct hash_netiface6_elem *elem, u8 cidr)
 {
        ip6_netmask(&elem->ip, cidr);
@@ -346,7 +346,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netiface6_data_next(struct hash_netiface6_elem *next,
                         const struct hash_netiface6_elem *d)
 {
index e0553be89600c2ef3693f01b48801a55867fda26..39b2dae826e466c6e70bdf3d27e47ea254acea98 100644 (file)
@@ -55,7 +55,7 @@ struct hash_netnet4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netnet4_data_equal(const struct hash_netnet4_elem *ip1,
                        const struct hash_netnet4_elem *ip2,
                        u32 *multi)
@@ -64,32 +64,32 @@ hash_netnet4_data_equal(const struct hash_netnet4_elem *ip1,
               ip1->ccmp == ip2->ccmp;
 }
 
-static inline int
+static int
 hash_netnet4_do_data_match(const struct hash_netnet4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netnet4_data_set_flags(struct hash_netnet4_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_netnet4_data_reset_flags(struct hash_netnet4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netnet4_data_reset_elem(struct hash_netnet4_elem *elem,
                             struct hash_netnet4_elem *orig)
 {
        elem->ip[1] = orig->ip[1];
 }
 
-static inline void
+static void
 hash_netnet4_data_netmask(struct hash_netnet4_elem *elem, u8 cidr, bool inner)
 {
        if (inner) {
@@ -120,7 +120,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netnet4_data_next(struct hash_netnet4_elem *next,
                       const struct hash_netnet4_elem *d)
 {
@@ -285,7 +285,7 @@ struct hash_netnet6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netnet6_data_equal(const struct hash_netnet6_elem *ip1,
                        const struct hash_netnet6_elem *ip2,
                        u32 *multi)
@@ -295,32 +295,32 @@ hash_netnet6_data_equal(const struct hash_netnet6_elem *ip1,
               ip1->ccmp == ip2->ccmp;
 }
 
-static inline int
+static int
 hash_netnet6_do_data_match(const struct hash_netnet6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netnet6_data_set_flags(struct hash_netnet6_elem *elem, u32 flags)
 {
        elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH;
 }
 
-static inline void
+static void
 hash_netnet6_data_reset_flags(struct hash_netnet6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netnet6_data_reset_elem(struct hash_netnet6_elem *elem,
                             struct hash_netnet6_elem *orig)
 {
        elem->ip[1] = orig->ip[1];
 }
 
-static inline void
+static void
 hash_netnet6_data_netmask(struct hash_netnet6_elem *elem, u8 cidr, bool inner)
 {
        if (inner) {
@@ -351,7 +351,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netnet6_data_next(struct hash_netnet6_elem *next,
                       const struct hash_netnet6_elem *d)
 {
index 943d55d76fcf4791dbec95bcb9d2b37b3467d8ec..196077666072aaf0d2f63e639f3a14b56f0b7597 100644 (file)
@@ -61,7 +61,7 @@ struct hash_netport4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netport4_data_equal(const struct hash_netport4_elem *ip1,
                         const struct hash_netport4_elem *ip2,
                         u32 *multi)
@@ -72,25 +72,25 @@ hash_netport4_data_equal(const struct hash_netport4_elem *ip1,
               ip1->cidr == ip2->cidr;
 }
 
-static inline int
+static int
 hash_netport4_do_data_match(const struct hash_netport4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netport4_data_set_flags(struct hash_netport4_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_netport4_data_reset_flags(struct hash_netport4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netport4_data_netmask(struct hash_netport4_elem *elem, u8 cidr)
 {
        elem->ip &= ip_set_netmask(cidr);
@@ -116,7 +116,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netport4_data_next(struct hash_netport4_elem *next,
                        const struct hash_netport4_elem *d)
 {
@@ -274,7 +274,7 @@ struct hash_netport6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netport6_data_equal(const struct hash_netport6_elem *ip1,
                         const struct hash_netport6_elem *ip2,
                         u32 *multi)
@@ -285,25 +285,25 @@ hash_netport6_data_equal(const struct hash_netport6_elem *ip1,
               ip1->cidr == ip2->cidr;
 }
 
-static inline int
+static int
 hash_netport6_do_data_match(const struct hash_netport6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netport6_data_set_flags(struct hash_netport6_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_netport6_data_reset_flags(struct hash_netport6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netport6_data_netmask(struct hash_netport6_elem *elem, u8 cidr)
 {
        ip6_netmask(&elem->ip, cidr);
@@ -329,7 +329,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netport6_data_next(struct hash_netport6_elem *next,
                        const struct hash_netport6_elem *d)
 {
index afaff99e578cf4ac4f54613b8fa2db7b5de9f313..1717b1e02af9a051329211a6998ffc3ef8f9d8d8 100644 (file)
@@ -60,7 +60,7 @@ struct hash_netportnet4_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netportnet4_data_equal(const struct hash_netportnet4_elem *ip1,
                            const struct hash_netportnet4_elem *ip2,
                            u32 *multi)
@@ -71,32 +71,32 @@ hash_netportnet4_data_equal(const struct hash_netportnet4_elem *ip1,
               ip1->proto == ip2->proto;
 }
 
-static inline int
+static int
 hash_netportnet4_do_data_match(const struct hash_netportnet4_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netportnet4_data_set_flags(struct hash_netportnet4_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_netportnet4_data_reset_flags(struct hash_netportnet4_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netportnet4_data_reset_elem(struct hash_netportnet4_elem *elem,
                                 struct hash_netportnet4_elem *orig)
 {
        elem->ip[1] = orig->ip[1];
 }
 
-static inline void
+static void
 hash_netportnet4_data_netmask(struct hash_netportnet4_elem *elem,
                              u8 cidr, bool inner)
 {
@@ -130,7 +130,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netportnet4_data_next(struct hash_netportnet4_elem *next,
                           const struct hash_netportnet4_elem *d)
 {
@@ -335,7 +335,7 @@ struct hash_netportnet6_elem {
 
 /* Common functions */
 
-static inline bool
+static bool
 hash_netportnet6_data_equal(const struct hash_netportnet6_elem *ip1,
                            const struct hash_netportnet6_elem *ip2,
                            u32 *multi)
@@ -347,32 +347,32 @@ hash_netportnet6_data_equal(const struct hash_netportnet6_elem *ip1,
               ip1->proto == ip2->proto;
 }
 
-static inline int
+static int
 hash_netportnet6_do_data_match(const struct hash_netportnet6_elem *elem)
 {
        return elem->nomatch ? -ENOTEMPTY : 1;
 }
 
-static inline void
+static void
 hash_netportnet6_data_set_flags(struct hash_netportnet6_elem *elem, u32 flags)
 {
        elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
 }
 
-static inline void
+static void
 hash_netportnet6_data_reset_flags(struct hash_netportnet6_elem *elem, u8 *flags)
 {
        swap(*flags, elem->nomatch);
 }
 
-static inline void
+static void
 hash_netportnet6_data_reset_elem(struct hash_netportnet6_elem *elem,
                                 struct hash_netportnet6_elem *orig)
 {
        elem->ip[1] = orig->ip[1];
 }
 
-static inline void
+static void
 hash_netportnet6_data_netmask(struct hash_netportnet6_elem *elem,
                              u8 cidr, bool inner)
 {
@@ -406,7 +406,7 @@ nla_put_failure:
        return true;
 }
 
-static inline void
+static void
 hash_netportnet6_data_next(struct hash_netportnet6_elem *next,
                           const struct hash_netportnet6_elem *d)
 {
index bd122b75ca94da240cfae10e8844ae13ee81c632..f2deb274b3536a7ff697d65b4e054b0534146026 100644 (file)
@@ -155,7 +155,7 @@ __list_set_del_rcu(struct rcu_head * rcu)
        kfree(e);
 }
 
-static inline void
+static void
 list_set_del(struct ip_set *set, struct set_elem *e)
 {
        struct list_set *map = set->data;
@@ -166,7 +166,7 @@ list_set_del(struct ip_set *set, struct set_elem *e)
        call_rcu(&e->rcu, __list_set_del_rcu);
 }
 
-static inline void
+static void
 list_set_replace(struct ip_set *set, struct set_elem *e, struct set_elem *old)
 {
        struct list_set *map = set->data;