From 000894d8fc0d787b52a46339f297e20c024a6ca5 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 10 Feb 2025 12:34:54 +0100 Subject: [PATCH 1/2] x86/platform/olpc-xo1-sci: Don't include directly The header clearly states that it does not want to be included directly, only via . Which is already present, so delete the superfluous include. Signed-off-by: Wolfram Sang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20250210113453.51825-2-wsa+renesas@sang-engineering.com --- arch/x86/platform/olpc/olpc-xo1-sci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c index ccb23c73cbe8b..63066e7c85177 100644 --- a/arch/x86/platform/olpc/olpc-xo1-sci.c +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include From ef69de53c46a4b526442f6bc5970fc14f7a0bb32 Mon Sep 17 00:00:00 2001 From: Zeng Heng Date: Fri, 25 Oct 2024 15:42:03 +0800 Subject: [PATCH 2/2] x86/platform/olpc: Remove unused variable 'len' in olpc_dt_compatible_match() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following build warning highlights some unused code: arch/x86/platform/olpc/olpc_dt.c: In function ‘olpc_dt_compatible_match’: arch/x86/platform/olpc/olpc_dt.c:222:12: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] The compiler is right, the local variable 'len' is set but never used, so remove it. Fixes: a7a9bacb9a32 ("x86/platform/olpc: Use a correct version when making up a battery node") Signed-off-by: Zeng Heng Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20241025074203.1921344-1-zengheng4@huawei.com --- arch/x86/platform/olpc/olpc_dt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index cf5dca2dbb91d..e108ce7dad6a1 100644 --- a/arch/x86/platform/olpc/olpc_dt.c +++ b/arch/x86/platform/olpc/olpc_dt.c @@ -215,13 +215,12 @@ static u32 __init olpc_dt_get_board_revision(void) static int __init olpc_dt_compatible_match(phandle node, const char *compat) { char buf[64], *p; - int plen, len; + int plen; plen = olpc_dt_getproperty(node, "compatible", buf, sizeof(buf)); if (plen <= 0) return 0; - len = strlen(compat); for (p = buf; p < buf + plen; p += strlen(p) + 1) { if (strcmp(p, compat) == 0) return 1;