util/cbmem/sysfs_drv: Fix incompatible pointer type for 'size'

Fix the following error for armv7a-cros-linux-gnueabihf-clang.

sysfs_drv.c:247:49: error: incompatible pointer types passing 'uint64_t *' (aka
      'unsigned long long *') to parameter of type 'size_t *'
      (aka 'unsigned int *') [-Werror,-Wincompatible-pointer-types]
  247 |                 if (!cbmem_sysfs_probe_cbmem_entry(id, &addr, &size))
      |                                                               ^~~~~
sysfs_drv.c:99:84: note: passing argument to parameter 'size_out' here
   99 |   ...id, uint64_t *addr_out, size_t *size_out)
      |                                      ^
1 error generated.

BUG=b:434971585
TEST=none
BRANCH=none

Change-Id: I5e2be25d57c5e69501564b6e8b6d880ec046bc3b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88605
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Yu-Ping Wu 2025-07-30 03:32:20 +08:00 committed by Yu-Ping Wu
commit 54016e273e

View file

@ -239,7 +239,7 @@ void cbmem_sysfs_foreach_cbmem_entry(cbmem_iterator_callback cb, void *data, boo
continue;
uint64_t addr = 0;
uint64_t size = 0;
size_t size = 0;
uint8_t *buf;
/* If entry was not found or previously matched directory