Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1565425

RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs

From MyungJoo Ham <myungjoo.ham@samsung.com>
Newsgroups linux.kernel
Subject RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs
Date 2017-01-24 03:30 +0100
Message-ID <t2Z1T-6Az-5@gated-at.bofh.it> (permalink)
References <t0SnU-HV-3@gated-at.bofh.it> <t0SnU-HV-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> The devfreq using passive governor is not able to change the governor.
> So, the user can not change the governor through 'available_governor' sysfs
> entry. Also, the devfreq which don't use the passive governor is not able to
> change to 'passive' governor on the fly.
> 
> Fixes: 996133119f57 ("PM / devfreq: Add new passive governor")
> Cc: stable@vger.kernel.org
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/devfreq/devfreq.c | 34 +++++++++++++++++++++++++++++++++-
>  1 file changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 4bd7a8f71b07..a2c575a5a9ab 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -43,6 +43,11 @@
>  static LIST_HEAD(devfreq_list);
>  static DEFINE_MUTEX(devfreq_list_lock);
>  
> +static int is_passive_gov(const char *governor_name)
> +{
> +	return (!strncmp(governor_name, "passive", 7)) ? 1 : 0;
> +}
> +

Having a special function for a governor in devfreq.c isn't looking good.
Could you create it more general?
(e.g., denying being replaced from passive governor)

I'd suggest to "define" data value of event_handler to include the reason
of STOP event for DEVFREQ_GOV_STOP. Then, a governor may "reject" it
depending on the reason. (the reason is to be defined in devfreq.h as well)

Then, the modification can be minimal and general for all others.

The modification in this commit looks too hacky.



Cheers,
MyungJoo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] PM / devfreq: Fix issues about passive governor Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-18 08:00 +0100
  [PATCH 1/3] PM / devfreq: Fix available_governor sysfs Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-18 08:00 +0100
  [PATCH 3/3] PM / devfreq: Remove unnecessary separate _remove_devfreq() Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-18 08:00 +0100
  [PATCH 2/3] PM / devfreq: Fix wrong trans_stat of passive devfreq  device Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-18 08:00 +0100
  RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs MyungJoo Ham <myungjoo.ham@samsung.com> - 2017-01-24 03:30 +0100
  RE: [PATCH 2/3] PM / devfreq: Fix wrong trans_stat of passive devfreq  device MyungJoo Ham <myungjoo.ham@samsung.com> - 2017-01-24 04:50 +0100
  RE: [PATCH 3/3] PM / devfreq: Remove unnecessary separate  _remove_devfreq() MyungJoo Ham <myungjoo.ham@samsung.com> - 2017-01-24 04:50 +0100
  RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs MyungJoo Ham <myungjoo.ham@samsung.com> - 2017-01-24 05:00 +0100
    Re: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-24 07:40 +0100

csiph-web