char/vc_cma: fix build with LPAE enabled
LPAE is required for virtualisation on ARM. However, enabling LPAE
results in an unbuildable configuration, due to improper formats
used in vc_cma:
CC drivers/char/broadcom/vc_cma/vc_cma.o
drivers/char/broadcom/vc_cma/vc_cma.c: In function ‘vc_cma_alloc_chunks’:
drivers/char/broadcom/vc_cma/vc_cma.c:547:4: error: format ‘%x’ expects argument
of type ‘unsigned int’, but argument 4 has type ‘phys_addr_t’ [-Werror=format=]
LOG_ERR("%s: chunk phys %x, vc_cma %x-%x - "
^
drivers/char/broadcom/vc_cma/vc_cma.c:547:4: error: format ‘%x’ expects argument
of type ‘unsigned int’, but argument 5 has type ‘phys_addr_t’ [-Werror=format=]
drivers/char/broadcom/vc_cma/vc_cma.c: In function ‘cma_worker_proc’:
drivers/char/broadcom/vc_cma/vc_cma.c:677:7: error: format ‘%x’ expects argument
of type ‘unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Werror=format=]
LOG_ERR
^
drivers/char/broadcom/vc_cma/vc_cma.c: In function ‘vc_cma_init’:
drivers/char/broadcom/vc_cma/vc_cma.c:1027:2: error: format ‘%x’ expects argument
of type ‘unsigned int’, but argument 2 has type ‘phys_addr_t’ [-Werror=format=]
printk(KERN_INFO "vc-cma: vc_cma_base = 0x%08x\n", vc_cma_base);
^
cc1: all warnings being treated as errors
make[6]: *** [drivers/char/broadcom/vc_cma/vc_cma.o] Error 1
As explained in Documentation/printk-formats.txt, printing a physical
address phys_addr_t should be done using the %pa[p] format, which
expects a "reference" to the value.
Even if virtualisation is currently not possible (due to the bootloader
starting the kernel in SVC, not HYP, mode), fix the printk formats
nonetheless, it will anyway give better-looking code! ;-)
Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr>
Loading
Please register or sign in to comment