Skip to contentSkip to conversation

sysctl: Inline braces for ctl_table and ctl_table_header

PATCH In review Alessio Balsini 2 participants 2 messages Sep 3, 2019 – Oct 11, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysctl: Inline braces for ctl_table and ctl_table_header

Fix coding style of "struct ctl_table" and "struct ctl_table_header" to have inline brances.
Before:

struct ctl_table

{
	...

After:

struct ctl_table {
	...

Besides the wide use of this proposed cose style, this change helps to find at a glance the struct definition when navigating the code.

Cc Luis Chamberlain <[email protected]>
Cc Kees Cook <[email protected]>
---
 include/linux/sysctl.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
include/linux/sysctl.h +2 -4
index 6df477329b76e..02fa84493f237 100644
@@ -120,8 +120,7 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll)
 	struct ctl_table_poll name = __CTL_TABLE_POLL_INITIALIZER(name)
 
 /* A sysctl table is an array of struct ctl_table: */
-struct ctl_table 
-{
+struct ctl_table {
 	const char *procname;		/* Text ID for /proc/sys, or zero */
 	void *data;
 	int maxlen;
@@ -140,8 +139,7 @@ struct ctl_node {
 
 /* struct ctl_table_header is used to maintain dynamic lists of
    struct ctl_table trees. */
-struct ctl_table_header
-{
+struct ctl_table_header {
 	union {
 		struct {
 			struct ctl_table *ctl_table;
Signature · 1 line
2.23.0.187.g17f5b7556c-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Alessio Balsini

Fix coding style of "struct ctl_table" and "struct ctl_table_header" to have inline brances.
Before:

struct ctl_table

{
	...

After:

struct ctl_table {
	...
Quoted 6 lines

Besides the wide use of this proposed cose style, this change helps to find at a glance the struct definition when navigating the code.

Cc Luis Chamberlain <[email protected]>
Cc Kees Cook <[email protected]>

Luis