public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqdomain: fix up const problem in irq_domain_set_name()
@ 2025-12-17 12:46 Greg Kroah-Hartman
  2025-12-18 23:44 ` [tip: irq/core] irqdomain: Fix " tip-bot2 for Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-12-17 12:46 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Greg Kroah-Hartman

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.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 6991ef58bc5f..b5dda11b9caf 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -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
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip: irq/core] irqdomain: Fix up const problem in irq_domain_set_name()
  2025-12-17 12:46 [PATCH] irqdomain: fix up const problem in irq_domain_set_name() Greg Kroah-Hartman
@ 2025-12-18 23:44 ` tip-bot2 for Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Greg Kroah-Hartman @ 2025-12-18 23:44 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Greg Kroah-Hartman, Thomas Gleixner, x86, linux-kernel, maz

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 <gregkh@linuxfoundation.org>
AuthorDate:    Wed, 17 Dec 2025 13:46:32 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/2025121731-facing-unhitched-63ae@gregkh
---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 2652c4c..094e891 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-18 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 12:46 [PATCH] irqdomain: fix up const problem in irq_domain_set_name() Greg Kroah-Hartman
2025-12-18 23:44 ` [tip: irq/core] irqdomain: Fix " tip-bot2 for Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox