Skip to contentSkip to conversation

selftests-proc-mark-vsyscall-strings-maybe-unused.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 14, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests: proc: mark vsyscall strings maybe-unused
has been removed from the -mm tree. Its filename was
selftests-proc-mark-vsyscall-strings-maybe-unused.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Bala-Vignesh-Reddy <[email protected]>
Subject: selftests: proc: mark vsyscall strings maybe-unused
Date: Wed, 20 Aug 2025 23:26:10 +0530

The str_vsyscall_* constants in proc-pid-vm.c triggers -Wunused-const-variable warnings with gcc-13.32 and clang 18.1.

Define and apply __maybe_unused locally to suppress the warnings. No functional change

Fixes compiler warning:
warning: `str_vsyscall_*' defined but not used[-Wunused-const-variable]

---

 tools/testing/selftests/proc/proc-pid-vm.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
tools/testing/selftests/proc/proc-pid-vm.c renamed from tools/testing/selftests/proc/proc-pid-vm.c~selftests-proc-mark-vsyscall-strings-maybe-unused +8 -4
@@ -47,6 +47,10 @@
 #include <sys/resource.h>
 #include <linux/fs.h>
 
+#ifndef __maybe_unused
+#define __maybe_unused __attribute__((__unused__))
+#endif
+
 #include "../kselftest.h"
 
 static inline long sys_execveat(int dirfd, const char *pathname, char **argv, char **envp, int flags)
@@ -218,12 +222,12 @@ static int make_exe(const uint8_t *paylo
  * 2: vsyscall VMA is r-xp		vsyscall=emulate
  */
 static volatile int g_vsyscall;
-static const char *str_vsyscall;
+static const char *str_vsyscall __maybe_unused;
 
-static const char str_vsyscall_0[] = "";
-static const char str_vsyscall_1[] =
+static const char str_vsyscall_0[] __maybe_unused = "";
+static const char str_vsyscall_1[] __maybe_unused =
 "ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]\n";
-static const char str_vsyscall_2[] =
+static const char str_vsyscall_2[] __maybe_unused =
 "ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]\n";
 
 #ifdef __x86_64__

_

Patches currently in -mm which might be from [email protected] are