[PATCH v2 1/6] staging: comedi: tests: ni_routes_test: Reduce stack usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Declare the `unit_tests` array in `ni_routes_unittest()` `static` to
reduce stack usage.

Cc: Spencer E. Olson <olsonse@xxxxxxxxx>
Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
v2: Fix email address in Cc: line
---
 drivers/staging/comedi/drivers/tests/ni_routes_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/tests/ni_routes_test.c b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
index 777d9b5d96d4..cdfbb054d537 100644
--- a/drivers/staging/comedi/drivers/tests/ni_routes_test.c
+++ b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
@@ -577,7 +577,7 @@ void test_ni_get_reg_value(void)
 /* **** BEGIN simple module entry/exit functions **** */
 static int __init ni_routes_unittest(void)
 {
-	const unittest_fptr unit_tests[] = {
+	static const unittest_fptr unit_tests[] = {
 		test_ni_assign_device_routes,
 		test_ni_sort_device_routes,
 		test_ni_find_route_set,
-- 
2.31.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux