From ad0b3fa83dc4a02adf8bfd391f9a6dfd3c2412ad Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sun, 13 Aug 2023 12:43:38 +0200 Subject: [PATCH] ec/lenovo/h8/h8.c: Use sizeof() Use 'sizeof(ecfw)' instead of 'sizeof ecfw'. sizeof operator should only be used for types and variables require sizeof(). Change-Id: Ifae1680917bb0ce610e6ba753741aae233a71103 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/77154 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Felix Singer --- src/ec/lenovo/h8/h8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 3df20c14f3..f41691f1fa 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -86,7 +86,7 @@ static void h8_log_ec_version(void) u8 len; u16 fwvh, fwvl; - len = h8_build_id_and_function_spec_version(ecfw, sizeof ecfw - 1); + len = h8_build_id_and_function_spec_version(ecfw, sizeof(ecfw) - 1); ecfw[len] = 0; fwvh = ec_read(0xe9);