RE: [renesas-drivers:topic/pinctrl-rza2-v2 1/2] drivers//pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here (not in a function); did you mean 'RZA2_NPINS'?

2018-11-07 Thread Chris Brandt
Hi Geert,

> > Great, so MIPS defines PC, precluding it use in any driver that includes
> >  in some way.

That really stinks!!!


> Anyway, drivers//pinctrl/pinctrl-rza2.c doesn't really use the enum
> values it defines,
> so they can be renamed (PC -> PORTC, or PORT_C).

Of course that means I have to go back and change everything to PORTx.

:(

Damn you MIPS!

Chris


On Wednesday, November 07, 2018, Geert Uytterhoeven wrote:
> On Wed, Nov 7, 2018 at 10:22 AM Geert Uytterhoeven 
> wrote:
> > On Wed, Nov 7, 2018 at 10:12 AM kbuild test robot  wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-
> drivers.git topic/pinctrl-rza2-v2
> > > head:   bb0f488fb2907f47250f7f34af60a482fd3dbfe4
> > > commit: feac9e8cb1ad7b4979e4b553fcdf2d8582049227 [1/2] pinctrl: Add
> RZ/A2 pin and gpio controller
> > > config: mips-allmodconfig (attached as .config)
> > > compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> > > reproduce:
> > > wget https://raw.githubusercontent.com/intel/lkp-
> tests/master/sbin/make.cross -O ~/bin/make.cross
> > > chmod +x ~/bin/make.cross
> > > git checkout feac9e8cb1ad7b4979e4b553fcdf2d8582049227
> > > # save the attached .config to linux build tree
> > > GCC_VERSION=7.2.0 make.cross ARCH=mips
> > >
> > > All error/warnings (new ones prefixed by >>):
> > >
> > >In file included from arch/mips/include/asm/ptrace.h:19:0,
> > > from include/linux/irq.h:24,
> > > from include/linux/gpio/driver.h:7,
> > > from include/asm-generic/gpio.h:13,
> > > from include/linux/gpio.h:62,
> > > from drivers//pinctrl/pinctrl-rza2.c:14:
> > > >> arch/mips/include/uapi/asm/ptrace.h:17:13: error: expected
> identifier before numeric constant
> > > #define PC  64
> > > ^
> >
> > Great, so MIPS defines PC, precluding it use in any driver that includes
> >  in some way.
> >
> > However, it looks like  doesn't really need
> .
> > Will send a patch to try that...
> 
> Doesn't work, as it also includes , which is needed.
> 
> Anyway, drivers//pinctrl/pinctrl-rza2.c doesn't really use the enum
> values it defines,
> so they can be renamed (PC -> PORTC, or PORT_C).
> 
> Gr{oetje,eeting}s,
> 
> Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> In personal conversations with technical people, I call myself a hacker.
> But
> when I'm talking to journalists I just say "programmer" or something like
> that.
> -- Linus Torvalds


Re: [renesas-drivers:topic/pinctrl-rza2-v2 1/2] drivers//pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here (not in a function); did you mean 'RZA2_NPINS'?

2018-11-07 Thread Geert Uytterhoeven
On Wed, Nov 7, 2018 at 10:22 AM Geert Uytterhoeven  wrote:
> On Wed, Nov 7, 2018 at 10:12 AM kbuild test robot  wrote:
> > tree:   
> > https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git 
> > topic/pinctrl-rza2-v2
> > head:   bb0f488fb2907f47250f7f34af60a482fd3dbfe4
> > commit: feac9e8cb1ad7b4979e4b553fcdf2d8582049227 [1/2] pinctrl: Add RZ/A2 
> > pin and gpio controller
> > config: mips-allmodconfig (attached as .config)
> > compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> > reproduce:
> > wget 
> > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> > ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > git checkout feac9e8cb1ad7b4979e4b553fcdf2d8582049227
> > # save the attached .config to linux build tree
> > GCC_VERSION=7.2.0 make.cross ARCH=mips
> >
> > All error/warnings (new ones prefixed by >>):
> >
> >In file included from arch/mips/include/asm/ptrace.h:19:0,
> > from include/linux/irq.h:24,
> > from include/linux/gpio/driver.h:7,
> > from include/asm-generic/gpio.h:13,
> > from include/linux/gpio.h:62,
> > from drivers//pinctrl/pinctrl-rza2.c:14:
> > >> arch/mips/include/uapi/asm/ptrace.h:17:13: error: expected identifier 
> > >> before numeric constant
> > #define PC  64
> > ^
>
> Great, so MIPS defines PC, precluding it use in any driver that includes
>  in some way.
>
> However, it looks like  doesn't really need 
> .
> Will send a patch to try that...

Doesn't work, as it also includes , which is needed.

Anyway, drivers//pinctrl/pinctrl-rza2.c doesn't really use the enum
values it defines,
so they can be renamed (PC -> PORTC, or PORT_C).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [renesas-drivers:topic/pinctrl-rza2-v2 1/2] drivers//pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here (not in a function); did you mean 'RZA2_NPINS'?

2018-11-07 Thread Geert Uytterhoeven
On Wed, Nov 7, 2018 at 10:12 AM kbuild test robot  wrote:
> tree:   
> https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git 
> topic/pinctrl-rza2-v2
> head:   bb0f488fb2907f47250f7f34af60a482fd3dbfe4
> commit: feac9e8cb1ad7b4979e4b553fcdf2d8582049227 [1/2] pinctrl: Add RZ/A2 pin 
> and gpio controller
> config: mips-allmodconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
> wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout feac9e8cb1ad7b4979e4b553fcdf2d8582049227
> # save the attached .config to linux build tree
> GCC_VERSION=7.2.0 make.cross ARCH=mips
>
> All error/warnings (new ones prefixed by >>):
>
>In file included from arch/mips/include/asm/ptrace.h:19:0,
> from include/linux/irq.h:24,
> from include/linux/gpio/driver.h:7,
> from include/asm-generic/gpio.h:13,
> from include/linux/gpio.h:62,
> from drivers//pinctrl/pinctrl-rza2.c:14:
> >> arch/mips/include/uapi/asm/ptrace.h:17:13: error: expected identifier 
> >> before numeric constant
> #define PC  64
> ^

Great, so MIPS defines PC, precluding it use in any driver that includes
 in some way.

However, it looks like  doesn't really need .
Will send a patch to try that...

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[renesas-drivers:topic/pinctrl-rza2-v2 1/2] drivers//pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here (not in a function); did you mean 'RZA2_NPINS'?

2018-11-07 Thread kbuild test robot
tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git 
topic/pinctrl-rza2-v2
head:   bb0f488fb2907f47250f7f34af60a482fd3dbfe4
commit: feac9e8cb1ad7b4979e4b553fcdf2d8582049227 [1/2] pinctrl: Add RZ/A2 pin 
and gpio controller
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout feac9e8cb1ad7b4979e4b553fcdf2d8582049227
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=mips 

All error/warnings (new ones prefixed by >>):

   In file included from arch/mips/include/asm/ptrace.h:19:0,
from include/linux/irq.h:24,
from include/linux/gpio/driver.h:7,
from include/asm-generic/gpio.h:13,
from include/linux/gpio.h:62,
from drivers//pinctrl/pinctrl-rza2.c:14:
>> arch/mips/include/uapi/asm/ptrace.h:17:13: error: expected identifier before 
>> numeric constant
#define PC  64
^
>> drivers//pinctrl/pinctrl-rza2.c:38:73: note: in expansion of macro 'PC'
enum pfc_pin_port_name {P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, PA, PB, PC, 
PD,
^~
>> drivers//pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here 
>> (not in a function); did you mean 'RZA2_NPINS'?
#define RZA2_NPINS  (RZA2_PINS_PER_PORT * RZA2_NPORTS)
  ^
>> drivers//pinctrl/pinctrl-rza2.c:230:11: note: in expansion of macro 
>> 'RZA2_NPINS'
 .ngpio = RZA2_NPINS,
  ^~
--
   In file included from arch/mips/include/asm/ptrace.h:19:0,
from include/linux/irq.h:24,
from include/linux/gpio/driver.h:7,
from include/asm-generic/gpio.h:13,
from include/linux/gpio.h:62,
from drivers/pinctrl/pinctrl-rza2.c:14:
>> arch/mips/include/uapi/asm/ptrace.h:17:13: error: expected identifier before 
>> numeric constant
#define PC  64
^
   drivers/pinctrl/pinctrl-rza2.c:38:73: note: in expansion of macro 'PC'
enum pfc_pin_port_name {P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, PA, PB, PC, 
PD,
^~
   drivers/pinctrl/pinctrl-rza2.c:25:43: error: 'RZA2_NPORTS' undeclared here 
(not in a function); did you mean 'RZA2_NPINS'?
#define RZA2_NPINS  (RZA2_PINS_PER_PORT * RZA2_NPORTS)
  ^
   drivers/pinctrl/pinctrl-rza2.c:230:11: note: in expansion of macro 
'RZA2_NPINS'
 .ngpio = RZA2_NPINS,
  ^~

vim +25 drivers//pinctrl/pinctrl-rza2.c

  > 14  #include 
15  #include 
16  #include 
17  #include 
18  
19  #include "core.h"
20  #include "pinmux.h"
21  
22  #define DRIVER_NAME "pinctrl-rza2"
23  
24  #define RZA2_PINS_PER_PORT  8
  > 25  #define RZA2_NPINS  (RZA2_PINS_PER_PORT * RZA2_NPORTS)
26  #define RZA2_PIN_ID_TO_PORT(id) ((id) / RZA2_PINS_PER_PORT)
27  #define RZA2_PIN_ID_TO_PIN(id)  ((id) % RZA2_PINS_PER_PORT)
28  
29  /*
30   * Use 16 lower bits [15:0] for pin identifier
31   * Use 16 higher bits [31:16] for pin mux function
32   */
33  #define MUX_PIN_ID_MASK GENMASK(15, 0)
34  #define MUX_FUNC_MASK   GENMASK(31, 16)
35  #define MUX_FUNC_OFFS   16
36  #define MUX_FUNC(pinconf)   ((pinconf & MUX_FUNC_MASK) >> 
MUX_FUNC_OFFS)
37  
  > 38  enum pfc_pin_port_name {P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, PA, PB, 
PC, PD,
39  PE, PF, PG, PH, PJ, PK, PL, PM, RZA2_NPORTS};
40  static const char port_names[] = "0123456789ABCDEFGHJKLM";
41  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip