security/: possible cleanups
Subsystems (2)
PATCH 1/1 security/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- keys/key.c: key_duplicate
Signed-off-by Adrian Bunk <[email protected]>
---
security/keys/internal.h | 1 - security/keys/key.c | 4 +++- security/keys/keyring.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
security/keys/internal.h renamed from security/keys/internal.h.old +0 -1
@@ -25,7 +25,6 @@ #define kdebug(FMT, a...) do {} while(0)#endif -extern struct key_type key_type_dead;extern struct key_type key_type_user;/*****************************************************************************/
security/keys/key.c renamed from security/keys/key.c.old +3 -1
@@ -35,7 +35,7 @@DECLARE_RWSEM (key_construction_sem);/* any key who's type gets unegistered will be re-typed to this */ -struct key_type key_type_dead = { +static struct key_type key_type_dead = { .name ="dead" , };
@@ -860,6 +860,7 @@* duplicate a key, potentially with a revised description * - must be supported by the keytype (keyrings for instance can be duplicated) */ +#if 0 struct key *key_duplicate (struct key *source,const char *desc) {struct key *key;
@@ -904,6 +905,7 @@ goto out; }/* end key_duplicate() */ +#endif /* 0 */ /*****************************************************************************/ /*
security/keys/keyring.c renamed from security/keys/keyring.c.old +1 -1
@@ -69,7 +69,7 @@* semaphore to serialise link/link calls to prevent two link calls in parallel * introducing a cycle */ -DECLARE_RWSEM (keyring_serialise_link_sem); +static DECLARE_RWSEM (keyring_serialise_link_sem);/*****************************************************************************/ /*