[PATCH] xen/pci: Make use of the helper macro LIST_HEAD()

Cai Huoqing posted 1 patch 2 years, 2 months ago
Failed in applying to current master (apply log)
drivers/xen/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] xen/pci: Make use of the helper macro LIST_HEAD()
Posted by Cai Huoqing 2 years, 2 months ago
Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
---
 drivers/xen/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
index 2c890f4f2cbc..72d4e3f193af 100644
--- a/drivers/xen/pci.c
+++ b/drivers/xen/pci.c
@@ -264,7 +264,7 @@ struct xen_device_domain_owner {
 };
 
 static DEFINE_SPINLOCK(dev_domain_list_spinlock);
-static struct list_head dev_domain_list = LIST_HEAD_INIT(dev_domain_list);
+static LIST_HEAD(dev_domain_list);
 
 static struct xen_device_domain_owner *find_device(struct pci_dev *dev)
 {
-- 
2.25.1

Re: [PATCH] xen/pci: Make use of the helper macro LIST_HEAD()
Posted by Juergen Gross 2 years, 2 months ago
On 09.02.22 04:28, Cai Huoqing wrote:
> Replace "struct list_head head = LIST_HEAD_INIT(head)" with
> "LIST_HEAD(head)" to simplify the code.
> 
> Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen