[U-Boot] [PATCH v2 02/13] include: Add generic bitops headers

Fabio Estevam festevam at gmail.com
Sun Oct 25 17:28:22 CET 2015


On Sun, Oct 25, 2015 at 4:50 AM, Jagan Teki <jteki at openedev.com> wrote:
> Hi Febio,
>
> You replaced __always_inline to inline any specific reason? found
> __always_inline at some parts of header in code. But my compilation is
> not-smooth with this.

Yes, if I use the original __always_inline I get the following when
building for ARM:

/home/fabio/denx/u-boot/include/asm-generic/bitops/__ffs.h:12:24:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘un
/home/fabio/denx/u-boot/include/asm-generic/bitops/fls.h:12:24: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
/home/fabio/denx/u-boot/include/asm-generic/bitops/fls64.h:18:24:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
make[2]: *** [lib/asm-offsets.s] Error 1
make[2]: *** [arch/arm/lib/asm-offsets.s] Error 1
make[1]: *** [prepare0] Error 2
make: *** [sub-make] Error 2
In file included from
/home/fabio/denx/u-boot/arch/arm/include/asm/bitops.h:193:0,
                 from /home/fabio/denx/u-boot/include/linux/bitops.h:122,
                 from /home/fabio/denx/u-boot/include/common.h:20,
                 from /home/fabio/denx/u-boot/lib/asm-offsets.c:15:
/home/fabio/denx/u-boot/include/asm-generic/bitops/__fls.h:12:24:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘unsigned’
In file included from
/home/fabio/denx/u-boot/arch/arm/include/asm/bitops.h:194:0,
                 from /home/fabio/denx/u-boot/include/linux/bitops.h:122,
                 from /home/fabio/denx/u-boot/include/common.h:20,
                 from /home/fabio/denx/u-boot/arch/arm/lib/asm-offsets.c:15:
/home/fabio/denx/u-boot/include/asm-generic/bitops/__ffs.h:12:24:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘un
igned’
In file included from
/home/fabio/denx/u-boot/arch/arm/include/asm/bitops.h:195:0,
                 from /home/fabio/denx/u-boot/include/linux/bitops.h:122,
                 from /home/fabio/denx/u-boot/include/common.h:20,
                 from /home/fabio/denx/u-boot/arch/arm/lib/asm-offsets.c:15:
/home/fabio/denx/u-boot/include/asm-generic/bitops/fls.h:12:24: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
��int’
In file included from
/home/fabio/denx/u-boot/arch/arm/include/asm/bitops.h:196:0,
                 from /home/fabio/denx/u-boot/include/linux/bitops.h:122,
                 from /home/fabio/denx/u-boot/include/common.h:20,
                 from /home/fabio/denx/u-boot/arch/arm/lib/asm-offsets.c:15:
/home/fabio/denx/u-boot/include/asm-generic/bitops/fls64.h:18:24:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
��int’
In file included from /home/fabio/denx/u-boot/include/common.h:20:0,
                 from /home/fabio/denx/u-boot/lib/asm-offsets.c:15:
/home/fabio/denx/u-boot/include/linux/bitops.h: In function ‘fls_long’:
/home/fabio/denx/u-boot/include/linux/bitops.h:146:2: warning:
implicit declaration of function ‘fls64’
[-Wimplicit-function-declaration]
/home/fabio/denx/u-boot/include/linux/bitops.h: In function ‘__ffs64’:
/home/fabio/denx/u-boot/include/linux/bitops.h:161:3: warning:
implicit declaration of function ‘__ffs’
[-Wimplicit-function-declaration]
make[2]: *** [lib/asm-offsets.s] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [arch/arm/lib/asm-offsets.s] Error 1
make[1]: *** [prepare0] Error 2
make: *** [sub-make] Error

Then I changed to inline after looking at the barebox source code.


More information about the U-Boot mailing list