<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/drivers/devfreq/devfreq.c, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-05-10T12:53:44+00:00</updated>
<entry>
<title>PM / devfreq: Fix governor_store() failing when device has no current governor</title>
<updated>2026-05-10T12:53:44+00:00</updated>
<author>
<name>Yaxiong Tian</name>
<email>tianyaxiong@kylinos.cn</email>
</author>
<published>2026-04-30T03:20:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=c096be11c2a9d4acca8e75f1f8edeb744aceb521'/>
<id>urn:sha1:c096be11c2a9d4acca8e75f1f8edeb744aceb521</id>
<content type='text'>
Since devfreq_remove_governor() may clear the device's current governor
in certain situations, while governors actually exist independently
of the device, directly returning EINVAL in this case is inaccurate.

To fix this issue, remove this check and add relevant logic for when
df-&gt;governor is NULL.

Fixes: 483d557ee9a3 ("PM / devfreq: Clean up the devfreq instance name in sysfs attr")
Co-developed-by: Choi Chanwoo &lt;cwchoi00@gmail.com&gt;
Signed-off-by: Yaxiong Tian &lt;tianyaxiong@kylinos.cn&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://lore.kernel.org/all/20260430032035.75496-1-tianyaxiong@kylinos.cn/
</content>
</entry>
<entry>
<title>PM / devfreq: Optimize error return value of governor_show()</title>
<updated>2026-04-29T22:06:44+00:00</updated>
<author>
<name>Yaxiong Tian</name>
<email>tianyaxiong@kylinos.cn</email>
</author>
<published>2026-04-01T03:31:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=0f4c52073b2e45986c4845ac70d668b294fbb877'/>
<id>urn:sha1:0f4c52073b2e45986c4845ac70d668b294fbb877</id>
<content type='text'>
When df-&gt;governor is NULL, governor_show() returns -EINVAL, which
confuses users.

To fix this issue, return -ENOENT to indicate that no governor is
currently set for the device.

Signed-off-by: Yaxiong Tian &lt;tianyaxiong@kylinos.cn&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://patchwork.kernel.org/project/linux-pm/patch/20260401033128.67925-1-tianyaxiong@kylinos.cn/
</content>
</entry>
<entry>
<title>PM / devfreq: Fix available_governors_show() when no governor is set</title>
<updated>2026-04-29T21:47:06+00:00</updated>
<author>
<name>Yaxiong Tian</name>
<email>tianyaxiong@kylinos.cn</email>
</author>
<published>2026-04-01T03:30:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=b9199c0e7d908765de1dec6ecaec00952dd2b84c'/>
<id>urn:sha1:b9199c0e7d908765de1dec6ecaec00952dd2b84c</id>
<content type='text'>
Since devfreq_remove_governor() may clear the device's current governor
in certain situations, while governors actually exist independently of
the device, directly returning EINVAL in this case is inaccurate.

To fix this issue, remove this check and use df-&gt;governor for validity
verification in the following code.

Fixes: 483d557ee9a3 ("PM / devfreq: Clean up the devfreq instance name in sysfs attr")
Signed-off-by: Yaxiong Tian &lt;tianyaxiong@kylinos.cn&gt;
Reviewed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://patchwork.kernel.org/project/linux-pm/patch/20260401033055.67608-1-tianyaxiong@kylinos.cn/
</content>
</entry>
<entry>
<title>PM / devfreq: Fix possible null pointer issue in devfreq_add_governor()</title>
<updated>2026-04-29T21:47:05+00:00</updated>
<author>
<name>Yaxiong Tian</name>
<email>tianyaxiong@kylinos.cn</email>
</author>
<published>2026-04-01T03:30:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a042a47a0e3f872c140bf669e0f98420b8027f90'/>
<id>urn:sha1:a042a47a0e3f872c140bf669e0f98420b8027f90</id>
<content type='text'>
When a user removes a governor using devfreq_remove_governor(), if
the current device is using this governor, devfreq-&gt;governor will
be set to NULL. When the user registers any governor
using devfreq_add_governor(), since devfreq-&gt;governor is NULL, a
null pointer error occurs in strncmp().

For example: A user loads the userspace gov through a module, then
a device selects userspace. When unloading the userspace module and
then loading it again, the null pointer error occurs:

Unable to handle kernel NULL pointer dereference at virtual address
0000000000000010
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
*******************skip *********************
Call trace:
__pi_strncmp+0x20/0x1b8
devfreq_userspace_init+0x1c/0xff8 [governor_userspace]
do_one_initcall+0x4c/0x278
do_init_module+0x5c/0x218
load_module+0x1f1c/0x1fc8
init_module_from_file+0x8c/0xd0
__arm64_sys_finit_module+0x220/0x3d8
invoke_syscall+0x48/0x110
el0_svc_common.constprop.0+0xbc/0xe8
do_el0_svc+0x20/0x30
el0_svc+0x24/0xb8
el0t_64_sync_handler+0xb8/0xc0
el0t_64_sync+0x14c/0x150

To fix this issue, remove the list_for_each_entry() logic, as
find_devfreq_governor() has already checked for the existence of
governor with the same name. This makes it impossible to find a
duplicate governor in the list, so the subsequent logic is
unreachable and can be removed.

Fixes: 1b5c1be2c88e ("PM / devfreq: map devfreq drivers to governor using name")
Signed-off-by: Yaxiong Tian &lt;tianyaxiong@kylinos.cn&gt;
Co-developed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://patchwork.kernel.org/project/linux-pm/patch/20260401033046.67482-1-tianyaxiong@kylinos.cn/
</content>
</entry>
<entry>
<title>PM / devfreq: use _visible attribute to replace create/remove_sysfs_files()</title>
<updated>2026-04-03T18:15:38+00:00</updated>
<author>
<name>Pengjie Zhang</name>
<email>zhangpengjie2@huawei.com</email>
</author>
<published>2025-12-16T03:11:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=943a872fe41a8352d64b20de77d8b707978e5732'/>
<id>urn:sha1:943a872fe41a8352d64b20de77d8b707978e5732</id>
<content type='text'>
Previously, non-generic attributes (polling_interval, timer) used separate
create/delete logic, leading to race conditions during concurrent access in
creation/deletion. Multi-threaded operations also caused inconsistencies
between governor capabilities and attribute states.

1.Use is_visible + sysfs_update_group() to unify management of these
attributes, eliminating creation/deletion races.
2.Add locks and validation to these attributes, ensuring consistency
between current governor capabilities and attribute operations in
multi-threaded environments.

Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Reviewed-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Pengjie Zhang &lt;zhangpengjie2@huawei.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://www.spinics.net/lists/kernel/msg5967745.html
</content>
</entry>
<entry>
<title>PM / devfreq: Remove unneeded casting for HZ_PER_KHZ</title>
<updated>2026-04-03T18:15:38+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2026-01-14T09:31:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=82bb8dc953c2203bb710b7358f030b1d9bdf698d'/>
<id>urn:sha1:82bb8dc953c2203bb710b7358f030b1d9bdf698d</id>
<content type='text'>
HZ_PER_KHZ is defined as UL (unsigned long), no need to repeat that.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Lifeng Zheng &lt;zhenglifeng1@huawei.com&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://lore.kernel.org/lkml/20260114093115.276818-1-andriy.shevchenko@linux.intel.com/
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Move governor.h to a public header location</title>
<updated>2025-11-23T15:02:01+00:00</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@oss.qualcomm.com</email>
</author>
<published>2025-10-30T18:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=447c4e8338dbfad517769d26b53d633b88d51184'/>
<id>urn:sha1:447c4e8338dbfad517769d26b53d633b88d51184</id>
<content type='text'>
Some device drivers (and out-of-tree modules) might want to define
device-specific device governors. Rather than restricting all of them to
be a part of drivers/devfreq/ (which is not possible for out-of-tree
drivers anyway) move governor.h to include/linux/devfreq-governor.h and
update all drivers to use it.

The devfreq_cpu_data is only used internally, by the passive governor,
so it is moved to the driver source rather than being a part of the
public interface.

Reported-by: Robie Basak &lt;robibasa@qti.qualcomm.com&gt;
Acked-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Acked-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://patchwork.kernel.org/project/linux-pm/patch/20251030-governor-public-v2-1-432a11a9975a@oss.qualcomm.com/
</content>
</entry>
<entry>
<title>PM / devfreq: Allow devfreq driver to add custom sysfs ABIs</title>
<updated>2025-07-14T11:22:59+00:00</updated>
<author>
<name>Jie Zhan</name>
<email>zhanjie9@hisilicon.com</email>
</author>
<published>2025-06-23T14:34:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=45b9d1da6ca0d0285140f8779793b537e4560d45'/>
<id>urn:sha1:45b9d1da6ca0d0285140f8779793b537e4560d45</id>
<content type='text'>
Extend the devfreq_dev_profile to allow drivers optionally create
device-specific sysfs ABIs together with other common devfreq ABIs under
the devfreq device path.

Reviewed-by: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Reviewed-by: Huisong Li &lt;lihuisong@huawei.com&gt;
Signed-off-by: Jie Zhan &lt;zhanjie9@hisilicon.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Link: https://patchwork.kernel.org/project/linux-pm/patch/20250623143401.4095045-2-zhanjie9@hisilicon.com/
</content>
</entry>
</feed>
