[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230518145521.3806117-9-paulmck@kernel.org>
Date: Thu, 18 May 2023 07:55:15 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: gwml@...r.gnuweeb.org, kernel-team@...a.com, w@....eu,
Thomas Weißschuh <linux@...ssschuh.net>,
Willy Tarreau <w@....eu>,
"Paul E . McKenney" <paulmck@...nel.org>
Subject: [PATCH v2 nolibc 09/15] tools/nolibc: use standard __asm__ statements
From: Thomas Weißschuh <linux@...ssschuh.net>
Most of the code was migrated to C99-conformant __asm__ statements
before. It seems string.h was missed.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
Signed-off-by: Willy Tarreau <w@....eu>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
tools/include/nolibc/string.h | 4 ++--
tools/testing/selftests/nolibc/nolibc-test.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h
index fffdaf6ff467..0c2e06c7c477 100644
--- a/tools/include/nolibc/string.h
+++ b/tools/include/nolibc/string.h
@@ -90,7 +90,7 @@ void *memset(void *dst, int b, size_t len)
while (len--) {
/* prevent gcc from recognizing memset() here */
- asm volatile("");
+ __asm__ volatile("");
*(p++) = b;
}
return dst;
@@ -139,7 +139,7 @@ size_t strlen(const char *str)
size_t len;
for (len = 0; str[len]; len++)
- asm("");
+ __asm__("");
return len;
}
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 888da60eb5ba..e692be98973a 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -984,7 +984,7 @@ int main(int argc, char **argv, char **envp)
#else
else if (ioperm(0x501, 1, 1) == 0)
#endif
- asm volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0));
+ __asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0));
/* if it does nothing, fall back to the regular panic */
#endif
}
--
2.40.1
Powered by blists - more mailing lists