From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED52C351C2F; Sat, 30 May 2026 17:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163239; cv=none; b=jxXfDhoLMXJwPYH6DTMR59ehQoUkxj+Z2EfV69lTZYmmmS8pSxkyMyEdJIgTnsYGmfDiXZDlH0O5m0QEQmMm/V/1/v9vIYxh87KfA1n0ws8DPrbzTxfvIvK7qEm9G3dcTtZ97jPeLgGCANU2WNd/pbAnX54/7TedepWB8OmW9QA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163239; c=relaxed/simple; bh=RRyo2Wkmh6rdS/tcCh1N/4HpJNjmUG1snDYuN8/YYYw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W83ffhAdAIezq1HMvLqJqDJ3yWSrUhMbQQiwGKNjPdQph84orlfJ0+h8d2Yy+qjUiYiPFKr9VBDGLsJ25ZHcsMQnEW3ckv39O+BS4ByrEnvg3jsvoqb1mIqhjbqLtXLtH4nfzFT/KNs/4A0lEMBKRzXWa+TFtu+JQcvIx7QVGI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p22vGmxT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="p22vGmxT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35EDB1F00893; Sat, 30 May 2026 17:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780163238; bh=I0U4Q3OgE3Ei6HvGKrOPNGNVDPChI035VtKOVajz/j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=p22vGmxTgM+vxkSJbJYnSrlZKeEHRAwJbK4j3rd8gPP7TTFCUI6sDauDkpbVVr7Of ZzMNYidb2bmaXvTEZXZpcBNTLC6A7tanbV9rzpYbCdS35xkm5Anw5PMsId50qfgqRL 1I0G1JXoQ9cxejffiqG5UOFBZJi3TgFmAM/XUuCw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "stable@vger.kernel.org, devicetree@vger.kernel.org, Nathan Chancellor" , Nathan Chancellor Subject: [PATCH 5.15 165/776] scripts/dtc: Remove unused dts_version in dtc-lexer.l Date: Sat, 30 May 2026 17:57:59 +0200 Message-ID: <20260530160244.755739771@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160240.228940103@linuxfoundation.org> References: <20260530160240.228940103@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Chancellor This patch is for stable only. Commit 5a09df20872c ("scripts/dtc: Update to upstream version v1.7.2-69-g53373d135579") upstream applied it as part of a regular scripts/dtc sync, which may be unsuitable for older versions of stable where the warning it fixes is present. A recent strengthening of -Wunused-but-set-variable (enabled with -Wall) in clang under a new subwarning, -Wunused-but-set-global, points out an unused static global variable in dtc-lexer.lex.c (compiled from dtc-lexer.l): scripts/dtc/dtc-lexer.lex.c:641:12: warning: variable 'dts_version' set but not used [-Wunused-but-set-global] 641 | static int dts_version = 1; | ^ Remove it to clear up the warning, as it is truly unused. Fixes: 658f29a51e98 ("of/flattree: Update dtc to current mainline.") Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- This should apply cleanly to all supported stable branches. Signed-off-by: Greg Kroah-Hartman --- scripts/dtc/dtc-lexer.l | 3 --- 1 file changed, 3 deletions(-) --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -39,8 +39,6 @@ extern bool treesource_error; #define DPRINT(fmt, ...) do { } while (0) #endif -static int dts_version = 1; - #define BEGIN_DEFAULT() DPRINT("\n"); \ BEGIN(V1); \ @@ -101,7 +99,6 @@ static void PRINTF(1, 2) lexical_error(c <*>"/dts-v1/" { DPRINT("Keyword: /dts-v1/\n"); - dts_version = 1; BEGIN_DEFAULT(); return DT_V1; }