lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250115085409.1629787-12-jirislaby@kernel.org>
Date: Wed, 15 Jan 2025 09:54:00 +0100
From: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
To: tglx@...utronix.de
Cc: maz@...nel.org,
	linux-kernel@...r.kernel.org,
	"Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Subject: [PATCH 11/18] irqdomain: Rename _instantiate functions to _add

Continuing the unifying idea of previous patches, all "_instantiate"
functions are renamed to "_add".

Now, the interface is:
* dom = irq_domain_add(info)
* irq_domain_remove(dom)

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
---
 arch/um/drivers/virt-pci.c        |  2 +-
 drivers/base/regmap/regmap-irq.c  |  2 +-
 drivers/irqchip/irq-lan966x-oic.c |  2 +-
 include/linux/irqdomain.h         | 16 ++++++++--------
 kernel/irq/devres.c               |  8 ++++----
 kernel/irq/irqdomain.c            | 16 ++++++++--------
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c
index 744e7f31e8ef..1de5407a189c 100644
--- a/arch/um/drivers/virt-pci.c
+++ b/arch/um/drivers/virt-pci.c
@@ -1023,7 +1023,7 @@ static int __init um_pci_init(void)
 	}
 
 	inner_domain_info.fwnode = um_pci_fwnode;
-	um_pci_inner_domain = irq_domain_instantiate(&inner_domain_info);
+	um_pci_inner_domain = irq_domain_add(&inner_domain_info);
 	if (IS_ERR(um_pci_inner_domain)) {
 		err = PTR_ERR(um_pci_inner_domain);
 		goto free;
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 0bcd81389a29..e58cb6b9c3bc 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -623,7 +623,7 @@ static int regmap_irq_create_domain(struct fwnode_handle *fwnode, int irq_base,
 		.name_suffix = chip->domain_suffix,
 	};
 
-	d->domain = irq_domain_instantiate(&info);
+	d->domain = irq_domain_add(&info);
 	if (IS_ERR(d->domain)) {
 		dev_err(d->map->dev, "Failed to create IRQ domain\n");
 		return PTR_ERR(d->domain);
diff --git a/drivers/irqchip/irq-lan966x-oic.c b/drivers/irqchip/irq-lan966x-oic.c
index 9445c3a6b1b0..fd29bc6611a5 100644
--- a/drivers/irqchip/irq-lan966x-oic.c
+++ b/drivers/irqchip/irq-lan966x-oic.c
@@ -251,7 +251,7 @@ static int lan966x_oic_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, lan966x_oic->irq, "failed to get the IRQ\n");
 
 	d_info.host_data = lan966x_oic;
-	domain = devm_irq_domain_instantiate(dev, &d_info);
+	domain = devm_irq_domain_add(dev, &d_info);
 	if (IS_ERR(domain))
 		return dev_err_probe(dev, PTR_ERR(domain),
 				     "failed to instantiate the IRQ domain\n");
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 00a0bf2c0942..0a48cdd5f981 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -329,8 +329,8 @@ struct irq_domain_info {
 	void					(*exit)(struct irq_domain *d);
 };
 
-struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info);
-struct irq_domain *devm_irq_domain_instantiate(struct device *dev,
+struct irq_domain *irq_domain_add(const struct irq_domain_info *info);
+struct irq_domain *devm_irq_domain_add(struct device *dev,
 					       const struct irq_domain_info *info);
 
 struct irq_domain *irq_domain_add_simple_fwnode(struct fwnode_handle *fwnode,
@@ -445,7 +445,7 @@ static inline struct irq_domain *irq_domain_add_linear_of_node(struct device_nod
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
@@ -463,7 +463,7 @@ static inline struct irq_domain *irq_domain_add_nomap_of_node(struct device_node
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
@@ -481,7 +481,7 @@ static inline struct irq_domain *irq_domain_add_tree_of_node(struct device_node
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
@@ -498,7 +498,7 @@ static inline struct irq_domain *irq_domain_add_linear_fwnode(struct fwnode_hand
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
@@ -513,7 +513,7 @@ static inline struct irq_domain *irq_domain_add_tree_fwnode(struct fwnode_handle
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
@@ -638,7 +638,7 @@ static inline struct irq_domain *irq_domain_add_hierarchy_fwnode(struct irq_doma
 		.domain_flags	= flags,
 		.parent		= parent,
 	};
-	struct irq_domain *d = irq_domain_instantiate(&info);
+	struct irq_domain *d = irq_domain_add(&info);
 
 	return IS_ERR(d) ? NULL : d;
 }
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
index eb16a58e0322..7c21b0c8a687 100644
--- a/kernel/irq/devres.c
+++ b/kernel/irq/devres.c
@@ -292,7 +292,7 @@ static void devm_irq_domain_remove(struct device *dev, void *res)
 }
 
 /**
- * devm_irq_domain_instantiate() - Instantiate a new irq domain data for a
+ * devm_irq_domain_add() - Instantiate a new irq domain data for a
  *                                 managed device.
  * @dev:	Device to instantiate the domain for
  * @info:	Domain information pointer pointing to the information for this
@@ -300,7 +300,7 @@ static void devm_irq_domain_remove(struct device *dev, void *res)
  *
  * Return: A pointer to the instantiated irq domain or an ERR_PTR value.
  */
-struct irq_domain *devm_irq_domain_instantiate(struct device *dev,
+struct irq_domain *devm_irq_domain_add(struct device *dev,
 					       const struct irq_domain_info *info)
 {
 	struct irq_domain *domain;
@@ -310,7 +310,7 @@ struct irq_domain *devm_irq_domain_instantiate(struct device *dev,
 	if (!dr)
 		return ERR_PTR(-ENOMEM);
 
-	domain = irq_domain_instantiate(info);
+	domain = irq_domain_add(info);
 	if (!IS_ERR(domain)) {
 		*dr = domain;
 		devres_add(dev, dr);
@@ -320,5 +320,5 @@ struct irq_domain *devm_irq_domain_instantiate(struct device *dev,
 
 	return domain;
 }
-EXPORT_SYMBOL_GPL(devm_irq_domain_instantiate);
+EXPORT_SYMBOL_GPL(devm_irq_domain_add);
 #endif /* CONFIG_IRQ_DOMAIN */
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 2d5f716887d9..ddacf9487d08 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -305,8 +305,8 @@ static void irq_domain_instantiate_descs(const struct irq_domain_info *info)
 	}
 }
 
-static struct irq_domain *__irq_domain_instantiate(const struct irq_domain_info *info,
-						   bool cond_alloc_descs, bool force_associate)
+static struct irq_domain *__irq_domain_add(const struct irq_domain_info *info,
+					   bool cond_alloc_descs, bool force_associate)
 {
 	struct irq_domain *domain;
 	int err;
@@ -363,16 +363,16 @@ static struct irq_domain *__irq_domain_instantiate(const struct irq_domain_info
 }
 
 /**
- * irq_domain_instantiate() - Instantiate a new irq domain data structure
+ * irq_domain_add() - Instantiate a new irq domain data structure
  * @info: Domain information pointer pointing to the information for this domain
  *
  * Return: A pointer to the instantiated irq domain or an ERR_PTR value.
  */
-struct irq_domain *irq_domain_instantiate(const struct irq_domain_info *info)
+struct irq_domain *irq_domain_add(const struct irq_domain_info *info)
 {
-	return __irq_domain_instantiate(info, false, false);
+	return __irq_domain_add(info, false, false);
 }
-EXPORT_SYMBOL_GPL(irq_domain_instantiate);
+EXPORT_SYMBOL_GPL(irq_domain_add);
 
 /**
  * irq_domain_remove() - Remove an irq domain.
@@ -474,7 +474,7 @@ struct irq_domain *irq_domain_add_simple_fwnode(struct fwnode_handle *fwnode,
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *domain = __irq_domain_instantiate(&info, true, false);
+	struct irq_domain *domain = __irq_domain_add(&info, true, false);
 
 	return IS_ERR(domain) ? NULL : domain;
 }
@@ -496,7 +496,7 @@ struct irq_domain *irq_domain_add_legacy_fwnode(struct fwnode_handle *fwnode,
 		.ops		= ops,
 		.host_data	= host_data,
 	};
-	struct irq_domain *domain = __irq_domain_instantiate(&info, false, true);
+	struct irq_domain *domain = __irq_domain_add(&info, false, true);
 
 	return IS_ERR(domain) ? NULL : domain;
 }
-- 
2.48.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ