linux-mips
[Top] [All Lists]

arch/mips/au1000/common/irq.c

To: Pete Popov <ppopov@mvista.com>
Subject: arch/mips/au1000/common/irq.c
From: Jeff Baitis <baitisj@evolution.com>
Date: Thu, 13 Mar 2003 10:47:04 -0800
Cc: linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: baitisj@evolution.com
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5i
Pete:

I've got a question concerning irq.c. In intc0_req0_irqdispatch() (linux_2_4
branch) on lines 545 thru 552, the code reads:

      for (i=0; i<32; i++) {
          if ((intc0_req0 & (1<<i))) {
              intc0_req0 &= ~(1<<i);
              do_IRQ(irq, regs);
              break;
          }
          irq++;
      }

My question is: why do we increment i and irq independently?
Why doesn't the code read:

      for (i=0; i<32; i++) {
          if ((intc0_req0 & (1<<i))) {
              intc0_req0 &= ~(1<<i);
              do_IRQ(i, regs);
              break;
          }
      }

Thanks for your help!

-Jeff





-- 
         Jeffrey Baitis - Associate Software Engineer

                    Evolution Robotics, Inc.
                     130 West Union Street
                       Pasadena CA 91103

 tel: 626.535.2776  |  fax: 626.535.2777  |  baitisj@evolution.com 


<Prev in Thread] Current Thread [Next in Thread>