]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
IB/core: Avoid exporting module internal function
authorParav Pandit <parav@mellanox.com>
Tue, 14 Nov 2017 12:51:51 +0000 (14:51 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Dec 2017 20:49:43 +0000 (13:49 -0700)
ib_security_modify_qp and ib_security_pkey_access are core internal
function. So avoid exporting them.
ib_security_pkey_access is used only when secuirty hooks are enabled so
avoid defining it otherwise.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/security.c

index a1d687a664f85edc4eeb1bf50360cb02c65faa45..6c4541af54bb934f23b1577a3ebfb1e25e897b99 100644 (file)
@@ -213,11 +213,6 @@ int ib_get_cached_subnet_prefix(struct ib_device *device,
                                u64              *sn_pfx);
 
 #ifdef CONFIG_SECURITY_INFINIBAND
-int ib_security_pkey_access(struct ib_device *dev,
-                           u8 port_num,
-                           u16 pkey_index,
-                           void *sec);
-
 void ib_security_destroy_port_pkey_list(struct ib_device *device);
 
 void ib_security_cache_change(struct ib_device *device,
@@ -240,14 +235,6 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent,
 void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent);
 int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index);
 #else
-static inline int ib_security_pkey_access(struct ib_device *dev,
-                                         u8 port_num,
-                                         u16 pkey_index,
-                                         void *sec)
-{
-       return 0;
-}
-
 static inline void ib_security_destroy_port_pkey_list(struct ib_device *device)
 {
 }
index 23278ed5be4517fd42d8bba6eb07ccd485e5f7f6..209d0574fc1fed5e2f8b0c6256a2c0ed2e30083f 100644 (file)
@@ -620,12 +620,11 @@ int ib_security_modify_qp(struct ib_qp *qp,
        }
        return ret;
 }
-EXPORT_SYMBOL(ib_security_modify_qp);
 
-int ib_security_pkey_access(struct ib_device *dev,
-                           u8 port_num,
-                           u16 pkey_index,
-                           void *sec)
+static int ib_security_pkey_access(struct ib_device *dev,
+                                  u8 port_num,
+                                  u16 pkey_index,
+                                  void *sec)
 {
        u64 subnet_prefix;
        u16 pkey;
@@ -642,7 +641,6 @@ int ib_security_pkey_access(struct ib_device *dev,
 
        return security_ib_pkey_access(sec, subnet_prefix, pkey);
 }
-EXPORT_SYMBOL(ib_security_pkey_access);
 
 static int ib_mad_agent_security_change(struct notifier_block *nb,
                                        unsigned long event,