OSDN Git Service

netlink: remove unused 'compare' function
authorFlorian Westphal <fw@strlen.de>
Wed, 8 Mar 2023 14:20:06 +0000 (15:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Mar 2023 07:11:09 +0000 (23:11 -0800)
No users in the tree.  Tested with allmodconfig build.

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20230308142006.20879-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netlink.h
net/netlink/af_netlink.c
net/netlink/af_netlink.h

index c43ac76..3e87432 100644 (file)
@@ -50,7 +50,6 @@ struct netlink_kernel_cfg {
        struct mutex    *cb_mutex;
        int             (*bind)(struct net *net, int group);
        void            (*unbind)(struct net *net, int group);
-       bool            (*compare)(struct net *net, struct sock *sk);
 };
 
 struct sock *__netlink_kernel_create(struct net *net, int unit,
index c642776..877f1da 100644 (file)
@@ -2097,8 +2097,6 @@ __netlink_kernel_create(struct net *net, int unit, struct module *module,
                        nl_table[unit].bind = cfg->bind;
                        nl_table[unit].unbind = cfg->unbind;
                        nl_table[unit].flags = cfg->flags;
-                       if (cfg->compare)
-                               nl_table[unit].compare = cfg->compare;
                }
                nl_table[unit].registered = 1;
        } else {
index 5f454c8..90a3198 100644 (file)
@@ -64,7 +64,6 @@ struct netlink_table {
        struct module           *module;
        int                     (*bind)(struct net *net, int group);
        void                    (*unbind)(struct net *net, int group);
-       bool                    (*compare)(struct net *net, struct sock *sock);
        int                     registered;
 };