staging: comedi: tests: example_test: Reduce stack usage
authorIan Abbott <abbotti@mev.co.uk>
Wed, 7 Apr 2021 18:13:39 +0000 (19:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Apr 2021 07:27:01 +0000 (09:27 +0200)
Declare the `unit_tests` array in `unittest_enter()` `static` to reduce
stack usage a bit.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-4-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/tests/example_test.c

index 4d1ab13..550784f 100644 (file)
@@ -52,7 +52,7 @@ void test0(void)
 /* **** BEGIN simple module entry/exit functions **** */
 static int __init unittest_enter(void)
 {
-       const unittest_fptr unit_tests[] = {
+       static const unittest_fptr unit_tests[] = {
                test0,
                NULL,
        };