The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Yajun Deng <yajun.deng@linux.dev>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com
Cc: linux-kernel@vger.kernel.org, Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH 0/2] sched: Return NULL when entity isn't a task
Date: Fri,  1 Dec 2023 10:27:02 +0800	[thread overview]
Message-ID: <20231201022704.3526377-1-yajun.deng@linux.dev> (raw)

If the entity isn't a task, return the task struct is meaningless.
Return NULL when entity isn't a task that makes the code more concise.

Yajun Deng (2):
  sched/fair: Return NULL when entity isn't a task in task_of()
  sched/rt: Return NULL when rt entity isn't a task in rt_task_of()

 kernel/sched/fair.c  | 50 +++++++++++++++++------------------
 kernel/sched/rt.c    | 62 ++++++++++++--------------------------------
 kernel/sched/sched.h |  4 ++-
 3 files changed, 44 insertions(+), 72 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-12-01  2:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01  2:27 Yajun Deng [this message]
2023-12-01  2:27 ` [PATCH 1/2] sched/fair: Return NULL when entity isn't a task in task_of() Yajun Deng
2023-12-01  2:27 ` [PATCH 2/2] sched/rt: Return NULL when rt entity isn't a task in rt_task_of() Yajun Deng
2023-12-06  4:13   ` kernel test robot
2023-12-06  6:29   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201022704.3526377-1-yajun.deng@linux.dev \
    --to=yajun.deng@linux.dev \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox