From nobody Mon Feb 9 09:16:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1687868933; cv=none; d=zohomail.com; s=zohoarc; b=Yhw9LT3ddbKC3FvjIMlP8g9fhUSVkDlRQKbO/NnqjfO0KblJmJWM+tltXQQycbl4Rc9LWmL0OXjohY3k8rmxtiEFiquhpnOxmj1By5F9ZCZHFXg99rue7p8wTF9A33P4R40fRGmvuBjd6FMQMQ2Z/z5mkzGE3bWWDFS36wZhB84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687868933; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=e+AL7E5KGOqOlaCDidWTO0QIZcUe7+XVvrp9pgAXvoM=; b=YeskLJ7xs8Z5Y701WuN+BvsGFn/As/kk+36aDvHfssxRD4rtBYxJH3lpUYK+SnJbcAbd4jq65nzG814gryAQpttAsuNa5+lqdpUvsf+bfo6qJWJCEDcLW1Mz/5OqfameyI/rBR2Z5J6biOUDmf77ZJN6rALY6CH45EadRuTWmUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1687868933483337.4860677767715; Tue, 27 Jun 2023 05:28:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.556125.868417 (Exim 4.92) (envelope-from ) id 1qE7o1-0002Sl-6H; Tue, 27 Jun 2023 12:28:25 +0000 Received: by outflank-mailman (output) from mailman id 556125.868417; Tue, 27 Jun 2023 12:28:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qE7o1-0002SX-2v; Tue, 27 Jun 2023 12:28:25 +0000 Received: by outflank-mailman (input) for mailman id 556125; Tue, 27 Jun 2023 12:28:23 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qE7nz-0000v0-LY for xen-devel@lists.xenproject.org; Tue, 27 Jun 2023 12:28:23 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [2001:67c:2178:6::1c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1a80c782-14e6-11ee-8611-37d641c3527e; Tue, 27 Jun 2023 14:28:21 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6D8EE218A4; Tue, 27 Jun 2023 12:28:21 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 35CEF13462; Tue, 27 Jun 2023 12:28:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 39t/C+XVmmR1SAAAMHmgww (envelope-from ); Tue, 27 Jun 2023 12:28:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1a80c782-14e6-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1687868901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e+AL7E5KGOqOlaCDidWTO0QIZcUe7+XVvrp9pgAXvoM=; b=BFwqQtf0BAyRSjltwM8CyjuFCUtkGt++g9NhlznjMqA71ucns9m2yBP9R1i7VbM0WLoISc cOLOPAp/r3x7JcvTnSEgJjzQh/v+Lf9kYI9RD7+DKGhsOJjVGo8Zp/AoR/WT/hL/Z6ZnzO H6SdL0G9jzZitf8HOzp99ZGBeyZa0Ng= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v4 5/5] tools/xenstore: remove unused stuff from list.h Date: Tue, 27 Jun 2023 14:27:50 +0200 Message-Id: <20230627122750.2007-6-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230627122750.2007-1-jgross@suse.com> References: <20230627122750.2007-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1687868934700100001 Content-Type: text/plain; charset="utf-8" Remove the hlist defines/functions and the rcu related functions from tools/xenstore/list.h, as they are not used. Signed-off-by: Juergen Gross Acked-by: Julien Grall --- tools/xenstore/list.h | 227 ------------------------------------------ 1 file changed, 227 deletions(-) diff --git a/tools/xenstore/list.h b/tools/xenstore/list.h index a464a38b61..d722a91220 100644 --- a/tools/xenstore/list.h +++ b/tools/xenstore/list.h @@ -88,48 +88,6 @@ static inline void list_add_tail(struct list_head *new, = struct list_head *head) __list_add(new, head->prev, head); } =20 -/* - * Insert a new entry between two known consecutive entries.=20 - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static __inline__ void __list_add_rcu(struct list_head * new, - struct list_head * prev, - struct list_head * next) -{ - new->next =3D next; - new->prev =3D prev; - next->prev =3D new; - prev->next =3D new; -} - -/** - * list_add_rcu - add a new entry to rcu-protected list - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -static __inline__ void list_add_rcu(struct list_head *new, struct list_hea= d *head) -{ - __list_add_rcu(new, head, head->next); -} - -/** - * list_add_tail_rcu - add a new entry to rcu-protected list - * @new: new entry to be added - * @head: list head to add it before - * - * Insert a new entry before the specified head. - * This is useful for implementing queues. - */ -static __inline__ void list_add_tail_rcu(struct list_head *new, struct lis= t_head *head) -{ - __list_add_rcu(new, head->prev, head); -} - /* * Delete a list entry by making the prev/next entries * point to each other. @@ -156,23 +114,6 @@ static inline void list_del(struct list_head *entry) entry->prev =3D LIST_POISON2; } =20 -/** - * list_del_rcu - deletes entry from list without re-initialization - * @entry: the element to delete from the list. - * - * Note: list_empty on entry does not return true after this,=20 - * the entry is in an undefined state. It is useful for RCU based - * lockfree traversal. - * - * In particular, it means that we can not poison the forward=20 - * pointers that may still be used for walking the list. - */ -static inline void list_del_rcu(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - entry->prev =3D LIST_POISON2; -} - /** * list_del_init - deletes entry from list and reinitialize it. * @entry: the element to delete from the list. @@ -339,172 +280,4 @@ static inline void list_splice_init(struct list_head = *list, &pos->member !=3D (head); \ pos =3D n, n =3D list_entry(n->member.next, typeof(*n), member)) =20 - -/*=20 - * Double linked lists with a single pointer list head.=20 - * Mostly useful for hash tables where the two pointer list head is=20 - * too wasteful. - * You lose the ability to access the tail in O(1). - */=20 - -struct hlist_head {=20 - struct hlist_node *first;=20 -};=20 - -struct hlist_node {=20 - struct hlist_node *next, **pprev;=20 -};=20 - -#define HLIST_HEAD_INIT { .first =3D NULL }=20 -#define HLIST_HEAD(name) struct hlist_head name =3D { .first =3D NULL } -#define INIT_HLIST_HEAD(ptr) ((ptr)->first =3D NULL)=20 -#define INIT_HLIST_NODE(ptr) ((ptr)->next =3D NULL, (ptr)->pprev =3D NULL) - -static __inline__ int hlist_unhashed(struct hlist_node *h)=20 -{=20 - return !h->pprev; -}=20 - -static __inline__ int hlist_empty(struct hlist_head *h)=20 -{=20 - return !h->first; -}=20 - -static __inline__ void __hlist_del(struct hlist_node *n)=20 -{ - struct hlist_node *next =3D n->next; - struct hlist_node **pprev =3D n->pprev; - *pprev =3D next; =20 - if (next)=20 - next->pprev =3D pprev; -} =20 - -static __inline__ void hlist_del(struct hlist_node *n) -{ - __hlist_del(n); - n->next =3D LIST_POISON1; - n->pprev =3D LIST_POISON2; -} - -/** - * hlist_del_rcu - deletes entry from hash list without re-initialization - * @entry: the element to delete from the hash list. - * - * Note: list_unhashed() on entry does not return true after this,=20 - * the entry is in an undefined state. It is useful for RCU based - * lockfree traversal. - * - * In particular, it means that we can not poison the forward - * pointers that may still be used for walking the hash list. - */ -static inline void hlist_del_rcu(struct hlist_node *n) -{ - __hlist_del(n); - n->pprev =3D LIST_POISON2; -} - -static __inline__ void hlist_del_init(struct hlist_node *n)=20 -{ - if (n->pprev) { - __hlist_del(n); - INIT_HLIST_NODE(n); - } -} =20 - -#define hlist_del_rcu_init hlist_del_init - -static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_h= ead *h)=20 -{=20 - struct hlist_node *first =3D h->first; - n->next =3D first;=20 - if (first)=20 - first->pprev =3D &n->next; - h->first =3D n;=20 - n->pprev =3D &h->first;=20 -}=20 - -static __inline__ void hlist_add_head_rcu(struct hlist_node *n, struct hli= st_head *h)=20 -{=20 - struct hlist_node *first =3D h->first; - n->next =3D first; - n->pprev =3D &h->first;=20 - if (first)=20 - first->pprev =3D &n->next; - h->first =3D n;=20 -}=20 - -/* next must be !=3D NULL */ -static __inline__ void hlist_add_before(struct hlist_node *n, struct hlist= _node *next) -{ - n->pprev =3D next->pprev; - n->next =3D next;=20 - next->pprev =3D &n->next;=20 - *(n->pprev) =3D n; -} - -static __inline__ void hlist_add_after(struct hlist_node *n, - struct hlist_node *next) -{ - next->next =3D n->next; - *(next->pprev) =3D n; - n->next =3D next; -} - -#define hlist_entry(ptr, type, member) container_of(ptr,type,member) - -/* Cannot easily do prefetch unfortunately */ -#define hlist_for_each(pos, head) \ - for (pos =3D (head)->first; pos; pos =3D pos->next)=20 - -#define hlist_for_each_safe(pos, n, head) \ - for (pos =3D (head)->first; n =3D pos ? pos->next : 0, pos; \ - pos =3D n) - -/** - * hlist_for_each_entry - iterate over list of given type - * @tpos: the type * to use as a loop counter. - * @pos: the &struct hlist_node to use as a loop counter. - * @head: the head for your list. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry(tpos, pos, head, member) \ - for (pos =3D (head)->first; \ - pos && ({ tpos =3D hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos =3D pos->next) - -/** - * hlist_for_each_entry_continue - iterate over a hlist continuing after e= xisting point - * @tpos: the type * to use as a loop counter. - * @pos: the &struct hlist_node to use as a loop counter. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_continue(tpos, pos, member) \ - for (pos =3D (pos)->next; \ - pos && ({ tpos =3D hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos =3D pos->next) - -/** - * hlist_for_each_entry_from - iterate over a hlist continuing from existi= ng point - * @tpos: the type * to use as a loop counter. - * @pos: the &struct hlist_node to use as a loop counter. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_from(tpos, pos, member) \ - for (; pos && ({ tpos =3D hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos =3D pos->next) - -/** - * hlist_for_each_entry_safe - iterate over list of given type safe agains= t removal of list entry - * @tpos: the type * to use as a loop counter. - * @pos: the &struct hlist_node to use as a loop counter. - * @n: another &struct hlist_node to use as temporary storage - * @head: the head for your list. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \ - for (pos =3D (head)->first; \ - pos && ({ n =3D pos->next; 1; }) && \ - ({ tpos =3D hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos =3D n) - #endif --=20 2.35.3