* [PATCH] sysctl: Inline braces for ctl_table and ctl_table_header
@ 2019-09-03 15:49 Alessio Balsini
2019-10-11 13:56 ` Luis Chamberlain
0 siblings, 1 reply; 2+ messages in thread
From: Alessio Balsini @ 2019-09-03 15:49 UTC (permalink / raw)
To: linux-kernel
Cc: linux-fsdevel, kernel-team, Alessio Balsini, Luis Chamberlain, Kees Cook
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.
Signed-off-by: Alessio Balsini <balsini@android.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
---
include/linux/sysctl.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 6df477329b76e..02fa84493f237 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -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;
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sysctl: Inline braces for ctl_table and ctl_table_header
2019-09-03 15:49 [PATCH] sysctl: Inline braces for ctl_table and ctl_table_header Alessio Balsini
@ 2019-10-11 13:56 ` Luis Chamberlain
0 siblings, 0 replies; 2+ messages in thread
From: Luis Chamberlain @ 2019-10-11 13:56 UTC (permalink / raw)
To: Alessio Balsini, Andrew Morton
Cc: linux-kernel, linux-fsdevel, kernel-team, Kees Cook
On Tue, Sep 03, 2019 at 04:49:06PM +0100, Alessio Balsini wrote:
> 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.
>
> Signed-off-by: Alessio Balsini <balsini@android.com>
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Kees Cook <keescook@chromium.org>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-11 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 15:49 [PATCH] sysctl: Inline braces for ctl_table and ctl_table_header Alessio Balsini
2019-10-11 13:56 ` Luis Chamberlain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).