From patchwork Wed Dec 20 21:32:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 181770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp22749dyi; Wed, 20 Dec 2023 13:32:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF983osdS//7qIN0GarJ9grNk8lpUNZ4bbw/MR31XjklmJfzRO5sMCSZeA39Fvhe24GiqXK X-Received: by 2002:a05:620a:24d3:b0:77d:619c:a038 with SMTP id m19-20020a05620a24d300b0077d619ca038mr25976388qkn.76.1703107957519; Wed, 20 Dec 2023 13:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703107957; cv=none; d=google.com; s=arc-20160816; b=uocJl0RAyK5z11IpIpXx/f3kkM7y4oMWOPRpj/fsQEEVro0UY6p1fI5rq9A3ZGwr8h JdHQL9TWJ//8OwBns8mOtZtWEGXFOS3EpRr8z1ZXXdfK9RNxMcQT4R1hk/xq8QjNR8Ge T6wPzID3Kn5TJJCuyMYtOscbjlRWNwjm75OiePHWVg30MpjlPRaUNO61pxw1KPyJPYDx yseK4C2DKNTN8QnMwFHd5SOUSRCw3TMcZDoUlCC77aBzFJbO0NPtVr62zz+xhiRuHL2X 8n8u1eoEWxgboEDE4jhof9vSNBW1tUF84+ptCT9RPR+fi9J3JjClUgbbwVlo+O2e17Cd BLSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=U/OsDjhXqr/1LDHw58uXvplzo2hKo0Qi2ivibH7zQ8U=; fh=/vv2oMcWDWnbqSotyTz9g5rFUGcsFzPKb7ZYknTlZas=; b=sStZHEe2BE8Uc+d5LUsu2H19hcOHxfHbzKQSJzytImnBxRLRHz/5hJHzmz0H3hMqXc HJYihu386v3XAS9a15+ARJ+hZR8F89Vb96puPh2P9v7wLaOZ5WzQDo8ZORypB+65Pw6E KUiHrPFasHqQB33eu/AbYHFIwdv5ph3ce5H4moOJQIk5hdKoyPqHkN8U/oALCQN6wMlt JCxujsIOsoNXS4t/1ShJvJpR6uVbVQXEWF3mxGFH781MOYTKgr4SLDPxi4LllCjxBj3E 59cifCJaAOFOk97yimjY/REc2njpQoWcPiUWEUTFfC6CEqGIYpanr+++bebGowKXv8E1 F/Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KM5mJvai; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-7453-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7453-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s8-20020a05620a0bc800b0077fafdd5020si674177qki.2.2023.12.20.13.32.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 13:32:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7453-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KM5mJvai; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-7453-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7453-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4F60B1C21F9F for ; Wed, 20 Dec 2023 21:32:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4AA9495EE; Wed, 20 Dec 2023 21:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KM5mJvai"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="s9yrPcUg" X-Original-To: linux-kernel@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 BDBF3495C1; Wed, 20 Dec 2023 21:32:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 20 Dec 2023 21:32:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1703107937; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/OsDjhXqr/1LDHw58uXvplzo2hKo0Qi2ivibH7zQ8U=; b=KM5mJvaiDQsqwO7XPgAUsfws1QdC+cs3q6BgEVvnOBn1Goygjq1qBOKlvcJHE8DZHxE3jk wkLC9gK360cMWtOP3d/4YYmAdlNLJZvALEw92YlHH1JlCqf4N1PaqVF2xvVw3/qhyDM97z 2KNmhB8oIDgBk1k+rO9uP1Xr1EPl+ggTbwreZJ5r2TWuwSev3/qrAMGB1jqNR0N2WSrOpx nZippK4Th8JZlCMqjAUbbX8kdCWdVt9cAtdGPPztNEUpLcrCKqnBWjarYaOIAoWTfYU7ZU 7N8NmAYScRu5dGlbdN5lzWNgDYUwX0SO0miiy757P3sf3AFGI/7zjhSbaW9Ybw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1703107937; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/OsDjhXqr/1LDHw58uXvplzo2hKo0Qi2ivibH7zQ8U=; b=s9yrPcUgmdGNbnGIYtS/xf+2iT541w1NtRzNMnWUczo9ioD4IlXxRQ39TRLZ45GLt/UjkF cwS0O+JTyEgdWJCQ== From: "tip-bot2 for Colin Ian King" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/boot: Remove redundant initialization of the 'delta' variable in strcmp() Cc: Colin Ian King , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231219141304.367200-1-colin.i.king@gmail.com> References: <20231219141304.367200-1-colin.i.king@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170310793651.398.15795585015869596291.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785838129599067557 X-GMAIL-MSGID: 1785838129599067557 The following commit has been merged into the x86/boot branch of tip: Commit-ID: 257ca14f4d780e27a0605fd68053d2cc3178a232 Gitweb: https://git.kernel.org/tip/257ca14f4d780e27a0605fd68053d2cc3178a232 Author: Colin Ian King AuthorDate: Tue, 19 Dec 2023 14:13:04 Committer: Ingo Molnar CommitterDate: Wed, 20 Dec 2023 22:23:33 +01:00 x86/boot: Remove redundant initialization of the 'delta' variable in strcmp() The 'delta' variable is zero-initialized, but never read before the real initialization happens. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231219141304.367200-1-colin.i.king@gmail.com --- arch/x86/boot/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c index 1c8541a..c23f3b9 100644 --- a/arch/x86/boot/string.c +++ b/arch/x86/boot/string.c @@ -49,7 +49,7 @@ int strcmp(const char *str1, const char *str2) { const unsigned char *s1 = (const unsigned char *)str1; const unsigned char *s2 = (const unsigned char *)str2; - int delta = 0; + int delta; while (*s1 || *s2) { delta = *s1 - *s2;