[PATCH v3 7/8] selftests/mm: mark variable unused with macro

Muhammad Usama Anjum posted 8 patches 1 month, 1 week ago
[PATCH v3 7/8] selftests/mm: mark variable unused with macro
Posted by Muhammad Usama Anjum 1 month, 1 week ago
Use __always_unused macro instead of raw compiler attribute.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
Changes since v2:
- Introduced in v2
---
 tools/testing/selftests/mm/protection_keys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c
index 6281d4c61b50e..967181bcb4120 100644
--- a/tools/testing/selftests/mm/protection_keys.c
+++ b/tools/testing/selftests/mm/protection_keys.c
@@ -1302,7 +1302,7 @@ static void test_mprotect_with_pkey_0(int *ptr, u16 pkey)
 
 static void test_ptrace_of_child(int *ptr, u16 pkey)
 {
-	__attribute__((__unused__)) int peek_result;
+	int __always_unused peek_result;
 	pid_t child_pid;
 	void *ignored = 0;
 	long ret;
-- 
2.47.2