Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH 0/3] Update reference to include/asm-<arch>
@ 2024-12-05 13:20 Geert Uytterhoeven
  2024-12-05 13:20 ` [PATCH 1/3] checkpatch: " Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2024-12-05 13:20 UTC (permalink / raw)
  To: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-arch, linux-kbuild, linux-kernel, Geert Uytterhoeven

	Hi all,

Despite "include/asm-<arch>" having been replaced by
"arch/<arch>/include/asm" 15 years ago, there are still several
references left.

This patch series updates the most visible ones.

Thanks for your comments!

Geert Uytterhoeven (3):
  checkpatch: Update reference to include/asm-<arch>
  kbuild: Drop support for include/asm-<arch> in headers_check.pl
  include: Update references to include/asm-<arch>

 include/asm-generic/syscall.h | 2 +-
 include/linux/bitmap.h        | 2 +-
 include/linux/types.h         | 2 +-
 scripts/checkpatch.pl         | 2 +-
 usr/include/headers_check.pl  | 4 ----
 5 files changed, 4 insertions(+), 8 deletions(-)

-- 
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 1/3] checkpatch: Update reference to include/asm-<arch>
  2024-12-05 13:20 [PATCH 0/3] Update reference to include/asm-<arch> Geert Uytterhoeven
@ 2024-12-05 13:20 ` Geert Uytterhoeven
  2024-12-05 16:33   ` Joe Perches
  2024-12-05 13:20 ` [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl Geert Uytterhoeven
  2024-12-05 13:20 ` [PATCH 3/3] include: Update references to include/asm-<arch> Geert Uytterhoeven
  2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2024-12-05 13:20 UTC (permalink / raw)
  To: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-arch, linux-kbuild, linux-kernel, Geert Uytterhoeven

"include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
time ago.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9eed3683ad76caff..dbb9c3c6fe30f906 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2875,7 +2875,7 @@ sub process {
 
 			if ($realfile =~ m@^include/asm/@) {
 				ERROR("MODIFIED_INCLUDE_ASM",
-				      "do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
+				      "do not modify files in include/asm, change architecture specific files in arch/<architecture>/include/asm\n" . "$here$rawline\n");
 			}
 			$found_file = 1;
 		}
-- 
2.34.1


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

* [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl
  2024-12-05 13:20 [PATCH 0/3] Update reference to include/asm-<arch> Geert Uytterhoeven
  2024-12-05 13:20 ` [PATCH 1/3] checkpatch: " Geert Uytterhoeven
@ 2024-12-05 13:20 ` Geert Uytterhoeven
  2024-12-07 14:27   ` Masahiro Yamada
  2024-12-05 13:20 ` [PATCH 3/3] include: Update references to include/asm-<arch> Geert Uytterhoeven
  2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2024-12-05 13:20 UTC (permalink / raw)
  To: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-arch, linux-kbuild, linux-kernel, Geert Uytterhoeven

"include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
time ago.  All assembler header files are now included using
"#include <asm/*>", so there is no longer a need to rewrite paths.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 usr/include/headers_check.pl | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
index b6aec5e4365f9bf2..7070c891ea294b4d 100755
--- a/usr/include/headers_check.pl
+++ b/usr/include/headers_check.pl
@@ -54,10 +54,6 @@ sub check_include
 		my $inc = $1;
 		my $found;
 		$found = stat($dir . "/" . $inc);
-		if (!$found) {
-			$inc =~ s#asm/#asm-$arch/#;
-			$found = stat($dir . "/" . $inc);
-		}
 		if (!$found) {
 			printf STDERR "$filename:$lineno: included file '$inc' is not exported\n";
 			$ret = 1;
-- 
2.34.1


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

* [PATCH 3/3] include: Update references to include/asm-<arch>
  2024-12-05 13:20 [PATCH 0/3] Update reference to include/asm-<arch> Geert Uytterhoeven
  2024-12-05 13:20 ` [PATCH 1/3] checkpatch: " Geert Uytterhoeven
  2024-12-05 13:20 ` [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl Geert Uytterhoeven
@ 2024-12-05 13:20 ` Geert Uytterhoeven
  2024-12-07 22:17   ` Masahiro Yamada
  2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2024-12-05 13:20 UTC (permalink / raw)
  To: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-arch, linux-kbuild, linux-kernel, Geert Uytterhoeven

"include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
time ago.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/asm-generic/syscall.h | 2 +-
 include/linux/bitmap.h        | 2 +-
 include/linux/types.h         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h
index 5a80fe728dc8b6e1..182b039ce5fa100c 100644
--- a/include/asm-generic/syscall.h
+++ b/include/asm-generic/syscall.h
@@ -5,7 +5,7 @@
  * Copyright (C) 2008-2009 Red Hat, Inc.  All rights reserved.
  *
  * This file is a stub providing documentation for what functions
- * asm-ARCH/syscall.h files need to define.  Most arch definitions
+ * arch/ARCH/include/asm/syscall.h files need to define.  Most arch definitions
  * will be simple inlines.
  *
  * All of these functions expect to be called with no locks,
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 262b6596eca5eafe..2026953e2c4ed368 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -23,7 +23,7 @@ struct device;
  *
  * Function implementations generic to all architectures are in
  * lib/bitmap.c.  Functions implementations that are architecture
- * specific are in various include/asm-<arch>/bitops.h headers
+ * specific are in various arch/<arch>/include/asm/bitops.h headers
  * and other arch/<arch> specific files.
  *
  * See lib/bitmap.c for more details.
diff --git a/include/linux/types.h b/include/linux/types.h
index 2d7b9ae8714ce522..1c509ce8f7f616e1 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -43,7 +43,7 @@ typedef unsigned long		uintptr_t;
 typedef long			intptr_t;
 
 #ifdef CONFIG_HAVE_UID16
-/* This is defined by include/asm-{arch}/posix_types.h */
+/* This is defined by arch/{arch}/include/asm/posix_types.h */
 typedef __kernel_old_uid_t	old_uid_t;
 typedef __kernel_old_gid_t	old_gid_t;
 #endif /* CONFIG_UID16 */
-- 
2.34.1


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

* Re: [PATCH 1/3] checkpatch: Update reference to include/asm-<arch>
  2024-12-05 13:20 ` [PATCH 1/3] checkpatch: " Geert Uytterhoeven
@ 2024-12-05 16:33   ` Joe Perches
  2024-12-07 14:30     ` Masahiro Yamada
  0 siblings, 1 reply; 10+ messages in thread
From: Joe Perches @ 2024-12-05 16:33 UTC (permalink / raw)
  To: Geert Uytterhoeven, Oleg Nesterov, Arnd Bergmann, Yury Norov,
	Rasmus Villemoes, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier
  Cc: linux-arch, linux-kbuild, linux-kernel, Andrew Morton

On Thu, 2024-12-05 at 14:20 +0100, Geert Uytterhoeven wrote:
> "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> time ago.

Thanks.

> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9eed3683ad76caff..dbb9c3c6fe30f906 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2875,7 +2875,7 @@ sub process {
>  
>  			if ($realfile =~ m@^include/asm/@) {
>  				ERROR("MODIFIED_INCLUDE_ASM",
> -				      "do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
> +				      "do not modify files in include/asm, change architecture specific files in arch/<architecture>/include/asm\n" . "$here$rawline\n");
>  			}
>  			$found_file = 1;
>  		}


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

* Re: [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl
  2024-12-05 13:20 ` [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl Geert Uytterhoeven
@ 2024-12-07 14:27   ` Masahiro Yamada
  2024-12-10 10:16     ` Masahiro Yamada
  0 siblings, 1 reply; 10+ messages in thread
From: Masahiro Yamada @ 2024-12-07 14:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Nathan Chancellor, Nicolas Schier, linux-arch, linux-kbuild,
	linux-kernel

On Thu, Dec 5, 2024 at 10:20 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> time ago.  All assembler header files are now included using
> "#include <asm/*>", so there is no longer a need to rewrite paths.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---


After this commit, the second argument $arch is no longer
used.

Please clean up

my ($dir, $arch, @files) = @ARGV;







>  usr/include/headers_check.pl | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
> index b6aec5e4365f9bf2..7070c891ea294b4d 100755
> --- a/usr/include/headers_check.pl
> +++ b/usr/include/headers_check.pl
> @@ -54,10 +54,6 @@ sub check_include
>                 my $inc = $1;
>                 my $found;
>                 $found = stat($dir . "/" . $inc);
> -               if (!$found) {
> -                       $inc =~ s#asm/#asm-$arch/#;
> -                       $found = stat($dir . "/" . $inc);
> -               }
>                 if (!$found) {
>                         printf STDERR "$filename:$lineno: included file '$inc' is not exported\n";
>                         $ret = 1;
> --
> 2.34.1
>
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 1/3] checkpatch: Update reference to include/asm-<arch>
  2024-12-05 16:33   ` Joe Perches
@ 2024-12-07 14:30     ` Masahiro Yamada
  2024-12-09  8:39       ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Masahiro Yamada @ 2024-12-07 14:30 UTC (permalink / raw)
  To: Joe Perches
  Cc: Geert Uytterhoeven, Oleg Nesterov, Arnd Bergmann, Yury Norov,
	Rasmus Villemoes, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn,
	Nathan Chancellor, Nicolas Schier, linux-arch, linux-kbuild,
	linux-kernel, Andrew Morton

On Fri, Dec 6, 2024 at 1:40 AM Joe Perches <joe@perches.com> wrote:
>
> On Thu, 2024-12-05 at 14:20 +0100, Geert Uytterhoeven wrote:
> > "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> > time ago.
>
> Thanks.


Is this check still needed?

include/asm was a symlink to include/asm-<architecture> in the old days,
but it no longer exists.

In which case, is this check triggered?




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 3/3] include: Update references to include/asm-<arch>
  2024-12-05 13:20 ` [PATCH 3/3] include: Update references to include/asm-<arch> Geert Uytterhoeven
@ 2024-12-07 22:17   ` Masahiro Yamada
  0 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2024-12-07 22:17 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Nathan Chancellor, Nicolas Schier, linux-arch, linux-kbuild,
	linux-kernel

On Thu, Dec 5, 2024 at 10:21 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> time ago.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  include/asm-generic/syscall.h | 2 +-
>  include/linux/bitmap.h        | 2 +-
>  include/linux/types.h         | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)




"git grep include/asm- | grep -v generic"
will find more instances.






-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 1/3] checkpatch: Update reference to include/asm-<arch>
  2024-12-07 14:30     ` Masahiro Yamada
@ 2024-12-09  8:39       ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2024-12-09  8:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Joe Perches, Oleg Nesterov, Arnd Bergmann, Yury Norov,
	Rasmus Villemoes, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn,
	Nathan Chancellor, Nicolas Schier, linux-arch, linux-kbuild,
	linux-kernel, Andrew Morton

Hi Yamada-san,

On Sat, Dec 7, 2024 at 3:31 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Fri, Dec 6, 2024 at 1:40 AM Joe Perches <joe@perches.com> wrote:
> > On Thu, 2024-12-05 at 14:20 +0100, Geert Uytterhoeven wrote:
> > > "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> > > time ago.
>
> Is this check still needed?
>
> include/asm was a symlink to include/asm-<architecture> in the old days,
> but it no longer exists.
>
> In which case, is this check triggered?

Someone might still try to create a header file under include/asm/.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl
  2024-12-07 14:27   ` Masahiro Yamada
@ 2024-12-10 10:16     ` Masahiro Yamada
  0 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2024-12-10 10:16 UTC (permalink / raw)
  To: Geert Uytterhoeven, Andrew Morton
  Cc: Oleg Nesterov, Arnd Bergmann, Yury Norov, Rasmus Villemoes,
	Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Nathan Chancellor, Nicolas Schier, linux-arch, linux-kbuild,
	linux-kernel

I applied this with the follow-up squashed. Thanks.
(https://lore.kernel.org/all/CAK7LNAR8dy-=EcsZFb-tjXSk2sK7sHrV0WSSV4E8dzRh5Veceg@mail.gmail.com/T/#t)

This should be dropped from Andrew Morton's tree.




On Sat, Dec 7, 2024 at 11:27 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Thu, Dec 5, 2024 at 10:20 PM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> >
> > "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
> > time ago.  All assembler header files are now included using
> > "#include <asm/*>", so there is no longer a need to rewrite paths.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
>
>
> After this commit, the second argument $arch is no longer
> used.
>
> Please clean up
>
> my ($dir, $arch, @files) = @ARGV;
>
>
>
>
>
>
>
> >  usr/include/headers_check.pl | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
> > index b6aec5e4365f9bf2..7070c891ea294b4d 100755
> > --- a/usr/include/headers_check.pl
> > +++ b/usr/include/headers_check.pl
> > @@ -54,10 +54,6 @@ sub check_include
> >                 my $inc = $1;
> >                 my $found;
> >                 $found = stat($dir . "/" . $inc);
> > -               if (!$found) {
> > -                       $inc =~ s#asm/#asm-$arch/#;
> > -                       $found = stat($dir . "/" . $inc);
> > -               }
> >                 if (!$found) {
> >                         printf STDERR "$filename:$lineno: included file '$inc' is not exported\n";
> >                         $ret = 1;
> > --
> > 2.34.1
> >
> >
>
>
> --
> Best Regards
> Masahiro Yamada



--
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2024-12-10 10:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 13:20 [PATCH 0/3] Update reference to include/asm-<arch> Geert Uytterhoeven
2024-12-05 13:20 ` [PATCH 1/3] checkpatch: " Geert Uytterhoeven
2024-12-05 16:33   ` Joe Perches
2024-12-07 14:30     ` Masahiro Yamada
2024-12-09  8:39       ` Geert Uytterhoeven
2024-12-05 13:20 ` [PATCH 2/3] kbuild: Drop support for include/asm-<arch> in headers_check.pl Geert Uytterhoeven
2024-12-07 14:27   ` Masahiro Yamada
2024-12-10 10:16     ` Masahiro Yamada
2024-12-05 13:20 ` [PATCH 3/3] include: Update references to include/asm-<arch> Geert Uytterhoeven
2024-12-07 22:17   ` Masahiro Yamada

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