* [PATCH] pinctrl: nomadik: hide unused functions
@ 2016-01-25 15:59 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:59 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, Arnd Bergmann, Alessandro Rubini, linux-gpio,
linux-kernel
The nomadik pinctrl driver has two functions that are only used
for debugfs output and are otherwise unused:
drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
This makes the function definitions conditional to avoid the
harmless warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/nomadik/pinctrl-abx500.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c
index 085e60106ec2..1f7469c9857d 100644
--- a/drivers/pinctrl/nomadik/pinctrl-abx500.c
+++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c
@@ -191,6 +191,7 @@ static void abx500_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
dev_err(pct->dev, "%s write failed (%d)\n", __func__, ret);
}
+#ifdef CONFIG_DEBUG_FS
static int abx500_get_pull_updown(struct abx500_pinctrl *pct, int offset,
enum abx500_gpio_pull_updown *pull_updown)
{
@@ -226,6 +227,7 @@ out:
return ret;
}
+#endif
static int abx500_set_pull_updown(struct abx500_pinctrl *pct,
int offset, enum abx500_gpio_pull_updown val)
@@ -468,6 +470,7 @@ out:
return ret;
}
+#ifdef CONFIG_DEBUG_FS
static int abx500_get_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
unsigned gpio)
{
@@ -553,8 +556,6 @@ out:
return ret;
}
-#ifdef CONFIG_DEBUG_FS
-
#include <linux/seq_file.h>
static void abx500_gpio_dbg_show_one(struct seq_file *s,
--
2.7.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] pinctrl: nomadik: hide unused functions
@ 2016-01-25 15:59 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:59 UTC (permalink / raw)
To: linux-arm-kernel
The nomadik pinctrl driver has two functions that are only used
for debugfs output and are otherwise unused:
drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
This makes the function definitions conditional to avoid the
harmless warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/nomadik/pinctrl-abx500.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c
index 085e60106ec2..1f7469c9857d 100644
--- a/drivers/pinctrl/nomadik/pinctrl-abx500.c
+++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c
@@ -191,6 +191,7 @@ static void abx500_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
dev_err(pct->dev, "%s write failed (%d)\n", __func__, ret);
}
+#ifdef CONFIG_DEBUG_FS
static int abx500_get_pull_updown(struct abx500_pinctrl *pct, int offset,
enum abx500_gpio_pull_updown *pull_updown)
{
@@ -226,6 +227,7 @@ out:
return ret;
}
+#endif
static int abx500_set_pull_updown(struct abx500_pinctrl *pct,
int offset, enum abx500_gpio_pull_updown val)
@@ -468,6 +470,7 @@ out:
return ret;
}
+#ifdef CONFIG_DEBUG_FS
static int abx500_get_mode(struct pinctrl_dev *pctldev, struct gpio_chip *chip,
unsigned gpio)
{
@@ -553,8 +556,6 @@ out:
return ret;
}
-#ifdef CONFIG_DEBUG_FS
-
#include <linux/seq_file.h>
static void abx500_gpio_dbg_show_one(struct seq_file *s,
--
2.7.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] pinctrl: nomadik: hide unused functions
2016-01-25 15:59 ` Arnd Bergmann
(?)
@ 2016-01-28 10:36 ` Linus Walleij
-1 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2016-01-28 10:36 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Alessandro Rubini, linux-gpio, linux-kernel
On Mon, Jan 25, 2016 at 4:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The nomadik pinctrl driver has two functions that are only used
> for debugfs output and are otherwise unused:
>
> drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
> drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
>
> This makes the function definitions conditional to avoid the
> harmless warnings.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied for fixes.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pinctrl: nomadik: hide unused functions
@ 2016-01-28 10:36 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2016-01-28 10:36 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Alessandro Rubini, linux-gpio, linux-kernel
On Mon, Jan 25, 2016 at 4:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The nomadik pinctrl driver has two functions that are only used
> for debugfs output and are otherwise unused:
>
> drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
> drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
>
> This makes the function definitions conditional to avoid the
> harmless warnings.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied for fixes.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] pinctrl: nomadik: hide unused functions
@ 2016-01-28 10:36 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2016-01-28 10:36 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 25, 2016 at 4:59 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The nomadik pinctrl driver has two functions that are only used
> for debugfs output and are otherwise unused:
>
> drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
> drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
>
> This makes the function definitions conditional to avoid the
> harmless warnings.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied for fixes.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] pinctrl: nomadik: hide unused functions
2016-01-25 15:59 ` Arnd Bergmann
@ 2016-01-29 7:30 ` Uwe Kleine-König
-1 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2016-01-29 7:30 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Walleij, linux-gpio, linux-kernel, linux-arm-kernel,
Alessandro Rubini
Hello Arnd,
On Mon, Jan 25, 2016 at 04:59:09PM +0100, Arnd Bergmann wrote:
> The nomadik pinctrl driver has two functions that are only used
> for debugfs output and are otherwise unused:
>
> drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
> drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
>
> This makes the function definitions conditional to avoid the
> harmless warnings.
> [...]
> +#ifdef CONFIG_DEBUG_FS
> static int abx500_get_pull_updown(struct abx500_pinctrl *pct, int offset,
> enum abx500_gpio_pull_updown *pull_updown)
an alternative is to mark the functions with __maybe_unused. I just
noticed that Documentation/CodingStyle even mandates to use that instead
of cpp stuff.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] pinctrl: nomadik: hide unused functions
@ 2016-01-29 7:30 ` Uwe Kleine-König
0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2016-01-29 7:30 UTC (permalink / raw)
To: linux-arm-kernel
Hello Arnd,
On Mon, Jan 25, 2016 at 04:59:09PM +0100, Arnd Bergmann wrote:
> The nomadik pinctrl driver has two functions that are only used
> for debugfs output and are otherwise unused:
>
> drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used
> drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but not used
>
> This makes the function definitions conditional to avoid the
> harmless warnings.
> [...]
> +#ifdef CONFIG_DEBUG_FS
> static int abx500_get_pull_updown(struct abx500_pinctrl *pct, int offset,
> enum abx500_gpio_pull_updown *pull_updown)
an alternative is to mark the functions with __maybe_unused. I just
noticed that Documentation/CodingStyle even mandates to use that instead
of cpp stuff.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-01-29 7:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 15:59 [PATCH] pinctrl: nomadik: hide unused functions Arnd Bergmann
2016-01-25 15:59 ` Arnd Bergmann
2016-01-28 10:36 ` Linus Walleij
2016-01-28 10:36 ` Linus Walleij
2016-01-28 10:36 ` Linus Walleij
2016-01-29 7:30 ` Uwe Kleine-König
2016-01-29 7:30 ` Uwe Kleine-König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.