linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] spi: tools: Make default_tx/rx and input_tx static
@ 2020-06-11 12:56 Qing Zhang
  2020-06-11 12:56 ` [PATCH v2 2/2] spi: tools: Add macro definitions to fix build errors Qing Zhang
  2020-06-11 15:29 ` [PATCH v2 1/2] spi: tools: Make default_tx/rx and input_tx static Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Qing Zhang @ 2020-06-11 12:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel, Tiezhu Yang, Xuefeng Li

Fix the following sparse warning:

./spidev_test.c:50:9: warning: symbol 'default_tx' was not declared. Should it be static?
./spidev_test.c:59:9: warning: symbol 'default_rx' was not declared. Should it be static?
./spidev_test.c:60:6: warning: symbol 'input_tx' was not declared. Should it be static?

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
 tools/spi/spidev_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 56ea053f..83844f8 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -47,7 +47,7 @@ static int transfer_size;
 static int iterations;
 static int interval = 5; /* interval in seconds for showing transfer rate */
 
-uint8_t default_tx[] = {
+static uint8_t default_tx[] = {
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 	0x40, 0x00, 0x00, 0x00, 0x00, 0x95,
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -56,8 +56,8 @@ uint8_t default_tx[] = {
 	0xF0, 0x0D,
 };
 
-uint8_t default_rx[ARRAY_SIZE(default_tx)] = {0, };
-char *input_tx;
+static uint8_t default_rx[ARRAY_SIZE(default_tx)] = {0, };
+static char *input_tx;
 
 static void hex_dump(const void *src, size_t length, size_t line_size,
 		     char *prefix)
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-11 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 12:56 [PATCH v2 1/2] spi: tools: Make default_tx/rx and input_tx static Qing Zhang
2020-06-11 12:56 ` [PATCH v2 2/2] spi: tools: Add macro definitions to fix build errors Qing Zhang
2020-06-11 15:29 ` [PATCH v2 1/2] spi: tools: Make default_tx/rx and input_tx static Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).