Commit 512ea3bc30c0e052a961e1abce8e783f3e28c92a

Authored by Chihau Chau
Committed by James Morris
1 parent c43a752347

Security: key: keyring: fix some code style issues

This fixes to include <linux/uaccess.h> instead <asm/uaccess.h> and some
code style issues like to put a else sentence below close brace '}' and
to replace a tab instead of some space characters.

Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>

Showing 1 changed file with 3 additions and 4 deletions Side-by-side Diff

security/keys/keyring.c
... ... @@ -17,7 +17,7 @@
17 17 #include <linux/seq_file.h>
18 18 #include <linux/err.h>
19 19 #include <keys/keyring-type.h>
20   -#include <asm/uaccess.h>
  20 +#include <linux/uaccess.h>
21 21 #include "internal.h"
22 22  
23 23 /*
... ... @@ -304,7 +304,7 @@
304 304 key_check(keyring);
305 305  
306 306 /* top keyring must have search permission to begin the search */
307   - err = key_task_permission(keyring_ref, cred, KEY_SEARCH);
  307 + err = key_task_permission(keyring_ref, cred, KEY_SEARCH);
308 308 if (err < 0) {
309 309 key_ref = ERR_PTR(err);
310 310 goto error;
... ... @@ -773,8 +773,7 @@
773 773 smp_wmb();
774 774 klist->nkeys++;
775 775 smp_wmb();
776   - }
777   - else {
  776 + } else {
778 777 /* grow the key list */
779 778 max = 4;
780 779 if (klist)