[PATCH] powerpc/ipic: Remove unused ipic_set_priority()

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2799d

3 messages, 2 authors, 2018-12-06 · open the first message on its own page

[PATCH] powerpc/ipic: Remove unused ipic_set_priority()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-12-05 12:32:40

ipic_set_priority() has been unused since 2006 when the last usage was
removed in commit b9f0f1bb2bca ("[POWERPC] Adapt ipic driver to new
host_ops interface, add set_irq_type to set IRQ sense").

Reported-by: Dan Carpenter <redacted>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/sysdev/ipic.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 6300123ce965..8030a0f55e96 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -771,34 +771,6 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
 	return ipic;
 }
 
-int ipic_set_priority(unsigned int virq, unsigned int priority)
-{
-	struct ipic *ipic = ipic_from_irq(virq);
-	unsigned int src = virq_to_hw(virq);
-	u32 temp;
-
-	if (priority > 7)
-		return -EINVAL;
-	if (src > 127)
-		return -EINVAL;
-	if (ipic_info[src].prio == 0)
-		return -EINVAL;
-
-	temp = ipic_read(ipic->regs, ipic_info[src].prio);
-
-	if (priority < 4) {
-		temp &= ~(0x7 << (20 + (3 - priority) * 3));
-		temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3);
-	} else {
-		temp &= ~(0x7 << (4 + (7 - priority) * 3));
-		temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3);
-	}
-
-	ipic_write(ipic->regs, ipic_info[src].prio, temp);
-
-	return 0;
-}
-
 void ipic_set_highest_priority(unsigned int virq)
 {
 	struct ipic *ipic = ipic_from_irq(virq);
-- 
2.17.2

Re: [PATCH] powerpc/ipic: Remove unused ipic_set_priority()

From: Thiago Jung Bauermann <hidden>
Date: 2018-12-05 19:01:26

Michael Ellerman [off-list ref] writes:
ipic_set_priority() has been unused since 2006 when the last usage was
removed in commit b9f0f1bb2bca ("[POWERPC] Adapt ipic driver to new
host_ops interface, add set_irq_type to set IRQ sense").

Reported-by: Dan Carpenter <redacted>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/sysdev/ipic.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
There's also the function prototype in <asm/ipic.h>

-- 
Thiago Jung Bauermann
IBM Linux Technology Center

Re: [PATCH] powerpc/ipic: Remove unused ipic_set_priority()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-12-06 07:03:17

Thiago Jung Bauermann [off-list ref] writes:
Michael Ellerman [off-list ref] writes:
quoted
ipic_set_priority() has been unused since 2006 when the last usage was
removed in commit b9f0f1bb2bca ("[POWERPC] Adapt ipic driver to new
host_ops interface, add set_irq_type to set IRQ sense").

Reported-by: Dan Carpenter <redacted>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/sysdev/ipic.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
There's also the function prototype in <asm/ipic.h>
Thanks.

I knew that but forgot about it before committing because my brain is
like a sieve :)

Will send a v2.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help