Commit 31750600 authored by Colin Ian King's avatar Colin Ian King Committed by Linus Torvalds

lib/test_ubsan.c: make test_ubsan_misaligned_access() static

test_ubsan_misaligned_access() is local to the source and does not need
to be in global scope, so make it static.

Cleans up sparse warning:

  lib/test_ubsan.c:91:6: warning: symbol 'test_ubsan_misaligned_access' was not declared. Should it be static?

Link: http://lkml.kernel.org/r/20180313103048.28513-1-colin.king@canonical.comSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
Cc: Jinbum Park <jinb.park7@gmail.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 854686f4
...@@ -88,7 +88,7 @@ static void test_ubsan_null_ptr_deref(void) ...@@ -88,7 +88,7 @@ static void test_ubsan_null_ptr_deref(void)
val = *ptr; val = *ptr;
} }
void test_ubsan_misaligned_access(void) static void test_ubsan_misaligned_access(void)
{ {
volatile char arr[5] __aligned(4) = {1, 2, 3, 4, 5}; volatile char arr[5] __aligned(4) = {1, 2, 3, 4, 5};
volatile int *ptr, val = 6; volatile int *ptr, val = 6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment