2021-04-08 06:29:58

by Tian Tao

[permalink] [raw]
Subject: [PATCH] init/version.c: remove unused including <linux/version.h>

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

Signed-off-by: Tian Tao <[email protected]>
Signed-off-by: Zhiqi Song <[email protected]>
---
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


2021-04-09 05:07:27

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] init/version.c: remove unused including <linux/version.h>

On Thu, 8 Apr 2021 14:26:58 +0800 Tian Tao <[email protected]> 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!