<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/devfreq/governor_userspace.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-14T11:04:16+00:00</updated>
<entry>
<title>PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store()</title>
<updated>2025-07-14T11:04:16+00:00</updated>
<author>
<name>Lifeng Zheng</name>
<email>zhenglifeng1@huawei.com</email>
</author>
<published>2025-04-21T03:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=914cc799b28f17d369d5b4db3b941957d18157e8'/>
<id>urn:sha1:914cc799b28f17d369d5b4db3b941957d18157e8</id>
<content type='text'>
Replace sscanf() with kstrtoul() in set_freq_store() and check the result
to avoid invalid input.

Signed-off-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Link: https://lore.kernel.org/lkml/20250421030020.3108405-2-zhenglifeng1@huawei.com/
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM/devfreq: governor: add missing MODULE_DESCRIPTION() macros</title>
<updated>2024-09-04T15:33:00+00:00</updated>
<author>
<name>Jeff Johnson</name>
<email>quic_jjohnson@quicinc.com</email>
</author>
<published>2024-06-05T18:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53e4e2b51727d325cd13feddd1d8d3d9be3df884'/>
<id>urn:sha1:53e4e2b51727d325cd13feddd1d8d3d9be3df884</id>
<content type='text'>
make allmodconfig &amp;&amp; make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_simpleondemand.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_performance.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_powersave.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_userspace.o

Add all missing invocations of the MODULE_DESCRIPTION() macro.

Link: https://lore.kernel.org/lkml/20240605-md-drivers-devfreq-v1-1-d01ae91b907e@quicinc.com/
Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM/devfreq: governor: Add a private governor_data for governor</title>
<updated>2022-11-20T11:49:51+00:00</updated>
<author>
<name>Kant Fan</name>
<email>kant@allwinnertech.com</email>
</author>
<published>2022-10-25T07:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5fdded8448924e3631d466eea499b11606c43640'/>
<id>urn:sha1:5fdded8448924e3631d466eea499b11606c43640</id>
<content type='text'>
The member void *data in the structure devfreq can be overwrite
by governor_userspace. For example:
1. The device driver assigned the devfreq governor to simple_ondemand
by the function devfreq_add_device() and init the devfreq member
void *data to a pointer of a static structure devfreq_simple_ondemand_data
by the function devfreq_add_device().
2. The user changed the devfreq governor to userspace by the command
"echo userspace &gt; /sys/class/devfreq/.../governor".
3. The governor userspace alloced a dynamic memory for the struct
userspace_data and assigend the member void *data of devfreq to
this memory by the function userspace_init().
4. The user changed the devfreq governor back to simple_ondemand
by the command "echo simple_ondemand &gt; /sys/class/devfreq/.../governor".
5. The governor userspace exited and assigned the member void *data
in the structure devfreq to NULL by the function userspace_exit().
6. The governor simple_ondemand fetched the static information of
devfreq_simple_ondemand_data in the function
devfreq_simple_ondemand_func() but the member void *data of devfreq was
assigned to NULL by the function userspace_exit().
7. The information of upthreshold and downdifferential is lost
and the governor simple_ondemand can't work correctly.

The member void *data in the structure devfreq is designed for
a static pointer used in a governor and inited by the function
devfreq_add_device(). This patch add an element named governor_data
in the devfreq structure which can be used by a governor(E.g userspace)
who want to assign a private data to do some private things.

Fixes: ce26c5bb9569 ("PM / devfreq: Add basic governors")
Cc: stable@vger.kernel.org # 5.10+
Reviewed-by: Chanwoo Choi &lt;cwchoi00@gmail.com&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kant Fan &lt;kant@allwinnertech.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: userspace: Use DEVICE_ATTR_RW macro</title>
<updated>2021-06-17T08:08:46+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2021-05-24T02:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ad4f329fccb5d9eb7b0a38d7fdf0f4688c6b341'/>
<id>urn:sha1:1ad4f329fccb5d9eb7b0a38d7fdf0f4688c6b341</id>
<content type='text'>
Use DEVICE_ATTR_RW helper instead of plain DEVICE_ATTR,
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Use constant name of userspace governor</title>
<updated>2020-03-24T23:35:03+00:00</updated>
<author>
<name>pierre Kuo</name>
<email>vichy.kuo@gmail.com</email>
</author>
<published>2020-01-23T15:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bb1faaccfded8b2755c052f0e2156780f825ded'/>
<id>urn:sha1:4bb1faaccfded8b2755c052f0e2156780f825ded</id>
<content type='text'>
Based on commit aa7c352f9841 ("PM / devfreq: Define the constant governor
name"), use constant name for userspace governor.

Signed-off-by: pierre Kuo &lt;vichy.kuo@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500</title>
<updated>2019-06-19T15:09:55+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2912cb15bdda8ba4a5dd73396ad62641af2f520'/>
<id>urn:sha1:d2912cb15bdda8ba4a5dd73396ad62641af2f520</id>
<content type='text'>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Don't adjust to user limits in governors</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2018-08-03T20:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ff66e2a008337b8a005fd0ae2037bed716262cc'/>
<id>urn:sha1:6ff66e2a008337b8a005fd0ae2037bed716262cc</id>
<content type='text'>
Several governors use the user space limits df-&gt;min/max_freq to adjust
the target frequency. This is not necessary, since update_devfreq()
already takes care of this. Instead the governor can request the available
min/max frequency by setting the target frequency to DEVFREQ_MIN/MAX_FREQ
and let update_devfreq() take care of any adjustments.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Define the constant governor name</title>
<updated>2017-10-26T08:08:40+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-10-23T01:32:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa7c352f9841ab3fee5bf1de127a45e6310124a6'/>
<id>urn:sha1:aa7c352f9841ab3fee5bf1de127a45e6310124a6</id>
<content type='text'>
Prior to that, the devfreq device uses the governor name when adding
the itself. In order to prevent the mistake used the wrong governor name,
this patch defines the governor name as a constant and then uses them
instead of using the string directly.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
</content>
</entry>
<entry>
<title>PM / devfreq: constify attribute_group structures.</title>
<updated>2017-07-06T01:17:24+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-07-03T10:10:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37d644aa01c092686af8a96f34df93c74e55b480'/>
<id>urn:sha1:37d644aa01c092686af8a96f34df93c74e55b480</id>
<content type='text'>
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by &lt;linux/sysfs.h&gt; work with const
attribute_group. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
    621	    176	      0	    797	    31d	drivers/devfreq/governor_userspace.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   670	    144	      0	    814	    32e	drivers/devfreq/governor_userspace.o

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix the wrong description for userspace governor</title>
<updated>2017-01-31T05:12:19+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2017-01-16T12:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c701335e7afaef95519b0a3a405bb646e0ffef5f'/>
<id>urn:sha1:c701335e7afaef95519b0a3a405bb646e0ffef5f</id>
<content type='text'>
This patch fixes the wrong description of governor_userspace.c
and removes the unneeded blank line.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
</feed>
