public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] treewide: remove unnecessary <linux/version.h> inclusion
@ 2024-08-07 17:47 Masahiro Yamada
  2024-08-07 18:20 ` Nicolas Schier
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2024-08-07 17:47 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Masahiro Yamada

These files do not use any macros defined in <linux/version.h>.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/accessibility/speakup/genmap.c                | 1 -
 drivers/accessibility/speakup/makemapdata.c           | 1 -
 drivers/staging/media/atomisp/include/linux/atomisp.h | 1 -
 samples/trace_events/trace_custom_sched.c             | 1 -
 sound/soc/codecs/cs42l42.c                            | 1 -
 5 files changed, 5 deletions(-)

diff --git a/drivers/accessibility/speakup/genmap.c b/drivers/accessibility/speakup/genmap.c
index 0125000e00d9..0882bab10fb8 100644
--- a/drivers/accessibility/speakup/genmap.c
+++ b/drivers/accessibility/speakup/genmap.c
@@ -10,7 +10,6 @@
 #include <stdio.h>
 #include <libgen.h>
 #include <string.h>
-#include <linux/version.h>
 #include <ctype.h>
 #include "utils.h"
 
diff --git a/drivers/accessibility/speakup/makemapdata.c b/drivers/accessibility/speakup/makemapdata.c
index d7d41bb9b05f..55e4ef8a93dc 100644
--- a/drivers/accessibility/speakup/makemapdata.c
+++ b/drivers/accessibility/speakup/makemapdata.c
@@ -10,7 +10,6 @@
 #include <stdio.h>
 #include <libgen.h>
 #include <string.h>
-#include <linux/version.h>
 #include <ctype.h>
 #include "utils.h"
 
diff --git a/drivers/staging/media/atomisp/include/linux/atomisp.h b/drivers/staging/media/atomisp/include/linux/atomisp.h
index 16c9da172c03..fefbe3cd08f3 100644
--- a/drivers/staging/media/atomisp/include/linux/atomisp.h
+++ b/drivers/staging/media/atomisp/include/linux/atomisp.h
@@ -20,7 +20,6 @@
 #define _ATOM_ISP_H
 
 #include <linux/types.h>
-#include <linux/version.h>
 
 /* struct media_device_info.hw_revision */
 #define ATOMISP_HW_REVISION_MASK	0x0000ff00
diff --git a/samples/trace_events/trace_custom_sched.c b/samples/trace_events/trace_custom_sched.c
index b99d9ab7db85..dd409b704b35 100644
--- a/samples/trace_events/trace_custom_sched.c
+++ b/samples/trace_events/trace_custom_sched.c
@@ -8,7 +8,6 @@
 #define pr_fmt(fmt) fmt
 
 #include <linux/trace_events.h>
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 60d366e53526..6400ac875e6f 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -11,7 +11,6 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/delay.h>
-- 
2.43.0


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

* Re: [PATCH] treewide: remove unnecessary <linux/version.h> inclusion
  2024-08-07 17:47 [PATCH] treewide: remove unnecessary <linux/version.h> inclusion Masahiro Yamada
@ 2024-08-07 18:20 ` Nicolas Schier
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Schier @ 2024-08-07 18:20 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

On Thu 08 Aug 2024 02:47:28 GMT, Masahiro Yamada wrote:
> These files do not use any macros defined in <linux/version.h>.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  drivers/accessibility/speakup/genmap.c                | 1 -
>  drivers/accessibility/speakup/makemapdata.c           | 1 -
>  drivers/staging/media/atomisp/include/linux/atomisp.h | 1 -
>  samples/trace_events/trace_custom_sched.c             | 1 -
>  sound/soc/codecs/cs42l42.c                            | 1 -
>  5 files changed, 5 deletions(-)
> 

Re-checking with

    $ git grep -rle '#include <linux/version.h>' >files-including-version.h
    $ <files-including-version.h xargs git grep -lr -eLINUX_VERSION_{CODE,MAJOR,PATCHLEVEL,SUBLEVEL} -e KERNEL_VERSION >using-macros-from-version.h
    $ diff files-including-version.h using-macros-from-version.h 

reveals that also

    tools/testing/selftests/bpf/progs/dev_cgroup.c
    tools/testing/selftests/bpf/progs/netcnt_prog.c
    tools/testing/selftests/bpf/progs/test_map_lock.c
    tools/testing/selftests/bpf/progs/test_send_signal_kern.c
    tools/testing/selftests/bpf/progs/test_spin_lock.c
    tools/testing/selftests/bpf/progs/test_tcp_estats.c
    tools/testing/selftests/wireguard/qemu/init.c

are including but not using linux/version.h.  This shall probably not 
go through kbuild tree, so it looks complete (enough) to me, thanks!

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-08-07 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 17:47 [PATCH] treewide: remove unnecessary <linux/version.h> inclusion Masahiro Yamada
2024-08-07 18:20 ` Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox