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

Re: [PATCH v3 10/16] tools/libs/store: use xen_list.h instead of xenstore/list.h



On 12.06.23 12:34, Julien Grall wrote:
Hi,

On 12/06/2023 08:02, Juergen Gross wrote:
On 09.06.23 20:09, Julien Grall wrote:
Hi Juergen,

On 30/05/2023 09:54, Juergen Gross wrote:
Replace the usage of the xenstore private list.h header with the
common xen_list.h one.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
V3:
- new patch
---
  tools/libs/store/xs.c | 56 +++++++++++++++++++++----------------------
  1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c
index 7a9a8b1656..3813b69ae2 100644
--- a/tools/libs/store/xs.c
+++ b/tools/libs/store/xs.c
@@ -35,13 +35,13 @@
  #include <errno.h>
  #include "xenstore.h"
  #include "xs_lib.h"
-#include "list.h"
  #include "utils.h"
  #include <xentoolcore_internal.h>
+#include <xen_list.h>
  struct xs_stored_msg {
-    struct list_head list;
+    XEN_TAILQ_ENTRY(struct xs_stored_msg) list;

I have expected us to use to XEN_LIST_*. Can you explain why you didn't use them?

XEN_LIST_* doesn't provide a list_add_tail() replacement.

Ok. Did you look at whether list_add_tail() could be replaced with adding the element at the head?

Anyway, I can understand that this would not be a straight swap. But it would be good to have some rationale in the commit message as this helps understanding the choice.

Okay, I'll add: "Use the XEN_TAILQ type list, as it allows to directly swap the
related macros/functions without having to change the logic."


With that:

Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks,


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

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