public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-specifier to static
@ 2023-03-12 16:17 Tom Rix
  2023-03-12 17:45 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-12 16:17 UTC (permalink / raw)
  To: jic23, lars, mcoquelin.stm32, alexandre.torgue, fabrice.gasnier,
	olivier.moysan, andy.shevchenko, yannick.brosseau, nuno.sa
  Cc: linux-iio, linux-stm32, linux-arm-kernel, linux-kernel, Tom Rix

smatch reports several warnings
drivers/iio/adc/stm32-adc.c:2591:20: warning:
  symbol 'stm32_adc_min_ts_h7' was not declared. Should it be static?
drivers/iio/adc/stm32-adc.c:2610:20: warning:
  symbol 'stm32_adc_min_ts_mp1' was not declared. Should it be static?
drivers/iio/adc/stm32-adc.c:2630:20: warning:
  symbol 'stm32_adc_min_ts_mp13' was not declared. Should it be static?

These variables are only used in stm32-adc.c, so they should be static

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/iio/adc/stm32-adc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
index 45d4e79f8e55..1aadb2ad2cab 100644
--- a/drivers/iio/adc/stm32-adc.c
+++ b/drivers/iio/adc/stm32-adc.c
@@ -2588,7 +2588,7 @@ static const struct stm32_adc_cfg stm32f4_adc_cfg = {
 	.irq_clear = stm32f4_adc_irq_clear,
 };
 
-const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 };
+static const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 };
 static_assert(ARRAY_SIZE(stm32_adc_min_ts_h7) == STM32_ADC_INT_CH_NB);
 
 static const struct stm32_adc_cfg stm32h7_adc_cfg = {
@@ -2607,7 +2607,7 @@ static const struct stm32_adc_cfg stm32h7_adc_cfg = {
 	.ts_int_ch = stm32_adc_min_ts_h7,
 };
 
-const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 };
+static const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 };
 static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp1) == STM32_ADC_INT_CH_NB);
 
 static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
@@ -2627,7 +2627,7 @@ static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
 	.ts_int_ch = stm32_adc_min_ts_mp1,
 };
 
-const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 };
+static const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 };
 static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp13) == STM32_ADC_INT_CH_NB);
 
 static const struct stm32_adc_cfg stm32mp13_adc_cfg = {
-- 
2.27.0


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

end of thread, other threads:[~2023-03-12 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-12 16:17 [PATCH] iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-specifier to static Tom Rix
2023-03-12 17:45 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox