[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 04/12] xen/arm: gic-v3: add ITS suspend/resume support



Hi Jan,

Thank you for the review.

On Mon, Dec 15, 2025 at 1:39 PM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 11.12.2025 19:43, Mykola Kvach wrote:
> > --- a/xen/include/xen/list.h
> > +++ b/xen/include/xen/list.h
> > @@ -535,6 +535,20 @@ static inline void list_splice_init(struct list_head 
> > *list,
> >           &(pos)->member != (head);                                        \
> >           (pos) = list_entry((pos)->member.next, typeof(*(pos)), member))
> >
> > +/**
> > + * list_for_each_entry_continue_reverse - iterate backwards from the given 
> > point
> > + * @pos:    the type * to use as a loop cursor.
> > + * @head:   the head for your list.
> > + * @member: the name of the list_head within the struct.
> > + *
> > + * Start to iterate over list of given type backwards, continuing after
> > + * the current position.
> > + */
> > +#define list_for_each_entry_continue_reverse(pos, head, member)           \
> > +    for ((pos) = list_entry((pos)->member.prev, typeof(*(pos)), member);  \
> > +         &(pos)->member != (head);                                        \
> > +         (pos) = list_entry((pos)->member.prev, typeof(*(pos)), member))
> > +
> >  /**
> >   * list_for_each_entry_from - iterate over list of given type from the
> >   *                            current point
>
> While not said so anywhere, I understand this is taken from Linux. Maybe we
> should indeed take it verbatim (as far as possible, i.e. without the use of
> list_entry_is_head() which we don't have yet), but I'd like to point out
> that in the comment "continuing after the current position" is ambiguous.
> In list order, what is meant is "before the current position"; "after" is
> correct only when considering iteration direction. Personally I would much
> prefer if this was disambiguated.

Got it. I’ll disambiguate the wording while keeping it close to the
Linux text, e.g.:

“Start to iterate over list of given type backwards, continuing with the
entry preceding the current position (i.e. starting from pos->member.prev).”

Best regards,
Mykola



>
> Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.