Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704736
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef |
| Date | 2017-08-06 05:00 +0200 |
| Message-ID | <ubjXk-4W5-3@gated-at.bofh.it> (permalink) |
| References | <uaKZB-7A9-25@gated-at.bofh.it> <uaT6N-4ub-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnd, 2017-08-05 7:10 GMT+09:00 Arnd Bergmann <arnd@arndb.de>: > On Fri, Aug 4, 2017 at 3:34 PM, Masahiro Yamada > <yamada.masahiro@socionext.com> wrote: >> Include mmci_qcom_dml.h from mmci_qcom_dml.c to fix the following >> sparse warnings: >> >> CHECK drivers/mmc/host/mmci_qcom_dml.c >> drivers/mmc/host/mmci_qcom_dml.c:57:6: warning: symbol 'dml_start_xfer' was not declared. Should it be static? >> drivers/mmc/host/mmci_qcom_dml.c:122:5: warning: symbol 'dml_hw_init' was not declared. Should it be static? >> >> Fixing them causes redefintion of dml_start_xfer error, revealing another >> problem in the header. #ifdef CONFIG_MMC_QCOM_DML is wrong because this >> driver is tristate. (CONFIG_MMC_QCOM_DML_MODULE is defined when it is >> built as a module) >> >> Since dml_hw_init() is called from mmci.c, IS_REACHABLE() is needed to >> cater to all the combinations. >> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > > I think this is still not a good solution, it will just turn a link error into > an unusable system at runtime when the DML code is a loadable module > but not used. Also, the symbols are not exported, so it won't work when both > are built as modules. > How about linking the DML code into the mmci module and making that > Kconfig option a 'bool'? You are right. My patch does not solve the root of the problem. It turned out not so trivial as I had first expected. I'd like somebody else to take care of it because I am not familiar with this driver. (My first motivation was clean-up sparse reports, and I thought it was easy to fix it, but it was not.) -- Best Regards Masahiro Yamada
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-04 15:40 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Arnd Bergmann <arnd@arndb.de> - 2017-08-05 00:20 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-06 05:00 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Arnd Bergmann <arnd@arndb.de> - 2017-08-06 11:40 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Ulf Hansson <ulf.hansson@linaro.org> - 2017-08-06 12:20 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2017-08-06 12:30 +0200
Re: [PATCH v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef Arnd Bergmann <arnd@arndb.de> - 2017-08-06 22:50 +0200
csiph-web