Re: [PATCH v2 0/3] MIPS: JZ4740: Move PWM driver to PWM framework

From: Thierry Reding
Date: Sun Sep 23 2012 - 13:13:33 EST


On Sun, Sep 23, 2012 at 03:56:35PM +0200, Ralf Baechle wrote:
> On Sat, Sep 22, 2012 at 09:41:45AM +0200, Thierry Reding wrote:
>
> > Have you had a chance to look at this? It is the last remaining PWM
> > driver that isn't moved to the PWM framework yet. All the others are
> > either in linux-next already and queued for 3.7 or have recently got
> > Acked-by the respective maintainers (Unicore32). Patches 2 and 3 were
> > already acked and tested by Lars-Peter who did the initial porting.
> > Patch 1 can probably be dropped since I seem to be the only one running
> > into that issue.
> >
> > I really want to take this in for 3.7 so I can use the 3.7 cycle to
> > transition from the legacy API to the new API and possibly even get rid
> > of the legacy parts altogether. However I don't want to do this without
> > the Acked-by from the MIPS maintainer.
>
> Acked-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
>
> for 2/3 and 3/3.

Alright, thanks. I'll take those through the PWM tree.

> I now can reproduce the build error that 1/3 is supposed to fix. The issue
> is not as first suspected an odd bug in just your compiler. The tree
> (I was testing on today's -next) is building fine when compiling in-tree
> but fails out of tree:

Okay, that makes sense. I rarely if even build in-tree nowadays.

> CC arch/mips/jz4740/irq.o
> In file included from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/irq.h:18:0,
> from /home/ralf/src/linux/linux-jz4740/include/linux/irq.h:27,
> from /home/ralf/src/linux/linux-jz4740/include/asm-generic/hardirq.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/hardirq.h:16,
> from /home/ralf/src/linux/linux-jz4740/include/linux/hardirq.h:7,
> from /home/ralf/src/linux/linux-jz4740/include/linux/interrupt.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:19:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.h:20:39: error: âstruct irq_dataâ declared inside parameter list [-Werror]
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.h:20:39: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.h:21:38: error: âstruct irq_dataâ declared inside parameter list [-Werror]
> In file included from /home/ralf/src/linux/linux-jz4740/include/linux/irq.h:356:0,
> from /home/ralf/src/linux/linux-jz4740/include/asm-generic/hardirq.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/hardirq.h:16,
> from /home/ralf/src/linux/linux-jz4740/include/linux/hardirq.h:7,
> from /home/ralf/src/linux/linux-jz4740/include/linux/interrupt.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:19:
> /home/ralf/src/linux/linux-jz4740/include/linux/irqdesc.h:73:33: error: âNR_IRQSâ undeclared here (not in a function)
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c: In function âjz4740_cascadeâ:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:49:39: error: âJZ4740_IRQ_BASEâ undeclared (first use in this function)
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:49:39: note: each undeclared identifier is reported only once for each function it appears in
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c: At top level:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:62:6: error: conflicting types for âjz4740_irq_suspendâ
> In file included from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/irq.h:18:0,
> from /home/ralf/src/linux/linux-jz4740/include/linux/irq.h:27,
> from /home/ralf/src/linux/linux-jz4740/include/asm-generic/hardirq.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/hardirq.h:16,
> from /home/ralf/src/linux/linux-jz4740/include/linux/hardirq.h:7,
> from /home/ralf/src/linux/linux-jz4740/include/linux/interrupt.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:19:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.h:20:13: note: previous declaration of âjz4740_irq_suspendâ was here
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:68:6: error: conflicting types for âjz4740_irq_resumeâ
> In file included from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/irq.h:18:0,
> from /home/ralf/src/linux/linux-jz4740/include/linux/irq.h:27,
> from /home/ralf/src/linux/linux-jz4740/include/asm-generic/hardirq.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/include/asm/hardirq.h:16,
> from /home/ralf/src/linux/linux-jz4740/include/linux/hardirq.h:7,
> from /home/ralf/src/linux/linux-jz4740/include/linux/interrupt.h:12,
> from /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:19:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.h:21:13: note: previous declaration of âjz4740_irq_resumeâ was here
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c: In function âarch_init_irqâ:
> /home/ralf/src/linux/linux-jz4740/arch/mips/jz4740/irq.c:91:41: error: âJZ4740_IRQ_BASEâ undeclared (first use in this function)
>
> Which (while your patch is probably fine, I haven't tested) this seems to
> be a build system issue, so should be preferably be fixed there.
>
> Marek, the whole email exchange is archived at
> http://www.linux-mips.org/archives/linux-mips/2012-09/threads.html

Okay. I think I mentioned in the commit message for patch 1 that the
include order seems to cause this. Maybe it's just a matter of
rearranging those.

Thierry

Attachment: pgp00000.pgp
Description: PGP signature