soc/intel/xeon_sp: Fix size_t type mismatch in print statement
commita1aca1e656900010d0a7b0bc57690464d0447768
authorPaul Menzel <pmenzel@molgen.mpg.de>
Tue, 9 Nov 2021 07:24:26 +0000 (9 08:24 +0100)
committerPaul Fagerburg <pfagerburg@chromium.org>
Sat, 13 Nov 2021 00:18:59 +0000 (13 00:18 +0000)
tree1b4cedbf178290d27d7e9cbbfbaf38b4a27d1306
parentd1598991a3077f41c390151a1dd5832a003e5c1d
soc/intel/xeon_sp: Fix size_t type mismatch in print statement

The 64-bit compiler x86_64-linux-gnu-gcc-10 aborts the build with the format
warning below:

        CC         romstage/soc/intel/xeon_sp/memmap.o
    src/soc/intel/xeon_sp/memmap.c: In function 'fill_postcar_frame':
    src/soc/intel/xeon_sp/memmap.c:39:62: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
       39 |         printk(BIOS_DEBUG, "cbmem base_ptr: 0x%lx, size: 0x%lx\n", cbmem_base, cbmem_size);
          |                                                            ~~^                 ~~~~~~~~~~
          |                                                              |                 |
          |                                                              long unsigned int size_t {aka unsigned int}
          |                                                            %x

As `cbmem_size` is of type `size_t` use the appropriate length modifier
`z`.

Change-Id: I1ca77de1ce33ce1e97d7c8895c6e75424f0769f5
Found-by: gcc (Debian 11.2.0-10) 11.2.0
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59054
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Lance Zhao
src/soc/intel/xeon_sp/memmap.c