Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/arm/mach-rockchip/kernel_dtb.c:185 -- attempting to get the size of a pointer in a macro breaks the compiler #58

Open
DaveWK opened this issue Jul 25, 2020 · 0 comments

Comments

@DaveWK
Copy link

DaveWK commented Jul 25, 2020

This branch will not compile. You're attempting to get the size of a pointer with a macro, which the compiler doesn't like..

In file included from include/linux/delay.h:8,
from include/common.h:27,
from arch/arm/mach-rockchip/kernel_dtb.c:6:
arch/arm/mach-rockchip/kernel_dtb.c: In function ‘phandles_fixup_gpio’:
include/linux/kernel.h:45:34: error: division ‘sizeof (char *) / sizeof (char)’ does not compute the number of array elements [-Werror=sizeof-pointer-div]
45 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
| ^
arch/arm/mach-rockchip/kernel_dtb.c:185:19: note: in expansion of macro ‘ARRAY_SIZE’
185 | for (i = 0; i < ARRAY_SIZE(gpio_name[i]); i++) {
| ^~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:281: arch/arm/mach-rockchip/kernel_dtb.o] Error 1
make: *** [Makefile:1303: arch/arm/mach-rockchip] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant