Skip to content

Commit

Permalink
FROMPULL: 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).

Manaul cherry-pick of:
zephyrproject-rtos/zephyr#78416

Signed-off-by: Keith Short <keithshort@google.com>
(cherry picked from commit c2fba5ab421039a95fbc279af27415695e6af97c)

BUG=b:320527549
BUG=b:366515240
TEST=zmake build bloonchipper

Change-Id: Ia0c5dd5e7615e792ed43cc0e46d0598b0447ee93
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5861473
Tested-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
  • Loading branch information
keith-zephyr authored and Chromeos LUCI committed Sep 16, 2024
1 parent 873a8d7 commit c2ccb34
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 c2ccb34

Please sign in to comment.