[1/8] ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it

Message ID 20230226053953.4681-2-rdunlap@infradead.org
State New
Headers
Series drivers: select REGMAP instead of depending on it |

Commit Message

Randy Dunlap Feb. 26, 2023, 5:39 a.m. UTC
  REGMAP is a hidden (not user visible) symbol. Users cannot set it
directly thru "make *config", so drivers should select it instead of
depending on it if they need it.

Consistently using "select" or "depends on" can also help reduce
Kconfig circular dependency issues.

Therefore, change the use of "depends on REGMAP_MMIO" to
"select REGMAP_MMIO", which will also set REGMAP.

Fixes: eb994594bc22 ("ipmi: bt-bmc: Use a regmap for register access")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/char/ipmi/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Corey Minyard Feb. 26, 2023, 10:59 p.m. UTC | #1
On Sat, Feb 25, 2023 at 09:39:46PM -0800, Randy Dunlap wrote:
> REGMAP is a hidden (not user visible) symbol. Users cannot set it
> directly thru "make *config", so drivers should select it instead of
> depending on it if they need it.
> 
> Consistently using "select" or "depends on" can also help reduce
> Kconfig circular dependency issues.
> 
> Therefore, change the use of "depends on REGMAP_MMIO" to
> "select REGMAP_MMIO", which will also set REGMAP.

This seems reasonable.  I can take it into my tree, or..

Acked-by: Corey Minyard <cminyard@mvista.com>

> 
> Fixes: eb994594bc22 ("ipmi: bt-bmc: Use a regmap for register access")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Corey Minyard <minyard@acm.org>
> Cc: openipmi-developer@lists.sourceforge.net
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/char/ipmi/Kconfig |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -- a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
> --- a/drivers/char/ipmi/Kconfig
> +++ b/drivers/char/ipmi/Kconfig
> @@ -162,7 +162,8 @@ config IPMI_KCS_BMC_SERIO
>  
>  config ASPEED_BT_IPMI_BMC
>  	depends on ARCH_ASPEED || COMPILE_TEST
> -	depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
> +	depends on MFD_SYSCON
> +	select REGMAP_MMIO
>  	tristate "BT IPMI bmc driver"
>  	help
>  	  Provides a driver for the BT (Block Transfer) IPMI interface
  
Randy Dunlap Feb. 26, 2023, 11:49 p.m. UTC | #2
On 2/26/23 14:59, Corey Minyard wrote:
> On Sat, Feb 25, 2023 at 09:39:46PM -0800, Randy Dunlap wrote:
>> REGMAP is a hidden (not user visible) symbol. Users cannot set it
>> directly thru "make *config", so drivers should select it instead of
>> depending on it if they need it.
>>
>> Consistently using "select" or "depends on" can also help reduce
>> Kconfig circular dependency issues.
>>
>> Therefore, change the use of "depends on REGMAP_MMIO" to
>> "select REGMAP_MMIO", which will also set REGMAP.
> 
> This seems reasonable.  I can take it into my tree, or..

Just take it, please. I expect that each subsystem maintainer
will take their respective patches.

> Acked-by: Corey Minyard <cminyard@mvista.com>
> 
>>
>> Fixes: eb994594bc22 ("ipmi: bt-bmc: Use a regmap for register access")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Andrew Jeffery <andrew@aj.id.au>
>> Cc: Corey Minyard <minyard@acm.org>
>> Cc: openipmi-developer@lists.sourceforge.net
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>>  drivers/char/ipmi/Kconfig |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff -- a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
>> --- a/drivers/char/ipmi/Kconfig
>> +++ b/drivers/char/ipmi/Kconfig
>> @@ -162,7 +162,8 @@ config IPMI_KCS_BMC_SERIO
>>  
>>  config ASPEED_BT_IPMI_BMC
>>  	depends on ARCH_ASPEED || COMPILE_TEST
>> -	depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
>> +	depends on MFD_SYSCON
>> +	select REGMAP_MMIO
>>  	tristate "BT IPMI bmc driver"
>>  	help
>>  	  Provides a driver for the BT (Block Transfer) IPMI interface
  

Patch

diff -- a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
--- a/drivers/char/ipmi/Kconfig
+++ b/drivers/char/ipmi/Kconfig
@@ -162,7 +162,8 @@  config IPMI_KCS_BMC_SERIO
 
 config ASPEED_BT_IPMI_BMC
 	depends on ARCH_ASPEED || COMPILE_TEST
-	depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
+	depends on MFD_SYSCON
+	select REGMAP_MMIO
 	tristate "BT IPMI bmc driver"
 	help
 	  Provides a driver for the BT (Block Transfer) IPMI interface