From a8b17ed019bd40d3bfa20439d9c36a99f9be9180 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 20 Jan 2011 16:38:27 +0000 Subject: KEYS: Do some style cleanup in the key management code. Do a bit of a style clean up in the key management code. No functional changes. Done using: perl -p -i -e 's!^/[*]*/\n!!' security/keys/*.c perl -p -i -e 's!} /[*] end [a-z0-9_]*[(][)] [*]/\n!}\n!' security/keys/*.c sed -i -s -e ": next" -e N -e 's/^\n[}]$/}/' -e t -e P -e 's/^.*\n//' -e "b next" security/keys/*.c To remove /*****/ lines, remove comments on the closing brace of a function to name the function and remove blank lines before the closing brace of a function. Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- security/keys/user_defined.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'security/keys/user_defined.c') diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index e9aa07929656..02807fb16340 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c @@ -35,7 +35,6 @@ struct key_type key_type_user = { EXPORT_SYMBOL_GPL(key_type_user); -/*****************************************************************************/ /* * instantiate a user defined key */ @@ -65,12 +64,10 @@ int user_instantiate(struct key *key, const void *data, size_t datalen) error: return ret; - -} /* end user_instantiate() */ +} EXPORT_SYMBOL_GPL(user_instantiate); -/*****************************************************************************/ /* * dispose of the old data from an updated user defined key */ @@ -81,10 +78,8 @@ static void user_update_rcu_disposal(struct rcu_head *rcu) upayload = container_of(rcu, struct user_key_payload, rcu); kfree(upayload); +} -} /* end user_update_rcu_disposal() */ - -/*****************************************************************************/ /* * update a user defined key * - the key's semaphore is write-locked @@ -123,24 +118,20 @@ int user_update(struct key *key, const void *data, size_t datalen) error: return ret; - -} /* end user_update() */ +} EXPORT_SYMBOL_GPL(user_update); -/*****************************************************************************/ /* * match users on their name */ int user_match(const struct key *key, const void *description) { return strcmp(key->description, description) == 0; - -} /* end user_match() */ +} EXPORT_SYMBOL_GPL(user_match); -/*****************************************************************************/ /* * dispose of the links from a revoked keyring * - called with the key sem write-locked @@ -156,12 +147,10 @@ void user_revoke(struct key *key) rcu_assign_pointer(key->payload.data, NULL); call_rcu(&upayload->rcu, user_update_rcu_disposal); } - -} /* end user_revoke() */ +} EXPORT_SYMBOL(user_revoke); -/*****************************************************************************/ /* * dispose of the data dangling from the corpse of a user key */ @@ -170,12 +159,10 @@ void user_destroy(struct key *key) struct user_key_payload *upayload = key->payload.data; kfree(upayload); - -} /* end user_destroy() */ +} EXPORT_SYMBOL_GPL(user_destroy); -/*****************************************************************************/ /* * describe the user key */ @@ -184,12 +171,10 @@ void user_describe(const struct key *key, struct seq_file *m) seq_puts(m, key->description); seq_printf(m, ": %u", key->datalen); - -} /* end user_describe() */ +} EXPORT_SYMBOL_GPL(user_describe); -/*****************************************************************************/ /* * read the key data * - the key's semaphore is read-locked @@ -213,7 +198,6 @@ long user_read(const struct key *key, char __user *buffer, size_t buflen) } return ret; - -} /* end user_read() */ +} EXPORT_SYMBOL_GPL(user_read); -- cgit v1.2.3