LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Laurent Lagrange" <lagrange@fr.oleane.com>
To: <linuxppc-embedded@ozlabs.org>
Subject: RE: Minor bug in file irq.h
Date: Wed, 1 Mar 2006 12:21:53 +0100	[thread overview]
Message-ID: <000901c63d22$58de3da0$5201a8c0@GEG2400> (raw)
In-Reply-To: <0B99478F-EAB3-4070-AA8E-81418BF4BFBE@kernel.crashing.org>

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

Hello,

Here is a patch for the 2 bugs in irq.h.

This is the first time, I generate a patch.
I don't know if this is the right method.

Best regards
Laurent

>
> In the ./linux/include/asm-ppc/irq.h file, I encountered a problem with
the
> timer3 interrupt definition :
> #define     SIU_INT_TIMER3          ((uint)0x0e+CPM_IRQ_OFFSET)
>
> This definition generates a compilation error  because is interpreted as

Note that this is not the only such definition. At least this one  is
critical, too:

	#define SIU_INT_PC1             ((uint)0x3e+CPM_IRQ_OFFSET)

Best regards,

Wolfgang Denk

> -----Message d'origine-----
> De : Kumar Gala [mailto:galak@kernel.crashing.org]
> Envoye : mar. 28 fevrier 2006 15:38
> A : Laurent Lagrange
> Cc : linuxppc-embedded@ozlabs.org
> Objet : Re: Minor bug in file irq.h
>
>
>
> On Feb 28, 2006, at 2:50 AM, Laurent Lagrange wrote:
>
> >
> > Hello,
> >
> > I use a Linux 2.6.9 on MPC85xx.
> >
> > In the ./linux/include/asm-ppc/irq.h file, I encountered a problem
> > with the
> > timer3 interrupt definition :
> > #define     SIU_INT_TIMER3          ((uint)0x0e+CPM_IRQ_OFFSET)
> >
> > This definition generates a compilation error  because is
> > interpreted as
> > something like
> > ((uint)0x0(e+CPM_IRQ_OFFSET)) ie 0x0 exponent  + CPM_IRQ_OFFSET.
> >
> > To work around just parenthesis or add a space character between
> > 'e' and '+'
> > #define     SIU_INT_TIMER3          ((uint)0x0e +CPM_IRQ_OFFSET)
>
> Do you mind providing this in patch form with a signed-off-by.  I'll
> include it in the queue of 85xx related patches.
>
> - kumar
>
>

[-- Attachment #2: irq.patch --]
[-- Type: application/octet-stream, Size: 1155 bytes --]

--- include/asm-ppc/irq.h.ini	2005-10-05 11:16:51.000000000 +0200
+++ include/asm-ppc/irq.h	2006-03-01 11:48:09.862587552 +0100
@@ -1,3 +1,8 @@
+/*
+ * Fix erroneous syntax 2006/03/01
+ * Replace e+CPM_IRQ_OFFSET by e +CPM_IRQ_OFFSET
+ * Laurent Lagrange [lagrange@fr.oleane.com]
+ */
 #ifdef __KERNEL__
 #ifndef _ASM_IRQ_H
 #define _ASM_IRQ_H
@@ -205,7 +210,7 @@
 #define	SIU_INT_SMC2		((uint)0x05+CPM_IRQ_OFFSET)
 #define	SIU_INT_TIMER1		((uint)0x0c+CPM_IRQ_OFFSET)
 #define	SIU_INT_TIMER2		((uint)0x0d+CPM_IRQ_OFFSET)
-#define	SIU_INT_TIMER3		((uint)0x0e+CPM_IRQ_OFFSET)
+#define	SIU_INT_TIMER3		((uint)0x0e +CPM_IRQ_OFFSET)
 #define	SIU_INT_TIMER4		((uint)0x0f+CPM_IRQ_OFFSET)
 #define	SIU_INT_FCC1		((uint)0x20+CPM_IRQ_OFFSET)
 #define	SIU_INT_FCC2		((uint)0x21+CPM_IRQ_OFFSET)
@@ -230,7 +235,7 @@
 #define	SIU_INT_PC4		((uint)0x3b+CPM_IRQ_OFFSET)
 #define	SIU_INT_PC3		((uint)0x3c+CPM_IRQ_OFFSET)
 #define	SIU_INT_PC2		((uint)0x3d+CPM_IRQ_OFFSET)
-#define	SIU_INT_PC1		((uint)0x3e+CPM_IRQ_OFFSET)
+#define	SIU_INT_PC1		((uint)0x3e +CPM_IRQ_OFFSET)
 #define	SIU_INT_PC0		((uint)0x3f+CPM_IRQ_OFFSET)
 
 static __inline__ int irq_canonicalize(int irq)

  reply	other threads:[~2006-03-01 11:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-28  8:50 Minor bug in file irq.h Laurent Lagrange
2006-02-28 14:38 ` Kumar Gala
2006-03-01 11:21   ` Laurent Lagrange [this message]
2006-02-28 20:58 ` Wolfgang Denk
2006-03-08 14:32 ` Stable Linux kernel 2.6 for MPC8XX Laurent Lagrange
2006-04-07  8:16   ` RTC/I2C on 82xx with Linux 2.6.x Laurent Lagrange
2006-04-07  8:57     ` Claus Gindhart
2006-04-07 15:17       ` Mark A. Greer

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='000901c63d22$58de3da0$5201a8c0@GEG2400' \
    --to=lagrange@fr.oleane.com \
    --cc=linuxppc-embedded@ozlabs.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