linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] init/version.c: remove unused including <linux/version.h>
@ 2021-04-08  6:26 Tian Tao
  2021-04-09  5:05 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Tian Tao @ 2021-04-08  6:26 UTC (permalink / raw)
  To: christian.brauner, masahiroy, akpm, ktkhai
  Cc: linux-kernel, Tian Tao, Zhiqi Song

Remove including <linux/version.h> that don't need it.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
 init/version.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/init/version.c b/init/version.c
index 92afc78..b1329f1 100644
--- a/init/version.c
+++ b/init/version.c
@@ -13,7 +13,6 @@
 #include <linux/uts.h>
 #include <linux/utsname.h>
 #include <generated/utsrelease.h>
-#include <linux/version.h>
 #include <linux/proc_ns.h>
 
 struct uts_namespace init_uts_ns = {
-- 
2.7.4


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

* Re: [PATCH] init/version.c: remove unused including <linux/version.h>
  2021-04-08  6:26 [PATCH] init/version.c: remove unused including <linux/version.h> Tian Tao
@ 2021-04-09  5:05 ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2021-04-09  5:05 UTC (permalink / raw)
  To: Tian Tao; +Cc: christian.brauner, masahiroy, ktkhai, linux-kernel, Zhiqi Song

On Thu, 8 Apr 2021 14:26:58 +0800 Tian Tao <tiantao6@hisilicon.com> wrote:

> Remove including <linux/version.h> that don't need it.
> 

Um, how can version.c possibly not include version.h?

Sure, it may obtain access to version.h via some other include, but
that's plain luck and nonsense.  And it's unreliable and it requires
whichever-header-is-doing-this to continue to include version.h on
behalf of some .c file which should be including it directly!



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

* [PATCH] init/version.c: remove unused including <linux/version.h>
@ 2021-01-23  1:22 Ye Bin
  0 siblings, 0 replies; 3+ messages in thread
From: Ye Bin @ 2021-01-23  1:22 UTC (permalink / raw)
  To: christian.brauner, sfr, masahiroy, keescook, ktkhai, linux-kernel
  Cc: Ye Bin, Hulk Robot

Fix follow warning:
init/version.c:16:1: unused including <linux/version.h>

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 init/version.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/init/version.c b/init/version.c
index 92afc782b043..b1329f16c6b6 100644
--- a/init/version.c
+++ b/init/version.c
@@ -13,7 +13,6 @@
 #include <linux/uts.h>
 #include <linux/utsname.h>
 #include <generated/utsrelease.h>
-#include <linux/version.h>
 #include <linux/proc_ns.h>
 
 struct uts_namespace init_uts_ns = {
-- 
2.25.4


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

end of thread, other threads:[~2021-04-09  5:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  6:26 [PATCH] init/version.c: remove unused including <linux/version.h> Tian Tao
2021-04-09  5:05 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2021-01-23  1:22 Ye Bin

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).