Skip to contentSkip to conversation

linux-next: build failure after merge of the spi tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Jan 30, 2015 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Mark,

After merging the spi tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/spi/spi-xilinx.c: In function 'xilinx_spi_probe':
drivers/spi/spi-xilinx.c:391:16: warning: assignment from incompatible pointer type

  xspi->read_fn = ioread32;
                ^
drivers/spi/spi-xilinx.c:392:17: warning: assignment from incompatible pointer type
  xspi->write_fn = iowrite32;
                 ^
drivers/spi/spi-xilinx.c:398:19: error: 'ioread32be' undeclared (first use in this function)
   xspi->read_fn = ioread32be;
                   ^
drivers/spi/spi-xilinx.c:398:19: note: each undeclared identifier is reported only once for each function it appears in
drivers/spi/spi-xilinx.c:399:20: error: 'iowrite32be' undeclared (first use in this function)
   xspi->write_fn = iowrite32be;
                    ^

Caused by commit 99082eab6344 ("spi/xilinx: Remove iowrite/ioread wrappers"). Its not obvious why this is so, but reverting that commit fixed the build problem.

I have reverted that commit for today.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw

Hello Stephen

The root of the issue is that iowrite/ioread behaves differently in different arches.

1) It does not necesary need to be a symbol in all the arches. It can be declared as a function macro:

#define iowrite32(a,b) iowrite32(a,b)

2) Sometimes, even the function has a different prototype.

include/asm-generic/iomap.h
extern unsigned int ioread16be(void __iomem *);

include/asm-generic/io.h
extern unsigned int ioread16be(void __iomem *);

Since the patch that you have reverted was only to clean the code it is perfectly fine to revert it.

Sorry for the mess, I did only tried to build it on the platforms that I had available and I could have never guess that iowrite32 was implemented differently on other arches.

Thanks!

Quoted 29 lines · Stephen Rothwell

Hi Mark,

After merging the spi tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/spi/spi-xilinx.c: In function 'xilinx_spi_probe':
drivers/spi/spi-xilinx.c:391:16: warning: assignment from incompatible pointer type

  xspi->read_fn = ioread32;
                ^
drivers/spi/spi-xilinx.c:392:17: warning: assignment from incompatible pointer type
  xspi->write_fn = iowrite32;
                 ^
drivers/spi/spi-xilinx.c:398:19: error: 'ioread32be' undeclared (first use in this function)
   xspi->read_fn = ioread32be;
                   ^
drivers/spi/spi-xilinx.c:398:19: note: each undeclared identifier is reported only once for each function it appears in
drivers/spi/spi-xilinx.c:399:20: error: 'iowrite32be' undeclared (first use in this function)
   xspi->write_fn = iowrite32be;
                    ^

Caused by commit 99082eab6344 ("spi/xilinx: Remove iowrite/ioread wrappers"). Its not obvious why this is so, but reverting that commit fixed the build problem.

I have reverted that commit for today.

--
Cheers,
Stephen Rothwell [email protected]

Signature · 1 line
Ricardo Ribalda