diff mbox series

[14/16] lib/test_kasan_module.c: suppress unused var warning

Message ID 20210409202741.xZ0aCbu7I%akpm@linux-foundation.org (mailing list archive)
State New
Headers show
Series [01/16] MAINTAINERS: update CZ.NIC's Turris information | expand

Commit Message

Andrew Morton April 9, 2021, 8:27 p.m. UTC
From: Andrew Morton <akpm@linux-foundation.org>
Subject: lib/test_kasan_module.c: suppress unused var warning

Local `unused' is intentionally unused - it is there to suppress
__must_check warnings.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lkml.kernel.org/r/202104050216.HflRxfJm-lkp@intel.com
Cc: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/test_kasan_module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- a/lib/test_kasan_module.c~lib-test_kasan_modulec-suppress-unused-var-warning
+++ a/lib/test_kasan_module.c
@@ -22,7 +22,7 @@  static noinline void __init copy_user_te
 	char *kmem;
 	char __user *usermem;
 	size_t size = 10;
-	int unused;
+	int __maybe_unused unused;
 
 	kmem = kmalloc(size, GFP_KERNEL);
 	if (!kmem)