Skip to contentSkip to conversation

alpha/boot: fix the breakage from -isystem series...

PATCH New Al Viro 1 participant 3 messages Jan 11, 2023 Alpha port

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 alpha/boot: fix the breakage from -isystem series...

---
 arch/alpha/boot/bootp.c  | 2 +-
 arch/alpha/boot/bootpz.c | 2 +-
 arch/alpha/boot/main.c   | 2 +-
 arch/alpha/boot/stdio.c  | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
arch/alpha/boot/bootp.c +1 -1
index b4faba2432d5..842e85776cc0 100644
@@ -18,7 +18,7 @@
 #include <asm/hwrpb.h>
 #include <asm/io.h>
 
-#include <stdarg.h>
+#include <linux/stdarg.h>
 
 #include "ksize.h"
 
arch/alpha/boot/bootpz.c +1 -1
index 90a2b341e9c0..c6079308eab3 100644
@@ -20,7 +20,7 @@
 #include <asm/hwrpb.h>
 #include <asm/io.h>
 
-#include <stdarg.h>
+#include <linux/stdarg.h>
 
 #include "kzsize.h"
 
arch/alpha/boot/main.c +1 -1
index e5347a080008..22a1cb0264af 100644
@@ -15,7 +15,7 @@
 #include <asm/console.h>
 #include <asm/hwrpb.h>
 
-#include <stdarg.h>
+#include <linux/stdarg.h>
 
 #include "ksize.h"
 
arch/alpha/boot/stdio.c +2 -2
index 60f73ccd2e89..a5abeaf94791 100644
@@ -2,8 +2,8 @@
 /*
  * Copyright (C) Paul Mackerras 1997.
  */
-#include <stdarg.h>
-#include <stddef.h>
+#include <linux/string.h>
+#include <linux/stdarg.h>
 
 size_t strnlen(const char * s, size_t count)
 {
Signature · 1 line
2.30.2
author
#1 lore raw

PATCH 1/1 alpha/boot/tools/objstrip: fix the check for ELF header

Just memcmp() with ELFMAG - that's the normal way to do it in userland code, which that thing is. Besides, that has the benefit of actually building - str_has_prefix() is *NOT* present in <string.h>.

Fixes 5f14596e55de "alpha: Replace strncmp with str_has_prefix"
---
 arch/alpha/boot/tools/objstrip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/boot/tools/objstrip.c +1 -1
index 08b430d25a31..7cf92d172dce 100644
@@ -148,7 +148,7 @@ main (int argc, char *argv[])
 #ifdef __ELF__
     elf = (struct elfhdr *) buf;
 
-    if (elf->e_ident[0] == 0x7f && str_has_prefix((char *)elf->e_ident + 1, "ELF")) {
+    if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
 	if (elf->e_type != ET_EXEC) {
 	    fprintf(stderr, "%s: %s is not an ELF executable\n",
 		    prog_name, inname);
Signature · 1 line
2.30.2
author
#2 lore raw

alpha/boot/misc: trim unused declarations

gzip_mark() and gzip_release() are gone; there used to be two forward declarations of each and the patch removing those suckers had left one of each behind...

---
 arch/alpha/boot/misc.c | 2 --
 1 file changed, 2 deletions(-)
arch/alpha/boot/misc.c +0 -2
index 325d4dd4f904..1ab91852d9f7 100644
@@ -89,8 +89,6 @@ static ulg output_ptr;
 static ulg bytes_out;
 
 static void error(char *m);
-static void gzip_mark(void **);
-static void gzip_release(void **);
 
 extern int end;
 static ulg free_mem_ptr;
Signature · 1 line
2.30.2