[PATCH] Cleanup for TX4927 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ralf,

Attached patch does cleanup for the IRQ code for TX4927. Please review and/or
apply ;)

Thanks for the suggestions
Manish Lachwani

--- arch/mips/tx4927/common/tx4927_irq.c.orig	2004-11-24 09:40:22.000000000 -0800
+++ arch/mips/tx4927/common/tx4927_irq.c	2004-11-24 12:03:38.000000000 -0800
@@ -48,8 +48,6 @@
 /*
  * DEBUG
  */
-#define TX4927_IRQ_CHECK_CP0
-#define TX4927_IRQ_CHECK_PIC
 
 #undef TX4927_IRQ_DEBUG
 
@@ -239,16 +237,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_STARTUP, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_cp0_enable(irq);
 
 	return (0);
@@ -258,16 +246,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_SHUTDOWN, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_cp0_disable(irq);
 
 	return;
@@ -279,16 +257,6 @@
 
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_ENABLE, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	spin_lock_irqsave(&tx4927_cp0_lock, flags);
 
 	tx4927_irq_cp0_modify(CCP0_STATUS, 0, tx4927_irq_cp0_mask(irq));
@@ -304,16 +272,6 @@
 
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_DISABLE, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	spin_lock_irqsave(&tx4927_cp0_lock, flags);
 
 	tx4927_irq_cp0_modify(CCP0_STATUS, tx4927_irq_cp0_mask(irq), 0);
@@ -327,16 +285,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_MASK, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_cp0_disable(irq);
 
 	return;
@@ -346,16 +294,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_CP0_ENDIRQ, "irq=%d \n", irq);
 
-#ifdef TX4927_IRQ_CHECK_CP0
-	{
-		if (irq < TX4927_IRQ_CP0_BEG || irq > TX4927_IRQ_CP0_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 		tx4927_irq_cp0_enable(irq);
 	}
@@ -516,16 +454,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_STARTUP, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_pic_enable(irq);
 
 	return (0);
@@ -535,16 +463,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_SHUTDOWN, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_pic_disable(irq);
 
 	return;
@@ -556,16 +474,6 @@
 
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_ENABLE, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	spin_lock_irqsave(&tx4927_pic_lock, flags);
 
 	tx4927_irq_pic_modify(tx4927_irq_pic_addr(irq), 0,
@@ -582,16 +490,6 @@
 
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_DISABLE, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	spin_lock_irqsave(&tx4927_pic_lock, flags);
 
 	tx4927_irq_pic_modify(tx4927_irq_pic_addr(irq),
@@ -606,16 +504,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_MASK, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	tx4927_irq_pic_disable(irq);
 
 	return;
@@ -625,16 +513,6 @@
 {
 	TX4927_IRQ_DPRINTK(TX4927_IRQ_PIC_ENDIRQ, "irq=%d\n", irq);
 
-#ifdef TX4927_IRQ_CHECK_PIC
-	{
-		if (irq < TX4927_IRQ_PIC_BEG || irq > TX4927_IRQ_PIC_END) {
-			TX4927_IRQ_DPRINTK(TX4927_IRQ_EROR,
-					   "bad irq=%d \n", irq);
-			panic("\n");
-		}
-	}
-#endif
-
 	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 		tx4927_irq_pic_enable(irq);
 	}

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux