diff options
| author | Rob Herring (Arm) <robh@kernel.org> | 2026-08-31 14:43:51 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-09-13 18:17:31 -0700 |
| commit | 55fc280e951ab2b39f3dcb640edc1b1eebc6d173 (patch) | |
| tree | f0b5f37b42fc13b9908a31b657c646b024231cdd /rust/helpers/task.c | |
| download | linux-stable-55fc280e951ab2b39f3dcb640edc1b1eebc6d173.tar.gz linux-stable-55fc280e951ab2b39f3dcb640edc1b1eebc6d173.zip | |
Input: tsc2007 - read "ti,poll-period" as u32grafted
The "ti,poll-period" property is documented as a normal uint32 cell.
The driver used a u64 helper, which makes the helper type disagree with
the schema even though the stored value is still small.
Read "ti,poll-period" with the u32 helper matching the documented DT
cell size.
Assisted-by: Codex:gpt-5-5
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260831194352.1185860-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'rust/helpers/task.c')
| -rw-r--r-- | rust/helpers/task.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/rust/helpers/task.c b/rust/helpers/task.c new file mode 100644 index 000000000..c0e1a06ed --- /dev/null +++ b/rust/helpers/task.c @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/kernel.h> +#include <linux/sched/task.h> + +__rust_helper void rust_helper_might_resched(void) +{ + might_resched(); +} + +__rust_helper struct task_struct *rust_helper_get_current(void) +{ + return current; +} + +__rust_helper void rust_helper_get_task_struct(struct task_struct *t) +{ + get_task_struct(t); +} + +__rust_helper void rust_helper_put_task_struct(struct task_struct *t) +{ + put_task_struct(t); +} + +__rust_helper kuid_t rust_helper_task_uid(struct task_struct *task) +{ + return task_uid(task); +} + +__rust_helper kuid_t rust_helper_task_euid(struct task_struct *task) +{ + return task_euid(task); +} + +#ifndef CONFIG_USER_NS +__rust_helper uid_t rust_helper_from_kuid(struct user_namespace *to, kuid_t uid) +{ + return from_kuid(to, uid); +} +#endif /* CONFIG_USER_NS */ + +__rust_helper bool rust_helper_uid_eq(kuid_t left, kuid_t right) +{ + return uid_eq(left, right); +} + +__rust_helper kuid_t rust_helper_current_euid(void) +{ + return current_euid(); +} + +__rust_helper struct user_namespace *rust_helper_current_user_ns(void) +{ + return current_user_ns(); +} + +__rust_helper pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk, + struct pid_namespace *ns) +{ + return task_tgid_nr_ns(tsk, ns); +} |
