gpio: omap_gpio: Fix unused function warning in non-DM case
PATCH 1/1 gpio: omap_gpio: Fix unused function warning in non-DM case
In the case of non-DM_GPIO the function get_gpio_index() will never be called, and clang will warn about this. Move this to be with the other non-DM code for easier removal later.
--- drivers/gpio/omap_gpio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpio/omap_gpio.c +4 -5
@@ -41,11 +41,6 @@ struct gpio_bank {#endif -static inline int get_gpio_index (int gpio) -{ -return gpio &0x1f ; -} -int gpio_is_valid (int gpio) {return (gpio >=0 ) && (gpio <OMAP_MAX_GPIO );
@@ -122,6 +117,10 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio) }#if !CONFIG_IS_ENABLED (DM_GPIO ) +static inline int get_gpio_index (int gpio) +{ +return gpio &0x1f ; +}static inline const struct gpio_bank *get_gpio_bank (int gpio) {
Signature · 1 line
2.17.1
PATCH 1/1 gpio: omap_gpio: Fix unused function warning in non-DM case
Quoted 6 lines · Tom Rini
In the case of non-DM_GPIO the function
get_gpio_index()will never be called, and clang will warn about this. Move this to be with the other non-DM code for easier removal later.Cc Lokesh Vutla <[email protected]>Signed-off-by Tom Rini <[email protected]>
Thanks and regards,
Lokesh
Quoted 32 lines
--- drivers/gpio/omap_gpio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpio/omap_gpio.c +4
-5@@ -41,11 +41,6 @@ struct gpio_bank {#endif -static inline int get_gpio_index (int gpio) -{ -return gpio &0x1f ; -} -int gpio_is_valid (int gpio) {return (gpio >=0 ) && (gpio <OMAP_MAX_GPIO );@@ -122,6 +117,10 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio) }#if !CONFIG_IS_ENABLED (DM_GPIO ) +static inline int get_gpio_index (int gpio) +{ +return gpio &0x1f ; +}static inline const struct gpio_bank *get_gpio_bank (int gpio) {
PATCH 1/1 gpio: omap_gpio: Fix unused function warning in non-DM case
In reply to Tom RiniQuoted 6 lines · Tom Rini
In the case of non-DM_GPIO the function
get_gpio_index()will never be called, and clang will warn about this. Move this to be with the other non-DM code for easier removal later.Cc Lokesh Vutla <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti next.
Thanks and regards,
Lokesh