linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mtd: hyperbus: fix build error about CONFIG_REGMAP
@ 2019-07-19  1:07 Mao Wenan
  2019-07-19  8:58 ` Vignesh Raghavendra
  0 siblings, 1 reply; 2+ messages in thread
From: Mao Wenan @ 2019-07-19  1:07 UTC (permalink / raw)
  To: dwmw2, computersforpeace, marek.vasut, miquel.raynal, richard
  Cc: linux-mtd, linux-kernel, kernel-janitors, Mao Wenan

When CONFIG_MUX_MMIO and CONFIG_HBMC_AM654 are both 'm', there are
some building error as below:

drivers/mux/mmio.c: In function mux_mmio_probe:
drivers/mux/mmio.c:76:20: error: storage size of field isnt known
   struct reg_field field;
                    ^~~~~
drivers/mux/mmio.c:102:15: error: implicit declaration of function devm_regmap_field_alloc; did you mean devm_mux_chip_alloc? [-Werror=implicit-function-declaration]
   fields[i] = devm_regmap_field_alloc(dev, regmap, field);
               ^~~~~~~~~~~~~~~~~~~~~~~
               devm_mux_chip_alloc
drivers/mux/mmio.c:76:20: warning: unused variable field [-Wunused-variable]
   struct reg_field field;
                    ^~~~~
cc1: some warnings being treated as errors
make[2]: *** [drivers/mux/mmio.o] Error 1
make[1]: *** [drivers/mux] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

This because CONFIG_REGMAP is not enable, so change the Kconfig for HBMC_AM654.

Fixes: b07079f1642c("mtd: hyperbus: Add driver for TI's HyperBus memory controller")

Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/mtd/hyperbus/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/hyperbus/Kconfig b/drivers/mtd/hyperbus/Kconfig
index cff6bbd..f324fa6 100644
--- a/drivers/mtd/hyperbus/Kconfig
+++ b/drivers/mtd/hyperbus/Kconfig
@@ -14,6 +14,8 @@ if MTD_HYPERBUS
 
 config HBMC_AM654
 	tristate "HyperBus controller driver for AM65x SoC"
+	select OF
+	select REGMAP
 	select MULTIPLEXER
 	select MUX_MMIO
 	help
-- 
2.7.4


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

* Re: [PATCH -next] mtd: hyperbus: fix build error about CONFIG_REGMAP
  2019-07-19  1:07 [PATCH -next] mtd: hyperbus: fix build error about CONFIG_REGMAP Mao Wenan
@ 2019-07-19  8:58 ` Vignesh Raghavendra
  0 siblings, 0 replies; 2+ messages in thread
From: Vignesh Raghavendra @ 2019-07-19  8:58 UTC (permalink / raw)
  To: Mao Wenan, dwmw2, computersforpeace, marek.vasut, miquel.raynal, richard
  Cc: kernel-janitors, linux-mtd, linux-kernel



On 19/07/19 6:37 AM, Mao Wenan wrote:
> When CONFIG_MUX_MMIO and CONFIG_HBMC_AM654 are both 'm', there are
> some building error as below:
> 
> drivers/mux/mmio.c: In function mux_mmio_probe:
> drivers/mux/mmio.c:76:20: error: storage size of field isnt known
>    struct reg_field field;
>                     ^~~~~
> drivers/mux/mmio.c:102:15: error: implicit declaration of function devm_regmap_field_alloc; did you mean devm_mux_chip_alloc? [-Werror=implicit-function-declaration]
>    fields[i] = devm_regmap_field_alloc(dev, regmap, field);
>                ^~~~~~~~~~~~~~~~~~~~~~~
>                devm_mux_chip_alloc
> drivers/mux/mmio.c:76:20: warning: unused variable field [-Wunused-variable]
>    struct reg_field field;
>                     ^~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/mux/mmio.o] Error 1
> make[1]: *** [drivers/mux] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [drivers] Error 2
> 
> This because CONFIG_REGMAP is not enable, so change the Kconfig for HBMC_AM654.

Since, hbmc-am654.c does not use regmap APIs directly we don't need to
select REGMAP here. MUX_MMIO is optional for this driver, therefore I
have converted that to an imply clause and posted a fix here:
https://patchwork.ozlabs.org/patch/1133946/

Let me know if that fixes the issue. Thanks for the report!

Regards
Vignesh

> 
> Fixes: b07079f1642c("mtd: hyperbus: Add driver for TI's HyperBus memory controller")
> 
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/mtd/hyperbus/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/hyperbus/Kconfig b/drivers/mtd/hyperbus/Kconfig
> index cff6bbd..f324fa6 100644
> --- a/drivers/mtd/hyperbus/Kconfig
> +++ b/drivers/mtd/hyperbus/Kconfig
> @@ -14,6 +14,8 @@ if MTD_HYPERBUS
>  
>  config HBMC_AM654
>  	tristate "HyperBus controller driver for AM65x SoC"
> +	select OF
> +	select REGMAP
>  	select MULTIPLEXER
>  	select MUX_MMIO
>  	help
> 

-- 
Regards
Vignesh

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

end of thread, other threads:[~2019-07-19  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19  1:07 [PATCH -next] mtd: hyperbus: fix build error about CONFIG_REGMAP Mao Wenan
2019-07-19  8:58 ` Vignesh Raghavendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).