Skip to content

Commit

Permalink
iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-spe…
Browse files Browse the repository at this point in the history
…cifier 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>
  • Loading branch information
trixirt authored and jic23 committed Mar 12, 2023
1 parent 9ee6bc3 commit 225dc61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/iio/adc/stm32-adc.c
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand Down

0 comments on commit 225dc61

Please sign in to comment.