All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL
@ 2021-09-18 14:53 Manfred Spraul
  2021-09-20  5:34 ` Davidlohr Bueso
  2021-09-20 13:46 ` Eric W. Biederman
  0 siblings, 2 replies; 3+ messages in thread
From: Manfred Spraul @ 2021-09-18 14:53 UTC (permalink / raw)
  To: LKML, Michal Clapinski, Davidlohr Bueso, Andrew Morton
  Cc: Eric W . Biederman, 1vier1, Manfred Spraul

Compilation of ipc/ipc_sysctl.c is controlled by
obj-$(CONFIG_SYSVIPC_SYSCTL)
[see ipc/Makefile]

And CONFIG_SYSVIPC_SYSCTL depends on SYSCTL
[see init/Kconfig]

An SYSCTL is selected by PROC_SYSCTL.
[see fs/proc/Kconfig]

Thus: #ifndef CONFIG_PROC_SYSCTL in ipc/ipc_sysctl.c is impossible, the
fallback can be removed.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
---
 ipc/ipc_sysctl.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 345e4d673e61..f101c171753f 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -23,7 +23,6 @@ static void *get_ipc(struct ctl_table *table)
 	return which;
 }
 
-#ifdef CONFIG_PROC_SYSCTL
 static int proc_ipc_dointvec(struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -118,18 +117,6 @@ static int proc_ipc_dointvec_minmax_checkpoint_restore(struct ctl_table *table,
 }
 #endif
 
-#else
-#define proc_ipc_doulongvec_minmax NULL
-#define proc_ipc_dointvec	   NULL
-#define proc_ipc_dointvec_minmax   NULL
-#define proc_ipc_dointvec_minmax_orphans   NULL
-#define proc_ipc_auto_msgmni	   NULL
-#define proc_ipc_sem_dointvec	   NULL
-#ifdef CONFIG_CHECKPOINT_RESTORE
-#define proc_ipc_dointvec_minmax_checkpoint_restore	NULL
-#endif	/* CONFIG_CHECKPOINT_RESTORE */
-#endif
-
 int ipc_mni = IPCMNI;
 int ipc_mni_shift = IPCMNI_SHIFT;
 int ipc_min_cycle = RADIX_TREE_MAP_SIZE;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL
  2021-09-18 14:53 [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL Manfred Spraul
@ 2021-09-20  5:34 ` Davidlohr Bueso
  2021-09-20 13:46 ` Eric W. Biederman
  1 sibling, 0 replies; 3+ messages in thread
From: Davidlohr Bueso @ 2021-09-20  5:34 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: LKML, Michal Clapinski, Andrew Morton, Eric W . Biederman, 1vier1

On Sat, 18 Sep 2021, Manfred Spraul wrote:

>Compilation of ipc/ipc_sysctl.c is controlled by
>obj-$(CONFIG_SYSVIPC_SYSCTL)
>[see ipc/Makefile]
>
>And CONFIG_SYSVIPC_SYSCTL depends on SYSCTL
>[see init/Kconfig]
>
>An SYSCTL is selected by PROC_SYSCTL.
>[see fs/proc/Kconfig]
>
>Thus: #ifndef CONFIG_PROC_SYSCTL in ipc/ipc_sysctl.c is impossible, the
>fallback can be removed.
>
>Signed-off-by: Manfred Spraul <manfred@colorfullife.com>

Acked-by: Davidlohr Bueso <dbueso@suse.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL
  2021-09-18 14:53 [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL Manfred Spraul
  2021-09-20  5:34 ` Davidlohr Bueso
@ 2021-09-20 13:46 ` Eric W. Biederman
  1 sibling, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2021-09-20 13:46 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: LKML, Michal Clapinski, Davidlohr Bueso, Andrew Morton, 1vier1

Manfred Spraul <manfred@colorfullife.com> writes:

> Compilation of ipc/ipc_sysctl.c is controlled by
> obj-$(CONFIG_SYSVIPC_SYSCTL)
> [see ipc/Makefile]
>
> And CONFIG_SYSVIPC_SYSCTL depends on SYSCTL
> [see init/Kconfig]
>
> An SYSCTL is selected by PROC_SYSCTL.
> [see fs/proc/Kconfig]
>
> Thus: #ifndef CONFIG_PROC_SYSCTL in ipc/ipc_sysctl.c is impossible, the
> fallback can be removed.

Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>

Eric


> Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
> ---
>  ipc/ipc_sysctl.c | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
> index 345e4d673e61..f101c171753f 100644
> --- a/ipc/ipc_sysctl.c
> +++ b/ipc/ipc_sysctl.c
> @@ -23,7 +23,6 @@ static void *get_ipc(struct ctl_table *table)
>  	return which;
>  }
>  
> -#ifdef CONFIG_PROC_SYSCTL
>  static int proc_ipc_dointvec(struct ctl_table *table, int write,
>  		void *buffer, size_t *lenp, loff_t *ppos)
>  {
> @@ -118,18 +117,6 @@ static int proc_ipc_dointvec_minmax_checkpoint_restore(struct ctl_table *table,
>  }
>  #endif
>  
> -#else
> -#define proc_ipc_doulongvec_minmax NULL
> -#define proc_ipc_dointvec	   NULL
> -#define proc_ipc_dointvec_minmax   NULL
> -#define proc_ipc_dointvec_minmax_orphans   NULL
> -#define proc_ipc_auto_msgmni	   NULL
> -#define proc_ipc_sem_dointvec	   NULL
> -#ifdef CONFIG_CHECKPOINT_RESTORE
> -#define proc_ipc_dointvec_minmax_checkpoint_restore	NULL
> -#endif	/* CONFIG_CHECKPOINT_RESTORE */
> -#endif
> -
>  int ipc_mni = IPCMNI;
>  int ipc_mni_shift = IPCMNI_SHIFT;
>  int ipc_min_cycle = RADIX_TREE_MAP_SIZE;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-20 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 14:53 [PATCH] ipc/ipc_sysctl.c: Remove fallback for !CONFIG_PROC_SYSCTL Manfred Spraul
2021-09-20  5:34 ` Davidlohr Bueso
2021-09-20 13:46 ` Eric W. Biederman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.