Commit 7b1b9164 authored by David Howells's avatar David Howells Committed by James Morris

KEYS: Do some whitespace cleanups [try #6]

Do some whitespace cleanups in the key management code.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent ad73a717
...@@ -209,11 +209,9 @@ static int proc_keys_show(struct seq_file *m, void *v) ...@@ -209,11 +209,9 @@ static int proc_keys_show(struct seq_file *m, void *v)
/* come up with a suitable timeout value */ /* come up with a suitable timeout value */
if (key->expiry == 0) { if (key->expiry == 0) {
memcpy(xbuf, "perm", 5); memcpy(xbuf, "perm", 5);
} } else if (now.tv_sec >= key->expiry) {
else if (now.tv_sec >= key->expiry) {
memcpy(xbuf, "expd", 5); memcpy(xbuf, "expd", 5);
} } else {
else {
timo = key->expiry - now.tv_sec; timo = key->expiry - now.tv_sec;
if (timo < 60) if (timo < 60)
...@@ -253,9 +251,7 @@ static int proc_keys_show(struct seq_file *m, void *v) ...@@ -253,9 +251,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
seq_putc(m, '\n'); seq_putc(m, '\n');
rcu_read_unlock(); rcu_read_unlock();
return 0; return 0;
} }
#endif /* CONFIG_KEYS_DEBUG_PROC_KEYS */ #endif /* CONFIG_KEYS_DEBUG_PROC_KEYS */
...@@ -281,6 +277,7 @@ static struct rb_node *key_user_first(struct rb_root *r) ...@@ -281,6 +277,7 @@ static struct rb_node *key_user_first(struct rb_root *r)
struct rb_node *n = rb_first(r); struct rb_node *n = rb_first(r);
return __key_user_next(n); return __key_user_next(n);
} }
/*****************************************************************************/ /*****************************************************************************/
/* /*
* implement "/proc/key-users" to provides a list of the key users * implement "/proc/key-users" to provides a list of the key users
...@@ -288,7 +285,6 @@ static struct rb_node *key_user_first(struct rb_root *r) ...@@ -288,7 +285,6 @@ static struct rb_node *key_user_first(struct rb_root *r)
static int proc_key_users_open(struct inode *inode, struct file *file) static int proc_key_users_open(struct inode *inode, struct file *file)
{ {
return seq_open(file, &proc_key_users_ops); return seq_open(file, &proc_key_users_ops);
} }
static void *proc_key_users_start(struct seq_file *p, loff_t *_pos) static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
...@@ -306,14 +302,12 @@ static void *proc_key_users_start(struct seq_file *p, loff_t *_pos) ...@@ -306,14 +302,12 @@ static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
} }
return _p; return _p;
} }
static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos) static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos)
{ {
(*_pos)++; (*_pos)++;
return key_user_next((struct rb_node *) v); return key_user_next((struct rb_node *) v);
} }
static void proc_key_users_stop(struct seq_file *p, void *v) static void proc_key_users_stop(struct seq_file *p, void *v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment