From: Alexey Gladkov <legion@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>,
"Eric W . Biederman" <ebiederm@xmission.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
Daniel Walsh <dwalsh@redhat.com>,
Davidlohr Bueso <dbueso@suse.de>,
Kirill Tkhai <ktkhai@virtuozzo.com>,
Linux Containers <containers@lists.linux.dev>,
Manfred Spraul <manfred@colorfullife.com>,
Serge Hallyn <serge@hallyn.com>,
Varad Gautam <varad.gautam@suse.com>,
Vasily Averin <vvs@virtuozzo.com>
Subject: [PATCH v2 4/4] ipc: Remove extra braces
Date: Tue, 3 May 2022 15:39:57 +0200 [thread overview]
Message-ID: <37687827f630bc150210f5b8abeeb00f1336814e.1651584847.git.legion@kernel.org> (raw)
In-Reply-To: <cover.1651584847.git.legion@kernel.org>
Fix coding style. In the previous commit, I added braces because,
in addition to changing .data, .extra1 also changed. Now this is not
needed.
Fixes: 1f5c135ee509 ("ipc: Store ipc sysctls in the ipc namespace")
Signed-off-by: Alexey Gladkov <legion@kernel.org>
---
ipc/ipc_sysctl.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 5a58598d48c8..ef313ecfb53a 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -222,42 +222,41 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
int i;
for (i = 0; i < ARRAY_SIZE(ipc_sysctls); i++) {
- if (tbl[i].data == &init_ipc_ns.shm_ctlmax) {
+ if (tbl[i].data == &init_ipc_ns.shm_ctlmax)
tbl[i].data = &ns->shm_ctlmax;
- } else if (tbl[i].data == &init_ipc_ns.shm_ctlall) {
+ else if (tbl[i].data == &init_ipc_ns.shm_ctlall)
tbl[i].data = &ns->shm_ctlall;
- } else if (tbl[i].data == &init_ipc_ns.shm_ctlmni) {
+ else if (tbl[i].data == &init_ipc_ns.shm_ctlmni)
tbl[i].data = &ns->shm_ctlmni;
- } else if (tbl[i].data == &init_ipc_ns.shm_rmid_forced) {
+ else if (tbl[i].data == &init_ipc_ns.shm_rmid_forced)
tbl[i].data = &ns->shm_rmid_forced;
- } else if (tbl[i].data == &init_ipc_ns.msg_ctlmax) {
+ else if (tbl[i].data == &init_ipc_ns.msg_ctlmax)
tbl[i].data = &ns->msg_ctlmax;
- } else if (tbl[i].data == &init_ipc_ns.msg_ctlmni) {
+ else if (tbl[i].data == &init_ipc_ns.msg_ctlmni)
tbl[i].data = &ns->msg_ctlmni;
- } else if (tbl[i].data == &init_ipc_ns.msg_ctlmnb) {
+ else if (tbl[i].data == &init_ipc_ns.msg_ctlmnb)
tbl[i].data = &ns->msg_ctlmnb;
- } else if (tbl[i].data == &init_ipc_ns.sem_ctls) {
+ else if (tbl[i].data == &init_ipc_ns.sem_ctls)
tbl[i].data = &ns->sem_ctls;
#ifdef CONFIG_CHECKPOINT_RESTORE
- } else if (tbl[i].data == &init_ipc_ns.ids[IPC_SEM_IDS].next_id) {
+ else if (tbl[i].data == &init_ipc_ns.ids[IPC_SEM_IDS].next_id)
tbl[i].data = &ns->ids[IPC_SEM_IDS].next_id;
- } else if (tbl[i].data == &init_ipc_ns.ids[IPC_MSG_IDS].next_id) {
+ else if (tbl[i].data == &init_ipc_ns.ids[IPC_MSG_IDS].next_id)
tbl[i].data = &ns->ids[IPC_MSG_IDS].next_id;
- } else if (tbl[i].data == &init_ipc_ns.ids[IPC_SHM_IDS].next_id) {
+ else if (tbl[i].data == &init_ipc_ns.ids[IPC_SHM_IDS].next_id)
tbl[i].data = &ns->ids[IPC_SHM_IDS].next_id;
#endif
- } else {
+ else
tbl[i].data = NULL;
- }
}
ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl);
--
2.33.3
next prev parent reply other threads:[~2022-05-03 15:19 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 18:18 [PATCH v4 0/2] ipc: Store mq and ipc sysctls in the ipc namespace Alexey Gladkov
2022-02-14 18:18 ` [PATCH v4 1/2] ipc: Store mqueue " Alexey Gladkov
2022-02-14 18:18 ` [PATCH v4 2/2] ipc: Store ipc " Alexey Gladkov
2022-03-23 20:24 ` [GIT PULL] ipc: Bind to the ipc namespace at open time Eric W. Biederman
2022-03-24 18:12 ` Linus Torvalds
2022-03-24 21:48 ` Eric W. Biederman
2022-03-24 22:16 ` Linus Torvalds
2022-03-25 12:10 ` Alexey Gladkov
2022-04-22 12:53 ` [PATCH v1 0/4] ipc: Remove extra1 field abuse to pass ipc namespace Alexey Gladkov
2022-04-22 12:53 ` [PATCH v1 1/4] " Alexey Gladkov
2022-05-02 16:07 ` Eric W. Biederman
2022-04-22 12:53 ` [PATCH v1 2/4] ipc: Use proper " Alexey Gladkov
2022-05-02 16:09 ` Eric W. Biederman
2022-05-03 13:39 ` Alexey Gladkov
2022-05-03 13:39 ` [PATCH v2 1/4] ipc: Use the same namespace to modify and validate Alexey Gladkov
2022-05-03 13:39 ` [PATCH v2 2/4] ipc: Remove extra1 field abuse to pass ipc namespace Alexey Gladkov
2022-05-03 13:39 ` [PATCH v2 3/4] ipc: Check permissions for checkpoint_restart sysctls at open time Alexey Gladkov
2022-05-03 13:39 ` Alexey Gladkov [this message]
2022-04-22 12:53 ` [PATCH v1 " Alexey Gladkov
2022-04-22 12:53 ` [PATCH v1 4/4] ipc: Remove extra braces Alexey Gladkov
2022-04-22 20:44 ` [PATCH v1 0/4] ipc: Remove extra1 field abuse to pass ipc namespace Linus Torvalds
2022-05-04 3:42 ` Philip Rhoades
2022-06-01 13:20 ` [RFC PATCH 0/4] API extension for handling sysctl Alexey Gladkov
2022-06-01 13:20 ` [RFC PATCH 1/4] sysctl: " Alexey Gladkov
2022-06-01 19:19 ` Matthew Wilcox
2022-06-01 19:23 ` Linus Torvalds
2022-06-01 19:25 ` Matthew Wilcox
2022-06-01 19:31 ` Linus Torvalds
2022-06-01 19:32 ` Alexey Gladkov
2022-06-01 13:20 ` [RFC PATCH 2/4] sysctl: ipc: Do not use dynamic memory Alexey Gladkov
2022-06-01 16:45 ` Linus Torvalds
2022-06-01 18:24 ` Alexey Gladkov
2022-06-01 18:34 ` Linus Torvalds
2022-06-01 19:05 ` Alexey Gladkov
2022-06-09 18:51 ` Luis Chamberlain
2022-06-01 13:20 ` [RFC PATCH 3/4] sysctl: userns: " Alexey Gladkov
2022-06-01 13:20 ` [RFC PATCH 4/4] sysctl: mqueue: " Alexey Gladkov
2022-06-09 16:45 ` [RFC PATCH 0/4] API extension for handling sysctl Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37687827f630bc150210f5b8abeeb00f1336814e.1651584847.git.legion@kernel.org \
--to=legion@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.mikhalitsyn@virtuozzo.com \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux.dev \
--cc=dbueso@suse.de \
--cc=dwalsh@redhat.com \
--cc=ebiederm@xmission.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=serge@hallyn.com \
--cc=torvalds@linux-foundation.org \
--cc=varad.gautam@suse.com \
--cc=vvs@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).