Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-specifier to static

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>
Link: https://lore.kernel.org/r/20230312161733.470617-1-trix@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Tom Rix and committed by
Jonathan Cameron
225dc61e 9ee6bc3a

+3 -3
+3 -3
drivers/iio/adc/stm32-adc.c
··· 2588 2588 .irq_clear = stm32f4_adc_irq_clear, 2589 2589 }; 2590 2590 2591 - const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 }; 2591 + static const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 }; 2592 2592 static_assert(ARRAY_SIZE(stm32_adc_min_ts_h7) == STM32_ADC_INT_CH_NB); 2593 2593 2594 2594 static const struct stm32_adc_cfg stm32h7_adc_cfg = { ··· 2607 2607 .ts_int_ch = stm32_adc_min_ts_h7, 2608 2608 }; 2609 2609 2610 - const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 }; 2610 + static const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 }; 2611 2611 static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp1) == STM32_ADC_INT_CH_NB); 2612 2612 2613 2613 static const struct stm32_adc_cfg stm32mp1_adc_cfg = { ··· 2627 2627 .ts_int_ch = stm32_adc_min_ts_mp1, 2628 2628 }; 2629 2629 2630 - const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 }; 2630 + static const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 }; 2631 2631 static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp13) == STM32_ADC_INT_CH_NB); 2632 2632 2633 2633 static const struct stm32_adc_cfg stm32mp13_adc_cfg = {