Skip to content

Commit

Permalink
drivers: gpio: stm32: Fix compiler warning
Browse files Browse the repository at this point in the history
The local function ll_gpio_get_pin_pull() is not always referenced.  Add
the __maybe_unused attribute to avoid compiler warnings (which may be
promoted to errors by downstream users).

Signed-off-by: Keith Short <[email protected]>
  • Loading branch information
keith-zephyr authored and nashif committed Sep 17, 2024
1 parent 371a48a commit 9d99914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static inline void ll_gpio_set_pin_pull(GPIO_TypeDef *GPIOx, uint32_t Pin, uint3
#endif /* CONFIG_SOC_SERIES_STM32WB0X */
}

static inline uint32_t ll_gpio_get_pin_pull(GPIO_TypeDef *GPIOx, uint32_t Pin)
__maybe_unused static inline uint32_t ll_gpio_get_pin_pull(GPIO_TypeDef *GPIOx, uint32_t Pin)
{
#if defined(CONFIG_SOC_SERIES_STM32WB0X)
/* On STM32WB0, the PWRC PU/PD control registers should be used instead
Expand Down

0 comments on commit 9d99914

Please sign in to comment.