summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Law <objecting@objecting.org>2026-03-18 18:59:15 +0300
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-03-19 02:44:26 +0300
commit8f3e79397a980512c2329b3445ebe7258e2d3f01 (patch)
tree2c73877d2110c44cd02c78c1d5d7ca4cdc56fb42
parent909bb3a6c53faf86e96694ed09e7f32cad11ba2e (diff)
downloadlinux-8f3e79397a980512c2329b3445ebe7258e2d3f01.tar.xz
lib/bootconfig: fix signed comparison in xbc_node_get_data()
lib/bootconfig.c:188:28: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' [-Wsign-compare] The local variable 'offset' is declared as int, but xbc_data_size is size_t. Change the type to size_t to match and eliminate the warning. Link: https://lore.kernel.org/all/20260318155919.78168-10-objecting@objecting.org/ Signed-off-by: Josh Law <objecting@objecting.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
-rw-r--r--lib/bootconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index 8c50e942d747..94ae6662531d 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -183,7 +183,7 @@ struct xbc_node * __init xbc_node_get_next(struct xbc_node *node)
*/
const char * __init xbc_node_get_data(struct xbc_node *node)
{
- int offset = node->data & ~XBC_VALUE;
+ size_t offset = node->data & ~XBC_VALUE;
if (WARN_ON(offset >= xbc_data_size))
return NULL;