From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Tue, 21 Dec 2010 16:26:20 +0300 Subject: [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled In-Reply-To: <1292936565-24677-1-git-send-email-monstr@monstr.eu> References: <1292936565-24677-1-git-send-email-monstr@monstr.eu> Message-ID: <4D10AAFC.3060308@mvista.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello. On 21-12-2010 16:02, Michal Simek wrote: > Microblaze implement enable/disable interrupts through MSR > that's why disable_interrupts function should return 1 when interrupt > was enabled. Return 0 when interrupt was disabled. > Signed-off-by: John Linn > Signed-off-by: Michal Simek [...] > diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c > index e9d53c1..054e09f 100644 > --- a/arch/microblaze/cpu/interrupts.c > +++ b/arch/microblaze/cpu/interrupts.c > @@ -41,8 +41,10 @@ void enable_interrupts (void) > > int disable_interrupts (void) > { > + unsigned int msr; Empty line wouldn't hurt here... > + MFS(msr, rmsr); > MSRCLR(0x2); > - return 0; > + return ((msr & 0x2) != 0); External pair of () not needed. WBR, Sergei