Skip to contentSkip to conversation

irqdomain: fix up const problem in irq_domain_set_name()

PATCH Applied Greg Kroah-Hartman 2 participants 2 messages Dec 17, 2025 – Dec 18, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqdomain: fix up const problem in irq_domain_set_name()

In irq_domain_set_name() a const pointer is passed in, and then the const is "lost" when container_of() is called. Fix this up by properly preserving the const pointer attribute when container_of() is used to enforce the fact that this pointer should not have anything at it changed.

---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/irqdomain.c +1 -1
index 6991ef58bc5f..b5dda11b9caf 100644
@@ -187,7 +187,7 @@ static int irq_domain_set_name(struct irq_domain *domain, const struct irq_domai
 	const struct fwnode_handle *fwnode = info->fwnode;
 
 	if (is_fwnode_irqchip(fwnode)) {
-		struct irqchip_fwid *fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+		const struct irqchip_fwid *fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
 
 		/*
 		 * The name_suffix is only intended to be used to avoid a name
Signature · 1 line
2.52.0
#1 lore raw

[tip: irq/core] irqdomain: Fix up const problem in irq_domain_set_name()

The following commit has been merged into the irq/core branch of tip:

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     90876d9b37a0db170d5998c6c903eab2d56fd7cb
Gitweb:        https://git.kernel.org/tip/90876d9b37a0db170d5998c6c903eab2d56fd7cb
Author:        Greg Kroah-Hartman <[email protected]>
AuthorDate:    Wed, 17 Dec 2025 13:46:32 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Fri, 19 Dec 2025 00:39:39 +01:00

irqdomain: Fix up const problem in irq_domain_set_name()

In irq_domain_set_name() a const pointer is passed in, and then the const is "lost" when container_of() is called. Fix this up by properly preserving the const pointer attribute when container_of() is used to enforce the fact that this pointer should not have anything at it changed.

---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/irqdomain.c +1 -1
index 2652c4c..094e891 100644
@@ -187,7 +187,7 @@ static int irq_domain_set_name(struct irq_domain *domain, const struct irq_domai
 	const struct fwnode_handle *fwnode = info->fwnode;
 
 	if (is_fwnode_irqchip(fwnode)) {
-		struct irqchip_fwid *fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+		const struct irqchip_fwid *fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
 
 		/*
 		 * The name_suffix is only intended to be used to avoid a name