gpio: pxa: remove unused gpio_is_pxa_type function

Message ID 20230319143640.1704735-1-trix@redhat.com
State New
Headers
Series gpio: pxa: remove unused gpio_is_pxa_type function |

Commit Message

Tom Rix March 19, 2023, 2:36 p.m. UTC
  clang with W=1 reports
drivers/gpio/gpio-pxa.c:174:19: error: unused function
  'gpio_is_pxa_type' [-Werror,-Wunused-function]
static inline int gpio_is_pxa_type(int type)
                  ^
This function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpio/gpio-pxa.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Linus Walleij March 19, 2023, 9:17 p.m. UTC | #1
On Sun, Mar 19, 2023 at 3:36 PM Tom Rix <trix@redhat.com> wrote:

> clang with W=1 reports
> drivers/gpio/gpio-pxa.c:174:19: error: unused function
>   'gpio_is_pxa_type' [-Werror,-Wunused-function]
> static inline int gpio_is_pxa_type(int type)
>                   ^
> This function is not used, so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
  
Bartosz Golaszewski March 22, 2023, 4:27 p.m. UTC | #2
On Sun, Mar 19, 2023 at 3:36 PM Tom Rix <trix@redhat.com> wrote:
>
> clang with W=1 reports
> drivers/gpio/gpio-pxa.c:174:19: error: unused function
>   'gpio_is_pxa_type' [-Werror,-Wunused-function]
> static inline int gpio_is_pxa_type(int type)
>                   ^
> This function is not used, so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/gpio/gpio-pxa.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
> index 1198ab0305d0..a1630ed4b741 100644
> --- a/drivers/gpio/gpio-pxa.c
> +++ b/drivers/gpio/gpio-pxa.c
> @@ -171,11 +171,6 @@ static inline struct pxa_gpio_bank *gpio_to_pxabank(struct gpio_chip *c,
>         return chip_to_pxachip(c)->banks + gpio / 32;
>  }
>
> -static inline int gpio_is_pxa_type(int type)
> -{
> -       return (type & MMP_GPIO) == 0;
> -}
> -
>  static inline int gpio_is_mmp_type(int type)
>  {
>         return (type & MMP_GPIO) != 0;
> --
> 2.27.0
>

Applied, thanks!

Bart
  

Patch

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 1198ab0305d0..a1630ed4b741 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -171,11 +171,6 @@  static inline struct pxa_gpio_bank *gpio_to_pxabank(struct gpio_chip *c,
 	return chip_to_pxachip(c)->banks + gpio / 32;
 }
 
-static inline int gpio_is_pxa_type(int type)
-{
-	return (type & MMP_GPIO) == 0;
-}
-
 static inline int gpio_is_mmp_type(int type)
 {
 	return (type & MMP_GPIO) != 0;