mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] pinctrl: remove unnecessary error check
@ 2015-02-01  2:58 Masahiro Yamada
  2015-02-02  9:18 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2015-02-01  2:58 UTC (permalink / raw)
  To: barebox

The file drivers/pinctrl/pinctrl.c is compiled only when
CONFIG_PINCTRL is defined.  "IS_ENABLED(CONFIG_PINCTRL)" is
always evaluated as 1 in this function.
(Although the compiler would optimize it, the source file does
not look nice.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 drivers/pinctrl/pinctrl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl.c b/drivers/pinctrl/pinctrl.c
index d6479b9..10ce186 100644
--- a/drivers/pinctrl/pinctrl.c
+++ b/drivers/pinctrl/pinctrl.c
@@ -62,9 +62,6 @@ int of_pinctrl_select_state(struct device_node *np, const char *name)
 	struct device_node *np_config;
 	const char *statename;
 
-	if (!IS_ENABLED(CONFIG_PINCTRL))
-		return -ENOSYS;
-
 	if (!of_find_property(np, "pinctrl-0", NULL))
 		return 0;
 
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: remove unnecessary error check
  2015-02-01  2:58 [PATCH] pinctrl: remove unnecessary error check Masahiro Yamada
@ 2015-02-02  9:18 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-02-02  9:18 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Sun, Feb 01, 2015 at 11:58:26AM +0900, Masahiro Yamada wrote:
> The file drivers/pinctrl/pinctrl.c is compiled only when
> CONFIG_PINCTRL is defined.  "IS_ENABLED(CONFIG_PINCTRL)" is
> always evaluated as 1 in this function.
> (Although the compiler would optimize it, the source file does
> not look nice.)
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

> ---
> 
>  drivers/pinctrl/pinctrl.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-02  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-01  2:58 [PATCH] pinctrl: remove unnecessary error check Masahiro Yamada
2015-02-02  9:18 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox