linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand
@ 2021-12-21 18:45 Colin Ian King
  2021-12-21 21:45 ` Luis Chamberlain
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Ian King @ 2021-12-21 18:45 UTC (permalink / raw)
  To: Luis Chamberlain, Kees Cook, Iurii Zaikin, Nathan Chancellor,
	Nick Desaulniers, Xiaoming Ni, linux-fsdevel
  Cc: kernel-janitors, linux-kernel, llvm

The const variable ten_thousand is not used, it is redundant and can
be removed.

Cleans up clang warning:
kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable]
static const int ten_thousand = 10000;

Fixes: c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 kernel/sysctl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7f07b058b180..ace130de4a17 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -95,9 +95,6 @@
 
 /* Constants used for minimum and  maximum */
 
-#ifdef CONFIG_PRINTK
-static const int ten_thousand = 10000;
-#endif
 #ifdef CONFIG_PERF_EVENTS
 static const int six_hundred_forty_kb = 640 * 1024;
 #endif
-- 
2.33.1


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

* Re: [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand
  2021-12-21 18:45 [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand Colin Ian King
@ 2021-12-21 21:45 ` Luis Chamberlain
  2021-12-21 22:17   ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Chamberlain @ 2021-12-21 21:45 UTC (permalink / raw)
  To: Colin Ian King, Andrew Morton
  Cc: Kees Cook, Iurii Zaikin, Nathan Chancellor, Nick Desaulniers,
	Xiaoming Ni, linux-fsdevel, kernel-janitors, linux-kernel, llvm

On Tue, Dec 21, 2021 at 06:45:01PM +0000, Colin Ian King wrote:
> The const variable ten_thousand is not used, it is redundant and can
> be removed.
> 
> Cleans up clang warning:
> kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable]
> static const int ten_thousand = 10000;
> 
> Fixes: c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Acked-by: Andrew Morton <akpm@linux-foundation.org>

  Luis

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

* Re: [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand
  2021-12-21 21:45 ` Luis Chamberlain
@ 2021-12-21 22:17   ` Nick Desaulniers
  2021-12-21 22:48     ` Luis Chamberlain
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Desaulniers @ 2021-12-21 22:17 UTC (permalink / raw)
  To: Luis Chamberlain, Andrew Morton
  Cc: Colin Ian King, Kees Cook, Iurii Zaikin, Nathan Chancellor,
	Xiaoming Ni, linux-fsdevel, kernel-janitors, linux-kernel, llvm

On Tue, Dec 21, 2021 at 1:46 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
>
> On Tue, Dec 21, 2021 at 06:45:01PM +0000, Colin Ian King wrote:
> > The const variable ten_thousand is not used, it is redundant and can
> > be removed.
> >
> > Cleans up clang warning:
> > kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable]
> > static const int ten_thousand = 10000;
> >
> > Fixes: c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
> > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>
> Acked-by: Andrew Morton <akpm@linux-foundation.org>

Just double checking; I don't think I've seen someone supply someone
else's Acked by tag in a reply before. Was there some discussion off
thread that I missed? If so, do you mind linking to it?  Was this a
typo, perhaps, and you meant to supply your own Acked by tag? Are
"Luis Chamberlain" and "Andrew Morton" aliases? :^P

-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand
  2021-12-21 22:17   ` Nick Desaulniers
@ 2021-12-21 22:48     ` Luis Chamberlain
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2021-12-21 22:48 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Andrew Morton, Colin Ian King, Kees Cook, Iurii Zaikin,
	Nathan Chancellor, Xiaoming Ni, linux-fsdevel, kernel-janitors,
	linux-kernel, llvm

On Tue, Dec 21, 2021 at 02:17:41PM -0800, Nick Desaulniers wrote:
> On Tue, Dec 21, 2021 at 1:46 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
> >
> > On Tue, Dec 21, 2021 at 06:45:01PM +0000, Colin Ian King wrote:
> > > The const variable ten_thousand is not used, it is redundant and can
> > > be removed.
> > >
> > > Cleans up clang warning:
> > > kernel/sysctl.c:99:18: warning: unused variable 'ten_thousand' [-Wunused-const-variable]
> > > static const int ten_thousand = 10000;
> > >
> > > Fixes: c26da54dc8ca ("printk: move printk sysctl to printk/sysctl.c")
> > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> >
> > Acked-by: Andrew Morton <akpm@linux-foundation.org>
> 
> Just double checking; I don't think I've seen someone supply someone
> else's Acked by tag in a reply before. Was there some discussion off
> thread that I missed? If so, do you mind linking to it?  Was this a
> typo, perhaps, and you meant to supply your own Acked by tag? Are
> "Luis Chamberlain" and "Andrew Morton" aliases? :^P

Haha sorry I copied and paste error.

Acked-by: Luis Chamberlain <mcgrof@kernel.org> 

  Luis

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

end of thread, other threads:[~2021-12-21 22:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 18:45 [PATCH][next] kernel/sysctl.c: remove unused variable ten_thousand Colin Ian King
2021-12-21 21:45 ` Luis Chamberlain
2021-12-21 22:17   ` Nick Desaulniers
2021-12-21 22:48     ` 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).