diff mbox series

[1/4] modpost: remove unused HOST_ELFCLASS

Message ID 20240727074526.1771247-2-masahiroy@kernel.org (mailing list archive)
State New
Headers show
Series kbuild: cross-compile linux-headers package | expand

Commit Message

Masahiro Yamada July 27, 2024, 7:42 a.m. UTC
HOST_ELFCLASS is output to elfconfig.h, but it is not used in modpost.

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

 scripts/mod/mk_elfconfig.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Nicolas Schier July 31, 2024, 8:43 p.m. UTC | #1
On Sat, Jul 27, 2024 at 04:42:01PM +0900, Masahiro Yamada wrote:
> HOST_ELFCLASS is output to elfconfig.h, but it is not used in modpost.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/mod/mk_elfconfig.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
> index 680eade89be1..aca96b3aada0 100644
> --- a/scripts/mod/mk_elfconfig.c
> +++ b/scripts/mod/mk_elfconfig.c
> @@ -39,12 +39,6 @@ main(int argc, char **argv)
>  		exit(1);
>  	}
>  
> -	if (sizeof(unsigned long) == 4) {
> -		printf("#define HOST_ELFCLASS ELFCLASS32\n");
> -	} else if (sizeof(unsigned long) == 8) {
> -		printf("#define HOST_ELFCLASS ELFCLASS64\n");
> -	}
> -
>  	endian_test.s = 0x0102;
>  	if (memcmp(endian_test.c, "\x01\x02", 2) == 0)
>  		printf("#define HOST_ELFDATA ELFDATA2MSB\n");
> -- 
> 2.43.0
> 
> 

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

Patch

diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
index 680eade89be1..aca96b3aada0 100644
--- a/scripts/mod/mk_elfconfig.c
+++ b/scripts/mod/mk_elfconfig.c
@@ -39,12 +39,6 @@  main(int argc, char **argv)
 		exit(1);
 	}
 
-	if (sizeof(unsigned long) == 4) {
-		printf("#define HOST_ELFCLASS ELFCLASS32\n");
-	} else if (sizeof(unsigned long) == 8) {
-		printf("#define HOST_ELFCLASS ELFCLASS64\n");
-	}
-
 	endian_test.s = 0x0102;
 	if (memcmp(endian_test.c, "\x01\x02", 2) == 0)
 		printf("#define HOST_ELFDATA ELFDATA2MSB\n");