Skip to content

Commit dfd9bb4

Browse files
committed
selinux: fix style issues in security/selinux/ss/hashtab.c
As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore <[email protected]>
1 parent a84f5aa commit dfd9bb4

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

security/selinux/ss/hashtab.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Author : Stephen Smalley, <[email protected]>
66
*/
7+
78
#include <linux/kernel.h>
89
#include <linux/slab.h>
910
#include <linux/errno.h>
@@ -47,8 +48,8 @@ int hashtab_init(struct hashtab *h, u32 nel_hint)
4748
return 0;
4849
}
4950

50-
int __hashtab_insert(struct hashtab *h, struct hashtab_node **dst,
51-
void *key, void *datum)
51+
int __hashtab_insert(struct hashtab *h, struct hashtab_node **dst, void *key,
52+
void *datum)
5253
{
5354
struct hashtab_node *newnode;
5455

@@ -83,8 +84,7 @@ void hashtab_destroy(struct hashtab *h)
8384
h->htable = NULL;
8485
}
8586

86-
int hashtab_map(struct hashtab *h,
87-
int (*apply)(void *k, void *d, void *args),
87+
int hashtab_map(struct hashtab *h, int (*apply)(void *k, void *d, void *args),
8888
void *args)
8989
{
9090
u32 i;
@@ -137,10 +137,9 @@ void hashtab_stat(struct hashtab *h, struct hashtab_info *info)
137137
#endif /* CONFIG_SECURITY_SELINUX_DEBUG */
138138

139139
int hashtab_duplicate(struct hashtab *new, struct hashtab *orig,
140-
int (*copy)(struct hashtab_node *new,
141-
struct hashtab_node *orig, void *args),
142-
int (*destroy)(void *k, void *d, void *args),
143-
void *args)
140+
int (*copy)(struct hashtab_node *new,
141+
struct hashtab_node *orig, void *args),
142+
int (*destroy)(void *k, void *d, void *args), void *args)
144143
{
145144
struct hashtab_node *cur, *tmp, *tail;
146145
u32 i;
@@ -178,7 +177,7 @@ int hashtab_duplicate(struct hashtab *new, struct hashtab *orig,
178177

179178
return 0;
180179

181-
error:
180+
error:
182181
for (i = 0; i < new->size; i++) {
183182
for (cur = new->htable[i]; cur; cur = tmp) {
184183
tmp = cur->next;
@@ -193,7 +192,7 @@ int hashtab_duplicate(struct hashtab *new, struct hashtab *orig,
193192

194193
void __init hashtab_cache_init(void)
195194
{
196-
hashtab_node_cachep = kmem_cache_create("hashtab_node",
197-
sizeof(struct hashtab_node),
198-
0, SLAB_PANIC, NULL);
195+
hashtab_node_cachep = kmem_cache_create("hashtab_node",
196+
sizeof(struct hashtab_node), 0,
197+
SLAB_PANIC, NULL);
199198
}

0 commit comments

Comments
 (0)