Skip to content

Commit 1869550

Browse files
cgzonesintel-lab-lkp
authored andcommitted
selinux: resolve checkpatch errors
Reported by checkpatch: security/selinux/nlmsgtab.c --------------------------- ERROR: that open brace { should be on the previous line torvalds#29: FILE: security/selinux/nlmsgtab.c:29: +static const struct nlmsg_perm nlmsg_route_perms[] = +{ ERROR: that open brace { should be on the previous line torvalds#97: FILE: security/selinux/nlmsgtab.c:97: +static const struct nlmsg_perm nlmsg_tcpdiag_perms[] = +{ ERROR: that open brace { should be on the previous line torvalds#105: FILE: security/selinux/nlmsgtab.c:105: +static const struct nlmsg_perm nlmsg_xfrm_perms[] = +{ ERROR: that open brace { should be on the previous line torvalds#134: FILE: security/selinux/nlmsgtab.c:134: +static const struct nlmsg_perm nlmsg_audit_perms[] = +{ security/selinux/ss/policydb.c ------------------------------ ERROR: that open brace { should be on the previous line torvalds#318: FILE: security/selinux/ss/policydb.c:318: +static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap) = +{ ERROR: that open brace { should be on the previous line torvalds#674: FILE: security/selinux/ss/policydb.c:674: +static int (*index_f[SYM_NUM]) (void *key, void *datum, void *datap) = +{ ERROR: that open brace { should be on the previous line #1643: FILE: security/selinux/ss/policydb.c:1643: +static int (*read_f[SYM_NUM]) (struct policydb *p, struct symtab *s, void *fp) = +{ ERROR: that open brace { should be on the previous line #3246: FILE: security/selinux/ss/policydb.c:3246: + void *datap) = +{ Signed-off-by: Christian Göttsche <[email protected]>
1 parent 6a9e261 commit 1869550

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

security/selinux/include/initial_sid_to_string.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
static const char *initial_sid_to_string[] =
3-
{
2+
static const char *initial_sid_to_string[] = {
43
NULL,
54
"kernel",
65
"security",

security/selinux/nlmsgtab.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ struct nlmsg_perm {
2525
u32 perm;
2626
};
2727

28-
static const struct nlmsg_perm nlmsg_route_perms[] =
29-
{
28+
static const struct nlmsg_perm nlmsg_route_perms[] = {
3029
{ RTM_NEWLINK, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
3130
{ RTM_DELLINK, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
3231
{ RTM_GETLINK, NETLINK_ROUTE_SOCKET__NLMSG_READ },
@@ -97,16 +96,14 @@ static const struct nlmsg_perm nlmsg_route_perms[] =
9796
{ RTM_GETTUNNEL, NETLINK_ROUTE_SOCKET__NLMSG_READ },
9897
};
9998

100-
static const struct nlmsg_perm nlmsg_tcpdiag_perms[] =
101-
{
99+
static const struct nlmsg_perm nlmsg_tcpdiag_perms[] = {
102100
{ TCPDIAG_GETSOCK, NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
103101
{ DCCPDIAG_GETSOCK, NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
104102
{ SOCK_DIAG_BY_FAMILY, NETLINK_TCPDIAG_SOCKET__NLMSG_READ },
105103
{ SOCK_DESTROY, NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE },
106104
};
107105

108-
static const struct nlmsg_perm nlmsg_xfrm_perms[] =
109-
{
106+
static const struct nlmsg_perm nlmsg_xfrm_perms[] = {
110107
{ XFRM_MSG_NEWSA, NETLINK_XFRM_SOCKET__NLMSG_WRITE },
111108
{ XFRM_MSG_DELSA, NETLINK_XFRM_SOCKET__NLMSG_WRITE },
112109
{ XFRM_MSG_GETSA, NETLINK_XFRM_SOCKET__NLMSG_READ },
@@ -134,8 +131,7 @@ static const struct nlmsg_perm nlmsg_xfrm_perms[] =
134131
{ XFRM_MSG_GETDEFAULT, NETLINK_XFRM_SOCKET__NLMSG_READ },
135132
};
136133

137-
static const struct nlmsg_perm nlmsg_audit_perms[] =
138-
{
134+
static const struct nlmsg_perm nlmsg_audit_perms[] = {
139135
{ AUDIT_GET, NETLINK_AUDIT_SOCKET__NLMSG_READ },
140136
{ AUDIT_SET, NETLINK_AUDIT_SOCKET__NLMSG_WRITE },
141137
{ AUDIT_LIST, NETLINK_AUDIT_SOCKET__NLMSG_READPRIV },

security/selinux/ss/policydb.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,7 @@ static int cat_destroy(void *key, void *datum, void *p)
314314
return 0;
315315
}
316316

317-
static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap) =
318-
{
317+
static int (*destroy_f[SYM_NUM]) (void *key, void *datum, void *datap) = {
319318
common_destroy,
320319
cls_destroy,
321320
role_destroy,
@@ -670,8 +669,7 @@ static int cat_index(void *key, void *datum, void *datap)
670669
return 0;
671670
}
672671

673-
static int (*index_f[SYM_NUM]) (void *key, void *datum, void *datap) =
674-
{
672+
static int (*index_f[SYM_NUM]) (void *key, void *datum, void *datap) = {
675673
common_index,
676674
class_index,
677675
role_index,
@@ -1639,8 +1637,7 @@ static int cat_read(struct policydb *p, struct symtab *s, void *fp)
16391637
return rc;
16401638
}
16411639

1642-
static int (*read_f[SYM_NUM]) (struct policydb *p, struct symtab *s, void *fp) =
1643-
{
1640+
static int (*read_f[SYM_NUM]) (struct policydb *p, struct symtab *s, void *fp) = {
16441641
common_read,
16451642
class_read,
16461643
role_read,
@@ -3242,8 +3239,7 @@ static int user_write(void *vkey, void *datum, void *ptr)
32423239
}
32433240

32443241
static int (*write_f[SYM_NUM]) (void *key, void *datum,
3245-
void *datap) =
3246-
{
3242+
void *datap) = {
32473243
common_write,
32483244
class_write,
32493245
role_write,

0 commit comments

Comments
 (0)