Re:Re: [PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'

2020-10-26 Thread 苏辉
>Perhaps there should be a list_has_more_than_one() API, as list_is_singular >requires two checks, and the "more_than_one" only requires a single check. > >list_is_singular() is: > > return !list_empty(list) && (list->next == list->prev); > > >which is more work than what you are

Re: [PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'

2020-10-26 Thread Steven Rostedt
On Tue, 27 Oct 2020 01:41:52 +0800 Hui Su wrote: > Use the list_is_singular(_se->run_list) api instead of > 'rt_se->run_list.prev != rt_se->run_list.next'. > Fix a comment by the way, and make the comment more clearly. > > Signed-off-by: Hui Su > --- > kernel/sched/rt.c | 8 > 1 file

[PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'

2020-10-26 Thread Hui Su
Use the list_is_singular(_se->run_list) api instead of 'rt_se->run_list.prev != rt_se->run_list.next'. Fix a comment by the way, and make the comment more clearly. Signed-off-by: Hui Su --- kernel/sched/rt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git