ppc64: BPA iommu fails to build (BUILD_BUG_ON)

Alexey Dobriyan adobriyan at gmail.com
Sat Sep 17 18:10:07 EST 2005


After a patch to make BUILD_BUG_ON error at compile-time went in
2.6.14-git1, arch/ppc64/kernel/bpa_iommu.c fails to build:

  CC      arch/ppc64/kernel/bpa_iommu.o
arch/ppc64/kernel/bpa_iommu.c: In function `get_iost_entry':
arch/ppc64/kernel/bpa_iommu.c:102: error: size of array `type name' is negative

static inline __attribute__((always_inline)) ioste get_iost_entry(unsigned long iopt_base, unsigned long io_address, unsigned page_size)
{
	unsigned long ps;
	unsigned long iostep;
	unsigned long nnpt;
	unsigned long shift;

	switch (page_size) {
	case 0x1000000:
	     ^^^^^^^^^
		ps = IOST_PS_16M;
		nnpt = 0;
		shift = 5;
		break;
	...
	default: 
		((void)sizeof(char[1 - 2*!!(1)]));
		break;

ioste = get_iost_entry(0x10000000000ul, address, 0x1000000);
						 ^^^^^^^^^

gcc is powerpc64-unknown-linux-gnu-gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1)




More information about the Linuxppc64-dev mailing list