diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-07-18 08:42:32 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-07-18 09:10:01 -0400 |
commit | 59a8831da31ebdabf82cac82bf01270d215bf149 (patch) | |
tree | 5d31464034a22801f7f0cd0a365810a026966563 | |
parent | f12a616e0cdee71440b72f7602825db424d37879 (diff) |
spi: loopback-test: make several module parameters static
Several module parameters are local to the source, so make them
static. Cleans up several sparse warnings such as:
"symbol 'loop_req' was not declared. Should it be static?"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-loopback-test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 0d3c56e2526c..64a1e6f212c1 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c | |||
@@ -32,45 +32,45 @@ | |||
32 | #include "spi-test.h" | 32 | #include "spi-test.h" |
33 | 33 | ||
34 | /* flag to only simulate transfers */ | 34 | /* flag to only simulate transfers */ |
35 | int simulate_only; | 35 | static int simulate_only; |
36 | module_param(simulate_only, int, 0); | 36 | module_param(simulate_only, int, 0); |
37 | MODULE_PARM_DESC(simulate_only, "if not 0 do not execute the spi message"); | 37 | MODULE_PARM_DESC(simulate_only, "if not 0 do not execute the spi message"); |
38 | 38 | ||
39 | /* dump spi messages */ | 39 | /* dump spi messages */ |
40 | int dump_messages; | 40 | static int dump_messages; |
41 | module_param(dump_messages, int, 0); | 41 | module_param(dump_messages, int, 0); |
42 | MODULE_PARM_DESC(dump_messages, | 42 | MODULE_PARM_DESC(dump_messages, |
43 | "=1 dump the basic spi_message_structure, " \ | 43 | "=1 dump the basic spi_message_structure, " \ |
44 | "=2 dump the spi_message_structure including data, " \ | 44 | "=2 dump the spi_message_structure including data, " \ |
45 | "=3 dump the spi_message structure before and after execution"); | 45 | "=3 dump the spi_message structure before and after execution"); |
46 | /* the device is jumpered for loopback - enabling some rx_buf tests */ | 46 | /* the device is jumpered for loopback - enabling some rx_buf tests */ |
47 | int loopback; | 47 | static int loopback; |
48 | module_param(loopback, int, 0); | 48 | module_param(loopback, int, 0); |
49 | MODULE_PARM_DESC(loopback, | 49 | MODULE_PARM_DESC(loopback, |
50 | "if set enable loopback mode, where the rx_buf " \ | 50 | "if set enable loopback mode, where the rx_buf " \ |
51 | "is checked to match tx_buf after the spi_message " \ | 51 | "is checked to match tx_buf after the spi_message " \ |
52 | "is executed"); | 52 | "is executed"); |
53 | 53 | ||
54 | int loop_req; | 54 | static int loop_req; |
55 | module_param(loop_req, int, 0); | 55 | module_param(loop_req, int, 0); |
56 | MODULE_PARM_DESC(loop_req, | 56 | MODULE_PARM_DESC(loop_req, |
57 | "if set controller will be asked to enable test loop mode. " \ | 57 | "if set controller will be asked to enable test loop mode. " \ |
58 | "If controller supported it, MISO and MOSI will be connected"); | 58 | "If controller supported it, MISO and MOSI will be connected"); |
59 | 59 | ||
60 | /* run only a specific test */ | 60 | /* run only a specific test */ |
61 | int run_only_test = -1; | 61 | static int run_only_test = -1; |
62 | module_param(run_only_test, int, 0); | 62 | module_param(run_only_test, int, 0); |
63 | MODULE_PARM_DESC(run_only_test, | 63 | MODULE_PARM_DESC(run_only_test, |
64 | "only run the test with this number (0-based !)"); | 64 | "only run the test with this number (0-based !)"); |
65 | 65 | ||
66 | /* use vmalloc'ed buffers */ | 66 | /* use vmalloc'ed buffers */ |
67 | int use_vmalloc; | 67 | static int use_vmalloc; |
68 | module_param(use_vmalloc, int, 0644); | 68 | module_param(use_vmalloc, int, 0644); |
69 | MODULE_PARM_DESC(use_vmalloc, | 69 | MODULE_PARM_DESC(use_vmalloc, |
70 | "use vmalloc'ed buffers instead of kmalloc'ed"); | 70 | "use vmalloc'ed buffers instead of kmalloc'ed"); |
71 | 71 | ||
72 | /* check rx ranges */ | 72 | /* check rx ranges */ |
73 | int check_ranges = 1; | 73 | static int check_ranges = 1; |
74 | module_param(check_ranges, int, 0644); | 74 | module_param(check_ranges, int, 0644); |
75 | MODULE_PARM_DESC(check_ranges, | 75 | MODULE_PARM_DESC(check_ranges, |
76 | "checks rx_buffer pattern are valid"); | 76 | "checks rx_buffer pattern are valid"); |