Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Josh Law and committed by
Masami Hiramatsu (Google)
8f3e7939 909bb3a6

+1 -1
+1 -1
lib/bootconfig.c
··· 183 183 */ 184 184 const char * __init xbc_node_get_data(struct xbc_node *node) 185 185 { 186 - int offset = node->data & ~XBC_VALUE; 186 + size_t offset = node->data & ~XBC_VALUE; 187 187 188 188 if (WARN_ON(offset >= xbc_data_size)) 189 189 return NULL;