All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: add kernel-doc for set_cpus_allowed_ptr
@ 2023-08-29  8:25 Costa Shulyupin
  2023-08-29 19:02 ` Ingo Molnar
  2023-08-29 19:32 ` [tip: sched/urgent] sched/core: Add kernel-doc for set_cpus_allowed_ptr() tip-bot2 for Costa Shulyupin
  0 siblings, 2 replies; 3+ messages in thread
From: Costa Shulyupin @ 2023-08-29  8:25 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel
  Cc: Costa Shulyupin

This is an exported symbol, so it should have kernel-doc.
Add a note to very similar function do_set_cpus_allowed
to avoid confusion and misuse.
---
 include/linux/sched.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 177b3f3676ef..ee64d1877be0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1858,7 +1858,17 @@ extern int task_can_attach(struct task_struct *p);
 extern int dl_bw_alloc(int cpu, u64 dl_bw);
 extern void dl_bw_free(int cpu, u64 dl_bw);
 #ifdef CONFIG_SMP
+
+/* do_set_cpus_allowed - consider using set_cpus_allowed_ptr instead */
 extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
+
+/**
+ * set_cpus_allowed_ptr - set CPU affinity mask of a task
+ * @p: the task
+ * @new_mask: CPU affinity mask
+ *
+ * Return: zero if successful, or a negative error code
+ */
 extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
 extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
 extern void release_user_cpus_ptr(struct task_struct *p);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched: add kernel-doc for set_cpus_allowed_ptr
  2023-08-29  8:25 [PATCH] sched: add kernel-doc for set_cpus_allowed_ptr Costa Shulyupin
@ 2023-08-29 19:02 ` Ingo Molnar
  2023-08-29 19:32 ` [tip: sched/urgent] sched/core: Add kernel-doc for set_cpus_allowed_ptr() tip-bot2 for Costa Shulyupin
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2023-08-29 19:02 UTC (permalink / raw)
  To: Costa Shulyupin
  Cc: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel


* Costa Shulyupin <costa.shul@redhat.com> wrote:

> This is an exported symbol, so it should have kernel-doc.
> Add a note to very similar function do_set_cpus_allowed
> to avoid confusion and misuse.
> ---
>  include/linux/sched.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

I've added your Signed-off-by tag:

	Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>

please let me know if that is in error.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: sched/urgent] sched/core: Add kernel-doc for set_cpus_allowed_ptr()
  2023-08-29  8:25 [PATCH] sched: add kernel-doc for set_cpus_allowed_ptr Costa Shulyupin
  2023-08-29 19:02 ` Ingo Molnar
@ 2023-08-29 19:32 ` tip-bot2 for Costa Shulyupin
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Costa Shulyupin @ 2023-08-29 19:32 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Costa Shulyupin, Ingo Molnar, x86, linux-kernel

The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     ae89408341f59e39d3b7d9e0d58905722136a176
Gitweb:        https://git.kernel.org/tip/ae89408341f59e39d3b7d9e0d58905722136a176
Author:        Costa Shulyupin <costa.shul@redhat.com>
AuthorDate:    Tue, 29 Aug 2023 11:25:51 +03:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 29 Aug 2023 21:02:58 +02:00

sched/core: Add kernel-doc for set_cpus_allowed_ptr()

This is an exported symbol, so it should have kernel-doc.
Add a note to very similar function do_set_cpus_allowed()
to avoid confusion and misuse.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230829082551.2661290-1-costa.shul@redhat.com
---
 include/linux/sched.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 177b3f3..ae6fd76 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1858,7 +1858,17 @@ extern int task_can_attach(struct task_struct *p);
 extern int dl_bw_alloc(int cpu, u64 dl_bw);
 extern void dl_bw_free(int cpu, u64 dl_bw);
 #ifdef CONFIG_SMP
+
+/* do_set_cpus_allowed() - consider using set_cpus_allowed_ptr() instead */
 extern void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask);
+
+/**
+ * set_cpus_allowed_ptr - set CPU affinity mask of a task
+ * @p: the task
+ * @new_mask: CPU affinity mask
+ *
+ * Return: zero if successful, or a negative error code
+ */
 extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask);
 extern int dup_user_cpus_ptr(struct task_struct *dst, struct task_struct *src, int node);
 extern void release_user_cpus_ptr(struct task_struct *p);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-29 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29  8:25 [PATCH] sched: add kernel-doc for set_cpus_allowed_ptr Costa Shulyupin
2023-08-29 19:02 ` Ingo Molnar
2023-08-29 19:32 ` [tip: sched/urgent] sched/core: Add kernel-doc for set_cpus_allowed_ptr() tip-bot2 for Costa Shulyupin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.