Skip to content

Commit 25aae56

Browse files
Jiang Liuralfbaechle
authored andcommitted
MIPS, IRQ: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by: Jiang Liu <[email protected]> Acked-by: Sergey Ryazanov <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Aleksey Makarov <[email protected]> Cc: David Daney <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: John Crispin <[email protected]> Cc: Andrew Bresticker <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Tony Luck <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/10086/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 2e93f68 commit 25aae56

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

arch/mips/ath25/ar2315.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc)
7676
unsigned nr, misc_irq = 0;
7777

7878
if (pending) {
79-
struct irq_domain *domain = irq_get_handler_data(irq);
79+
struct irq_domain *domain = irq_desc_get_handler_data(desc);
8080

8181
nr = __ffs(pending);
8282
misc_irq = irq_find_mapping(domain, nr);

arch/mips/ath25/ar5312.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc)
8080
unsigned nr, misc_irq = 0;
8181

8282
if (pending) {
83-
struct irq_domain *domain = irq_get_handler_data(irq);
83+
struct irq_domain *domain = irq_desc_get_handler_data(desc);
8484

8585
nr = __ffs(pending);
8686
misc_irq = irq_find_mapping(domain, nr);

arch/mips/cavium-octeon/octeon-irq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,9 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
698698

699699
static void octeon_irq_handle_trigger(unsigned int irq, struct irq_desc *desc)
700700
{
701-
if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
701+
struct irq_data *data = irq_desc_get_irq_data(desc);
702+
703+
if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH)
702704
handle_edge_irq(irq, desc);
703705
else
704706
handle_level_irq(irq, desc);

arch/mips/pci/pci-ar2315.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static int ar2315_pci_host_setup(struct ar2315_pci_ctrl *apc)
320320

321321
static void ar2315_pci_irq_handler(unsigned irq, struct irq_desc *desc)
322322
{
323-
struct ar2315_pci_ctrl *apc = irq_get_handler_data(irq);
323+
struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc);
324324
u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) &
325325
ar2315_pci_reg_read(apc, AR2315_PCI_IMR);
326326
unsigned pci_irq = 0;

arch/mips/pci/pci-ar71xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
232232
void __iomem *base = ath79_reset_base;
233233
u32 pending;
234234

235-
apc = irq_get_handler_data(irq);
235+
apc = irq_desc_get_handler_data(desc);
236236

237237
pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
238238
__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);

arch/mips/pci/pci-ar724x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
231231
void __iomem *base;
232232
u32 pending;
233233

234-
apc = irq_get_handler_data(irq);
234+
apc = irq_desc_get_handler_data(desc);
235235
base = apc->ctrl_base;
236236

237237
pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &

arch/mips/pci/pci-rt3883.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
134134
struct rt3883_pci_controller *rpc;
135135
u32 pending;
136136

137-
rpc = irq_get_handler_data(irq);
137+
rpc = irq_desc_get_handler_data(desc);
138138

139139
pending = rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIINT) &
140140
rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIENA);

arch/mips/ralink/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc)
100100
u32 pending = rt_intc_r32(INTC_REG_STATUS0);
101101

102102
if (pending) {
103-
struct irq_domain *domain = irq_get_handler_data(irq);
103+
struct irq_domain *domain = irq_desc_get_handler_data(desc);
104104
generic_handle_irq(irq_find_mapping(domain, __ffs(pending)));
105105
} else {
106106
spurious_interrupt();

0 commit comments

Comments
 (0)