lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe:Re: [PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'
>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 replacing.
>

Hi, Steve:

Thanks for your explanation.
Maybe we should add another api called "list_more_than_one" just without
list_empty() check.

I will send PATCH V2 later.

Thank.
\
 
 \ /
  Last update: 2020-10-27 04:42    [W:1.062 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site