Skip to contentSkip to conversation

firmware_loader: remove #include <generated/utsrelease.h>

PATCH Applied Thomas Weißschuh 6 participants 15 messages Nov 26, 2022 – Dec 8, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 firmware_loader: remove #include <generated/utsrelease.h>

utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations.

---
 drivers/base/firmware_loader/firmware.h | 2 --
 1 file changed, 2 deletions(-)
drivers/base/firmware_loader/firmware.h +0 -2
index fe77e91c38a2..bf549d6500d7 100644
@@ -9,8 +9,6 @@
 #include <linux/list.h>
 #include <linux/completion.h>
 
-#include <generated/utsrelease.h>
-
 /**
  * enum fw_opt - options to control firmware loading behaviour
  *

base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536

Signature · 1 line
2.38.1
#1 lore raw

PATCH 2/3 powerpc/book3e: remove #include <generated/utsrelease.h>

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

Fixes 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>")
---
 arch/powerpc/mm/nohash/kaslr_booke.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/mm/nohash/kaslr_booke.c +0 -1
index 0d04f9d5da8d..2fb3edafe9ab 100644
@@ -19,7 +19,6 @@
 #include <asm/cacheflush.h>
 #include <asm/kdump.h>
 #include <mm/mmu_decl.h>
-#include <generated/utsrelease.h>
 
 struct regions {
 	unsigned long pa_start;
Signature · 1 line
2.38.1
#2 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit :

Quoted 3 lines

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

What about:
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c

I believe you can do a lot more than what you did in your series.

List of files using UTS_VERSION :

$ git grep -l UTS_VERSION
Documentation/kbuild/kbuild.rst
arch/s390/boot/version.c
arch/x86/boot/compressed/kaslr.c
arch/x86/boot/version.c
init/Makefile
init/version-timestamp.c

List of files including generated/utsrelease.h :

$ git grep -l "#include <generated/utsrelease.h>"
Documentation/target/tcm_mod_builder.py
arch/alpha/boot/bootp.c
arch/alpha/boot/bootpz.c
arch/alpha/boot/main.c
arch/powerpc/mm/nohash/kaslr_booke.c
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c
arch/s390/boot/version.c
arch/x86/boot/compressed/kaslr.c
arch/x86/boot/version.c
crypto/fips.c
drivers/auxdisplay/arm-charlcd.c
drivers/auxdisplay/charlcd.c
drivers/auxdisplay/line-display.c
drivers/base/firmware_loader/firmware.h
drivers/base/firmware_loader/main.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/net/bonding/bonding_priv.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/pensando/ionic/ionic_main.c
drivers/net/ethernet/rocker/rocker_main.c
drivers/net/team/team.c
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/discovery.c
drivers/power/supply/test_power.c
drivers/staging/octeon/ethernet-mdio.c
drivers/target/target_core_configfs.c
drivers/target/tcm_fc/tfc_conf.c
drivers/vhost/scsi.c
drivers/xen/xen-scsiback.c
include/linux/vermagic.h
init/version-timestamp.c
init/version.c
kernel/sys.c
kernel/trace/trace.c
net/ethtool/ioctl.c
net/rxrpc/local_event.c
security/integrity/ima/ima_init.c

Christophe

Quoted 19 lines
Fixes 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>")
---
  arch/powerpc/mm/nohash/kaslr_booke.c | 1 -
  1 file changed, 1 deletion(-)
arch/powerpc/mm/nohash/kaslr_booke.c +0 -1
index 0d04f9d5da8d..2fb3edafe9ab 100644
@@ -19,7 +19,6 @@
  #include <asm/cacheflush.h>
  #include <asm/kdump.h>
  #include <mm/mmu_decl.h>
-#include <generated/utsrelease.h>
 
  struct regions {
  	unsigned long pa_start;
#3 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

Quoted 5 lines · Christophe Leroy

Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit :

Quoted 3 lines

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

Quoted 7 lines

What about:
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c

I believe you can do a lot more than what you did in your series.

The commit messages are wrong.
They should have said UTS_RELEASE instead of UTS_VERSION.

Could the maintainers fix this up when applying? I also changed it locally so it will be fixed for v2.

Quoted 4 lines

List of files using UTS_VERSION :

$ git grep -l UTS_VERSION
[..]

Thomas

Reviewed-by
#4 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

Le 26/11/2022 à 15:07, Thomas Weißschuh a écrit :

Quoted 12 lines · Christophe Leroy
Quoted 11 lines

Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit :

Quoted 3 lines

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

What about:
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c

Quoted 4 lines
Quoted 1 line

I believe you can do a lot more than what you did in your series.

The commit messages are wrong.
They should have said UTS_RELEASE instead of UTS_VERSION.

Ah, ok. So your series is complete then:

$ git grep -L UTS_RELEASE `git grep -l "#include <generated/utsrelease.h>"`
Documentation/target/tcm_mod_builder.py
arch/powerpc/mm/nohash/kaslr_booke.c
drivers/base/firmware_loader/firmware.h
init/version.c
Quoted 10 lines

Could the maintainers fix this up when applying? I also changed it locally so it will be fixed for v2.

Quoted 4 lines

List of files using UTS_VERSION :

$ git grep -l UTS_VERSION
[..]

Thomas

#5 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

In reply to Thomas Weißschuh
Quoted 12 lines · Thomas Weißschuh
Quoted 11 lines · Christophe Leroy

Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit :

Quoted 3 lines

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

What about:
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c

Quoted 7 lines
Quoted 1 line

I believe you can do a lot more than what you did in your series.

The commit messages are wrong.
They should have said UTS_RELEASE instead of UTS_VERSION.

Could the maintainers fix this up when applying? I also changed it locally so it will be fixed for v2.

I'll take this patch, but not the others.

cheers

#6 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

Quoted 19 lines · Michael Ellerman
Quoted 17 lines · Thomas Weißschuh
Quoted 5 lines · Christophe Leroy
Quoted 3 lines · Thomas Weißschuh

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

Quoted 7 lines

What about:
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/powermac/bootx_init.c

I believe you can do a lot more than what you did in your series.

The commit messages are wrong.
They should have said UTS_RELEASE instead of UTS_VERSION.

Quoted 6 lines
Quoted 2 lines

Could the maintainers fix this up when applying? I also changed it locally so it will be fixed for v2.

I'll take this patch, but not the others.

cheers

Okay, I applied 1/3 and 3/3 to the kbuild tree.

Signature · 2 lines
Best Regards
Masahiro Yamada
Reviewed-by on v1 2/3
#7 lore raw

Re: [PATCH 2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

In reply to Thomas Weißschuh
Quoted 8 lines · Thomas Weißschuh

Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>") removed the usage of the define UTS_VERSION but forgot to drop the include.

Fixes 7ad4bd887d27 ("powerpc/book3e: get rid of #include <generated/compile.h>")

---

Assuming you will fix the commit description,

Quoted 16 lines
 arch/powerpc/mm/nohash/kaslr_booke.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/mm/nohash/kaslr_booke.c +0 -2
index 0d04f9d5da8d..2fb3edafe9ab 100644
@@ -19,7 +19,6 @@
 #include <asm/cacheflush.h>
 #include <asm/kdump.h>
 #include <mm/mmu_decl.h>
-#include <generated/utsrelease.h>
 
 struct regions {
        unsigned long pa_start;
--
Quoted 2 lines

2.38.1

--
Best Regards

Masahiro Yamada

#8 lore raw

PATCH 3/3 init/version.c: remove #include <generated/utsversion.h>

In reply to Thomas Weißschuh

Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved the usage of the define UTS_VERSION to the file version-timestamp.c.

version-timestamp.c in turn is included from version.c but already includes utsversion.h itself properly.

The unneeded include of utsversion.h from version.c can be dropped.

Fixes 2df8220cc511 ("kbuild: build init/built-in.a just once")
---
 init/version.c | 1 -
 1 file changed, 1 deletion(-)
init/version.c +0 -1
index 01d4ab05f0ba..f117921811b4 100644
@@ -15,7 +15,6 @@
 #include <linux/printk.h>
 #include <linux/uts.h>
 #include <linux/utsname.h>
-#include <generated/utsrelease.h>
 #include <linux/proc_ns.h>
 
 static int __init early_hostname(char *arg)
Signature · 1 line
2.38.1
Reviewed-by on v1 3/3
#9 lore raw

Re: [PATCH 3/3] init/version.c: remove #include <generated/utsversion.h>

Quoted 3 lines · Thomas Weißschuh

Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved the usage of the define UTS_VERSION to the file version-timestamp.c.

With s/UTS_VERSION/UTS_RELEASE/,

Quoted 27 lines

version-timestamp.c in turn is included from version.c but already includes utsversion.h itself properly.

The unneeded include of utsversion.h from version.c can be dropped.

Fixes 2df8220cc511 ("kbuild: build init/built-in.a just once")
---
 init/version.c | 1 -
 1 file changed, 1 deletion(-)
init/version.c +0 -2
index 01d4ab05f0ba..f117921811b4 100644
@@ -15,7 +15,6 @@
 #include <linux/printk.h>
 #include <linux/uts.h>
 #include <linux/utsname.h>
-#include <generated/utsrelease.h>
 #include <linux/proc_ns.h>
 
 static int __init early_hostname(char *arg)
--

2.38.1

Signature · 2 lines
Best Regards
Masahiro Yamada
#10 lore raw

Re: [PATCH 3/3] init/version.c: remove #include <generated/utsversion.h>

Quoted 34 lines · Masahiro Yamada
Quoted 3 lines · Thomas Weißschuh

Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved the usage of the define UTS_VERSION to the file version-timestamp.c.

With s/UTS_VERSION/UTS_RELEASE/,

Quoted 23 lines

version-timestamp.c in turn is included from version.c but already includes utsversion.h itself properly.

The unneeded include of utsversion.h from version.c can be dropped.

Fixes 2df8220cc511 ("kbuild: build init/built-in.a just once")
---
 init/version.c | 1 -
 1 file changed, 1 deletion(-)
init/version.c +0 -1
index 01d4ab05f0ba..f117921811b4 100644
@@ -15,7 +15,6 @@
 #include <linux/printk.h>
 #include <linux/uts.h>
 #include <linux/utsname.h>
-#include <generated/utsrelease.h>
 #include <linux/proc_ns.h>
 
Quoted 9 lines
Quoted 4 lines
init/version.c +0 -1
 static int __init early_hostname(char *arg)
--

2.38.1

--
Best Regards
Masahiro Yamada

This patch is so confusing because the subject is also wrong.

I fixed up the commit description:

init/version.c: remove #include <generated/utsrelease.h>

Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved the usage of the define UTS_RELEASE to the file version-timestamp.c.

version-timestamp.c in turn is included from version.c but already includes utsrelease.h itself properly.

The unneeded include of utsrelease.h from version.c can be dropped.

Fixes 2df8220cc511 ("kbuild: build init/built-in.a just once")

Applied to linux-kbuild.
Thanks.

Signature · 2 lines
Best Regards
Masahiro Yamada
Reviewed-by on v1 1/3
#11 lore raw
In reply to Thomas Weißschuh
Quoted 7 lines · Thomas Weißschuh

utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations.

---

Quoted 21 lines
 drivers/base/firmware_loader/firmware.h | 2 --
 1 file changed, 2 deletions(-)
drivers/base/firmware_loader/firmware.h +0 -2
index fe77e91c38a2..bf549d6500d7 100644
@@ -9,8 +9,6 @@
 #include <linux/list.h>
 #include <linux/completion.h>
 
-#include <generated/utsrelease.h>
-
 /**
  * enum fw_opt - options to control firmware loading behaviour
  *

base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536 --
2.38.1

Signature · 2 lines
Best Regards
Masahiro Yamada
Reviewed-by on v1 1/3
#12 lore raw
In reply to Thomas Weißschuh
Quoted 3 lines · Thomas Weißschuh

utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations.

Quoted 20 lines
---
 drivers/base/firmware_loader/firmware.h | 2 --
 1 file changed, 2 deletions(-)
drivers/base/firmware_loader/firmware.h +0 -2
index fe77e91c38a2..bf549d6500d7 100644
@@ -9,8 +9,6 @@
 #include <linux/list.h>
 #include <linux/completion.h>
 
-#include <generated/utsrelease.h>
-
 /**
  * enum fw_opt - options to control firmware loading behaviour
  *

base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536

#13 lore raw
Quoted 21 lines · Russ Weight
Quoted 3 lines · Thomas Weißschuh

utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations.

Quoted 13 lines
---
 drivers/base/firmware_loader/firmware.h | 2 --
 1 file changed, 2 deletions(-)
drivers/base/firmware_loader/firmware.h +0 -0
index fe77e91c38a2..bf549d6500d7 100644
@@ -9,8 +9,6 @@
 #include <linux/list.h>
 #include <linux/completion.h>
 
Quoted 8 lines
Quoted 7 lines
drivers/base/firmware_loader/firmware.h +0 -2
-#include <generated/utsrelease.h>
-
 /**
  * enum fw_opt - options to control firmware loading behaviour
  *

base-commit: 0b1dcc2cf55ae6523c6fbd0d741b3ac28c9f4536

Applied to linux-kbuild.
Thanks.

Signature · 2 lines
Best Regards
Masahiro Yamada
#14 lore raw

Re: (subset) [PATCH 1/3] firmware_loader: remove #include <generated/utsrelease.h>

In reply to Thomas Weißschuh
Quoted 5 lines · Thomas Weißschuh

utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations.

Applied to powerpc/next.

[2/3] powerpc/book3e: remove #include <generated/utsrelease.h>

      https://git.kernel.org/powerpc/c/d5090716be6791ada9ee142163a4934c1c147aaa

cheers