Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Manish Lachwani <mlachwani@mvista.com>
To: linux-mips@linux-mips.org
Cc: ralf@linux-mips.org
Subject: [PATCH] Cleanup for TX4927 code
Date: Wed, 24 Nov 2004 12:07:52 -0800	[thread overview]
Message-ID: <20041124200752.GA15973@prometheus.mvista.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi Ralf,

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

Thanks for the suggestions
Manish Lachwani


[-- Attachment #2: patch-tx4927-minor --]
[-- Type: text/plain, Size: 4692 bytes --]

--- 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);
 	}

             reply	other threads:[~2004-11-24 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 20:07 Manish Lachwani [this message]
2004-11-24 20:15 ` [PATCH] Cleanup for TX4927 code Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041124200752.GA15973@prometheus.mvista.com \
    --to=mlachwani@mvista.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox