lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174125662677.14745.4766666599934754288.tip-bot2@tip-bot2>
Date: Thu, 06 Mar 2025 10:23:46 -0000
From: "tip-bot2 for Zeng Heng" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Zeng Heng <zengheng4@...wei.com>, Ingo Molnar <mingo@...nel.org>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/platform] x86/platform/olpc: Remove unused variable 'len'
 in olpc_dt_compatible_match()

The following commit has been merged into the x86/platform branch of tip:

Commit-ID:     ef69de53c46a4b526442f6bc5970fc14f7a0bb32
Gitweb:        https://git.kernel.org/tip/ef69de53c46a4b526442f6bc5970fc14f7a0bb32
Author:        Zeng Heng <zengheng4@...wei.com>
AuthorDate:    Fri, 25 Oct 2024 15:42:03 +08:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 06 Mar 2025 11:14:26 +01:00

x86/platform/olpc: Remove unused variable 'len' in olpc_dt_compatible_match()

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 <zengheng4@...wei.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
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 cf5dca2..e108ce7 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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ