diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-13 04:55:31 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-06-25 11:49:18 +0300 |
commit | ec6516bfbaf72e7c81811162b6de96322e32a027 (patch) | |
tree | b09f9ad73cc42c90e6c43504381b69751182abdd /include/linux/pinctrl/pinctrl.h | |
parent | d9c238c5a6aeee2706d5ace0b1aa005e6d1a482f (diff) | |
download | linux-ec6516bfbaf72e7c81811162b6de96322e32a027.tar.xz |
pinctrl: remove unneeded #ifdef around declarations
What is the point in surrounding the whole of declarations with
ifdef like this?
#ifdef CONFIG_FOO
int foo(void);
#endif
If CONFIG_FOO is not defined, all callers of foo() will fail
with implicit declaration errors since the top Makefile adds
-Werror-implicit-function-declaration to KBUILD_CFLAGS.
This breaks the build earlier when you are doing something wrong.
That's it.
Anyway, it will fail to link since the definition of foo() is not
compiled.
In summary, these ifdef are unneeded.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl/pinctrl.h')
-rw-r--r-- | include/linux/pinctrl/pinctrl.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 36a79fe7b84f..27738164daa7 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h @@ -12,8 +12,6 @@ #ifndef __LINUX_PINCTRL_PINCTRL_H #define __LINUX_PINCTRL_PINCTRL_H -#ifdef CONFIG_PINCTRL - #include <linux/radix-tree.h> #include <linux/list.h> #include <linux/seq_file.h> @@ -203,6 +201,4 @@ extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev); extern const char *pinctrl_dev_get_devname(struct pinctrl_dev *pctldev); extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev); -#endif /* !CONFIG_PINCTRL */ - #endif /* __LINUX_PINCTRL_PINCTRL_H */ |