Skip to content

drivers: adc: stm32: suppress stm32h7 build warning#47173

Merged
carlescufi merged 1 commit intozephyrproject-rtos:mainfrom
mniestroj:adc-stm32h7-fix-build-warning
Jul 4, 2022
Merged

drivers: adc: stm32: suppress stm32h7 build warning#47173
carlescufi merged 1 commit intozephyrproject-rtos:mainfrom
mniestroj:adc-stm32h7-fix-build-warning

Conversation

@mniestroj
Copy link
Member

There is a build warning of unused adc_stm32_oversampling_ratioshift
function: [-Werror=unused-function]. This makes twister fail, as all
warnings are treated as errors.

Fix that by ifndef'ing adc_stm32_oversampling_ratioshift().

Fixes: c57a41c ("drivers/adc: stm32: do not disable the ADC if
resolution is unchanged")

There is a build warning of unused `adc_stm32_oversampling_ratioshift`
function: [-Werror=unused-function]. This makes twister fail, as all
warnings are treated as errors.

Fix that by ifndef'ing adc_stm32_oversampling_ratioshift().

Fixes: c57a41c ("drivers/adc: stm32: do not disable the ADC if
  resolution is unchanged")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
@mniestroj mniestroj requested a review from aurel32 July 1, 2022 19:41
@zephyrbot zephyrbot added platform: STM32 ST Micro STM32 area: ADC Analog-to-Digital Converter (ADC) labels Jul 1, 2022
Copy link
Contributor

@aurel32 aurel32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all sorry for introducing this issue. Your fix looks good, thanks. An alternative fix is to declare the function inline.

@mniestroj
Copy link
Member Author

@aurel32 No worries.

Actually, it is strange that modifications of ADC driver in #46232 did not trigger twister failure in adc_api test (or running this test in the first place). @nashif @galak any idea why?

@carlescufi carlescufi merged commit ec116a9 into zephyrproject-rtos:main Jul 4, 2022
@mniestroj mniestroj deleted the adc-stm32h7-fix-build-warning branch July 4, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ADC Analog-to-Digital Converter (ADC) platform: STM32 ST Micro STM32

6 participants