From 44503b97ad9784943afb39d62fce3936580bec6f Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Mon, 26 Feb 2024 20:11:57 +0100 Subject: lib/test_vmalloc.c: fix typo in function name Fix a typo and change the function name to init_test_configuration. Both caller and definition have the same typo, so the current code already works. Link: https://lkml.kernel.org/r/20240226191159.39509-2-martin@kaiser.cx Signed-off-by: Martin Kaiser Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton --- lib/test_vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/test_vmalloc.c') diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index 3718d9886407..191b6bd5dff9 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -501,7 +501,7 @@ static int test_func(void *private) } static int -init_test_configurtion(void) +init_test_configuration(void) { /* * A maximum number of workers is defined as hard-coded @@ -531,7 +531,7 @@ static void do_concurrent_test(void) /* * Set some basic configurations plus sanity check. */ - ret = init_test_configurtion(); + ret = init_test_configuration(); if (ret < 0) return; -- cgit v1.2.3 From e2c5bfebabaedbec8ca858b66f95f3a993428b0c Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Mon, 26 Feb 2024 20:11:58 +0100 Subject: lib/test_vmalloc.c: drop empty exit function The module is never loaded successfully. Therefore, it'll never be unloaded and we can remove the exit function. Link: https://lkml.kernel.org/r/20240226191159.39509-3-martin@kaiser.cx Signed-off-by: Martin Kaiser Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton --- lib/test_vmalloc.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/test_vmalloc.c') diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index 191b6bd5dff9..d0c0cbe1913d 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -600,12 +600,7 @@ static int vmalloc_test_init(void) return -EAGAIN; /* Fail will directly unload the module */ } -static void vmalloc_test_exit(void) -{ -} - module_init(vmalloc_test_init) -module_exit(vmalloc_test_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Uladzislau Rezki"); -- cgit v1.2.3 From 4c4a52544ae03d84ffd3b5e9593833ffe05485a1 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Mon, 26 Feb 2024 20:11:59 +0100 Subject: lib/test_vmalloc.c: use unsigned long constant Use an unsigned long constant instead of an int constant and a cast. This fixes the checkpatch warning WARNING: Unnecessary typecast of c90 int constant - '(unsigned long) 1' could be '1UL' + align = ((unsigned long) 1) << i; Link: https://lkml.kernel.org/r/20240226191159.39509-4-martin@kaiser.cx Signed-off-by: Martin Kaiser Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton --- lib/test_vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/test_vmalloc.c') diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index d0c0cbe1913d..4ddf769861ff 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -117,7 +117,7 @@ static int align_shift_alloc_test(void) int i; for (i = 0; i < BITS_PER_LONG; i++) { - align = ((unsigned long) 1) << i; + align = 1UL << i; ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0, __builtin_return_address(0)); -- cgit v1.2.3