summaryrefslogtreecommitdiff
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-30 14:43:47 +0900
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-07-30 09:48:54 +0200
commit9091373ab7ea27cad381ce71aa37de6b9e687e81 (patch)
tree1afe4d8bb54921d6c03e1af5a1120447da137a23 /Documentation/driver-api
parent66ad66293edeb2bcc27a329f35018b18601da452 (diff)
gpio: remove less important #ifdef around declarations
The whole struct/function declarations in this header are surrounded by #ifdef. As far as I understood, the motivation of this is probably to break the build earlier if a driver misses to select or depend on correct CONFIG options in Kconfig. Since commit 94bed2a9c4ae ("Add -Werror-implicit-function-declaration") no one cannot call functions that have not been declared. So, I see some benefit in doing this in the cost of uglier headers. In reality, it would not be so easy to catch missed 'select' or 'depends on' because GPIOLIB, GPIOLIB_IRQCHIP etc. are already selected by someone else eventually. So, this kind of error, if any, will be caught by randconfig bots. In summary, I am not a big fan of cluttered #ifdef nesting, and this does not matter for normal developers. The code readability wins. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'Documentation/driver-api')
0 files changed, 0 insertions, 0 deletions