Re: [PATCH spice-common 1/3] ring: Remove __ring_remove function

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

 



Frediano Ziglio writes:

> Is just used by ring_remove, no reason to have it.

Nack. I think there is a good reason: the code and its intent is much
clearer with a "ring_remove" name.


>
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  common/ring.h | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/common/ring.h b/common/ring.h
> index 4b0e313..036c098 100644
> --- a/common/ring.h
> +++ b/common/ring.h
> @@ -70,19 +70,14 @@ static inline void ring_add_before(RingItem *item, RingItem *pos)
>      ring_add(pos->prev, item);
>  }
>
> -static inline void __ring_remove(RingItem *item)
> -{
> -    item->next->prev = item->prev;
> -    item->prev->next = item->next;
> -    item->prev = item->next = NULL;
> -}
> -
>  static inline void ring_remove(RingItem *item)
>  {
>      spice_assert(item->next != NULL && item->prev != NULL);
>      spice_assert(item->next != item);
>
> -    __ring_remove(item);
> +    item->next->prev = item->prev;
> +    item->prev->next = item->next;
> +    item->prev = item->next = NULL;
>  }
>
>  static inline RingItem *ring_get_head(Ring *ring)


--
Cheers,
Christophe de Dinechin (IRC c3d)
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]