diff mbox series

[-next] thermal: power_allocator: Fix Kconfig warning

Message ID 20191112145114.36580-1-yuehaibing@huawei.com (mailing list archive)
State Superseded, archived
Headers show
Series [-next] thermal: power_allocator: Fix Kconfig warning | expand

Commit Message

Yue Haibing Nov. 12, 2019, 2:51 p.m. UTC
When do randbuiding, we got this:

WARNING: unmet direct dependencies detected for THERMAL_GOV_POWER_ALLOCATOR
  Depends on [n]: THERMAL [=y] && ENERGY_MODEL [=n]
  Selected by [y]:
  - THERMAL_DEFAULT_GOV_POWER_ALLOCATOR [=y] && <choice>

Make THERMAL_DEFAULT_GOV_POWER_ALLOCATOR also depends on ENERGY_MODEL.

Fixes: a4e893e802e6 ("thermal: cpu_cooling: Migrate to using the EM framework")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/thermal/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Quentin Perret Nov. 12, 2019, 3:13 p.m. UTC | #1
On Tuesday 12 Nov 2019 at 22:51:14 (+0800), YueHaibing wrote:
> When do randbuiding, we got this:
> 
> WARNING: unmet direct dependencies detected for THERMAL_GOV_POWER_ALLOCATOR
>   Depends on [n]: THERMAL [=y] && ENERGY_MODEL [=n]
>   Selected by [y]:
>   - THERMAL_DEFAULT_GOV_POWER_ALLOCATOR [=y] && <choice>

This will not cause run-time problems, but I guess the warning is
annoying so ...

> Make THERMAL_DEFAULT_GOV_POWER_ALLOCATOR also depends on ENERGY_MODEL.
>  
> Fixes: a4e893e802e6 ("thermal: cpu_cooling: Migrate to using the EM framework")

Daniel: can we rely on this sha1 ? Or is this branch force-pushed ?

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/thermal/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 59b79fc..5e9e038 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -108,6 +108,7 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
>  
>  config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
>  	bool "power_allocator"
> +	depends on ENERGY_MODEL
>  	select THERMAL_GOV_POWER_ALLOCATOR
>  	help
>  	  Select this if you want to control temperature based on
> -- 
> 2.7.4

Thanks,
Quentin
Quentin Perret Nov. 12, 2019, 3:28 p.m. UTC | #2
On Tuesday 12 Nov 2019 at 15:13:19 (+0000), Quentin Perret wrote:
> On Tuesday 12 Nov 2019 at 22:51:14 (+0800), YueHaibing wrote:
> > When do randbuiding, we got this:
> > 
> > WARNING: unmet direct dependencies detected for THERMAL_GOV_POWER_ALLOCATOR
> >   Depends on [n]: THERMAL [=y] && ENERGY_MODEL [=n]
> >   Selected by [y]:
> >   - THERMAL_DEFAULT_GOV_POWER_ALLOCATOR [=y] && <choice>
> 
> This will not cause run-time problems, but I guess the warning is
> annoying so ...
> 
> > Make THERMAL_DEFAULT_GOV_POWER_ALLOCATOR also depends on ENERGY_MODEL.
> >  
> > Fixes: a4e893e802e6 ("thermal: cpu_cooling: Migrate to using the EM framework")
> 
> Daniel: can we rely on this sha1 ? Or is this branch force-pushed ?
> 
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> >  drivers/thermal/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > index 59b79fc..5e9e038 100644
> > --- a/drivers/thermal/Kconfig
> > +++ b/drivers/thermal/Kconfig
> > @@ -108,6 +108,7 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
> >  
> >  config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
> >  	bool "power_allocator"
> > +	depends on ENERGY_MODEL
> >  	select THERMAL_GOV_POWER_ALLOCATOR

And actually, instead of doing this, we probably should change this
'select THERMAL_GOV_POWER_ALLOCATOR' by a 'depends on'.

> >  	help
> >  	  Select this if you want to control temperature based on
> > -- 
> > 2.7.4
> 
> Thanks,
> Quentin
diff mbox series

Patch

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 59b79fc..5e9e038 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -108,6 +108,7 @@  config THERMAL_DEFAULT_GOV_USER_SPACE
 
 config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
 	bool "power_allocator"
+	depends on ENERGY_MODEL
 	select THERMAL_GOV_POWER_ALLOCATOR
 	help
 	  Select this if you want to control temperature based on