Skip to contentSkip to conversation

irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack

PATCH Applied Inochi Amaoto 3 participants 3 messages Apr 22, 2025 – Apr 24, 2025 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack

The type cast in sg2044_msi_irq_ack lost __iomem attribute, which make the pointer type incorrect.

Add the miss "__iomem" attribute to fix it.

Fixes e96b93a97c90 ("irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller")
---
 drivers/irqchip/irq-sg2042-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-sg2042-msi.c +1 -1
index 8a83c690b760..a3e2a26d8495 100644
@@ -98,7 +98,7 @@ static void sg2044_msi_irq_ack(struct irq_data *d)
 {
 	struct sg204x_msi_chipdata *data = irq_data_get_irq_chip_data(d);
 
-	writel(0, (u32 *)data->reg_clr + d->hwirq);
+	writel(0, (u32 __iomem *)data->reg_clr + d->hwirq);
 	irq_chip_ack_parent(d);
 }
 

--
2.49.0

Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Inochi Amaoto

The type cast in sg2044_msi_irq_ack lost __iomem attribute, which make the pointer type incorrect.

Add the miss "__iomem" attribute to fix it.

Fixes e96b93a97c90 ("irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller")
---
  drivers/irqchip/irq-sg2042-msi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-sg2042-msi.c +1 -2
index 8a83c690b760..a3e2a26d8495 100644
@@ -98,7 +98,7 @@ static void sg2044_msi_irq_ack(struct irq_data *d)
  {
  	struct sg204x_msi_chipdata *data = irq_data_get_irq_chip_data(d);
 
-	writel(0, (u32 *)data->reg_clr + d->hwirq);
+	writel(0, (u32 __iomem *)data->reg_clr + d->hwirq);
  	irq_chip_ack_parent(d);
  }
 
--
Quoted 1 line

2.49.0

Thanks,

Chen

merge bot Applied
#2 lore raw

[tip: irq/drivers] irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack()

In reply to Inochi Amaoto
The following commit has been merged into the irq/drivers branch of tip:

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

Commit-ID:     76b66e8c9d159eb3d1699e0fa80ceacf9a9ae627
Gitweb:        https://git.kernel.org/tip/76b66e8c9d159eb3d1699e0fa80ceacf9a9ae627
Author:        Inochi Amaoto <[email protected]>
AuthorDate:    Tue, 22 Apr 2025 08:38:03 +08:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Thu, 24 Apr 2025 14:22:09 +02:00

irqchip/sg2042-msi: Fix wrong type cast in sg2044_msi_irq_ack()

The type cast in sg2044_msi_irq_ack() lost the __iomem attribute, which makes the pointer type incorrect.

Add it back.

---
 drivers/irqchip/irq-sg2042-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-sg2042-msi.c +1 -1
index 8a83c69..a3e2a26 100644
@@ -98,7 +98,7 @@ static void sg2044_msi_irq_ack(struct irq_data *d)
 {
 	struct sg204x_msi_chipdata *data = irq_data_get_irq_chip_data(d);
 
-	writel(0, (u32 *)data->reg_clr + d->hwirq);
+	writel(0, (u32 __iomem *)data->reg_clr + d->hwirq);
 	irq_chip_ack_parent(d);
 }