Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1955550lqo; Sun, 19 May 2024 06:36:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxzkMJHcOGNqWtSUB4WqfP8MDJDTuXoLjLEMYK2UwXOxm9OZ+zYS/xjq5WzJwhgIgk2aE87yOsxxllBahWYodV19UgbmaiBmWHsb+tZQ== X-Google-Smtp-Source: AGHT+IGjvtJrgLEksc8rdAQoZq4JGmot60RxEKbZTDJ0vKJwqD5H1dXOd9lrMbsMAp9tq4lMdePL X-Received: by 2002:a05:6214:5d8c:b0:6a0:b4fd:d0a0 with SMTP id 6a1803df08f44-6a168147ef0mr274467966d6.6.1716125804111; Sun, 19 May 2024 06:36:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716125804; cv=pass; d=google.com; s=arc-20160816; b=KAsvQULEnAhGwEB5WU+BKrXAk0fYv8yJC4i/j+xf7DG+ZNTIGKUXLz7/48UpBcwADR yHV9pfrutlctEXVCJFEZ1oNAngtHfqBITcZ6x1ErWmj5nK01xZ9f9lB+0w4RvU1UIBWy lri0zkw4O5xqEUkuvc0ayrN9XRbeEyA3rtEWFneGYJmu3i7GG+U091hOKOnaub04eZJz NqfLwSIY4V/f9F+4F0wnxAg2R/+w/TlTu4ehmAcyV4ecr0I/TB1vj402phm4/6Q8Oftb N/pxr4LEsZiwnX/ljCTEoT+HXqOTbhYA5sPBatrvS2nI5c0lGZ4q2M6NxwW/G68NQbM5 Aggw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=E0/GwadTK8H48L+lP//q4KP0Mq2kGgJ5gq16rn0DpQw=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=b/GQzRdmcFBEmTsmGA9povLAS70mezPXR9XEMwEWxMj1Eug4mYipAA5wPuqROZn1Mu btWQEAizKNAZs9ZPIWYNk8ZnZZDMwWcyyTj4vjs+RiveEshZQl0yagR1YFuTWEbvcd+6 zhS1Ul03wDBa3km6HMJEJ0wHUfQ32NK+8/D89gv/WwTDmnAXie0T83rvMT5Kow6H/nFu vCW7r/YulEFecQ+dyixcHDtiiuzYj+R8LmxIczG1lbQBdA0rfwJgOySXRnVdoJ1d0h0a RFsW4VYUIHQ4o99MZj6yIgEO9j/vBNprx+mfa8v4KP9jX2z7OYXg9GpuNLIuVPJ1Fd4Y QoMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucnnH8LJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f304a52si23141916d6.552.2024.05.19.06.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 06:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucnnH8LJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 CA0F11C20AA0 for ; Sun, 19 May 2024 13:36:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64C3C481D5; Sun, 19 May 2024 13:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ucnnH8LJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8249D1401B; Sun, 19 May 2024 13:36:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716125797; cv=none; b=ZnHguPgU3OSiUeMiEKCkuy8DPByEiL04tfVjNsE42qYC8V4YiVaj+5COJFpVacxVif1dZqnSaDObjjwzjhMXXqqQ5HNv+Ht/INzGN9KWdnHJx8fVeHAHjD15sPpGnuloDQh4JBeA139YIVBMy4vb/XcqLw7l2GKHLYCeD+8Ivwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716125797; c=relaxed/simple; bh=3zOjnH9twAh9RM0OcFtavYQmwEm7aEsSMb4hvSGCWQc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=jwimo9cuSxmhWq/WHTjBIAIGzEpH2EdyLbQ2H3XdrfZrZ7I6JQjgkY6Srrjd3hDzs1CgMg95saAm/JKgOCmO0Tztkakul5NDket1xsfY8qMrRknGf2EQjd12D8MpjwMRfePICjaXuzKDQedefhDrOoXH0jFYhieAhGGawwMsbCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ucnnH8LJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DE59C32781; Sun, 19 May 2024 13:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716125797; bh=3zOjnH9twAh9RM0OcFtavYQmwEm7aEsSMb4hvSGCWQc=; h=From:To:Cc:Subject:Date:From; b=ucnnH8LJCe325CEDMcyTrpY+mLGB1UDFRhUMEav8uWgWcqFVmiRe1PrsZssHz1n73 drml/18VK7u52aaB7BMqfiVQuRsGXLGMRqotEhnX/hLLraFCEpwKHrfpx431TbYJsW QJxam1YnoZU7C7rdXyf7XX8hoLLvULMND7GxjGDXUArlVtbO2OUCaz61U/+DFbptIK 8gpUvfhN1iRGul+hI+6YQhQZ3EQCrZaQIHQLOirQVDWM+CPblIXqaFizaYKspwWsZN dI0rQKb4SEtif4MOHyq277HXMAPj2e9fb2bgh74dvpHcXRRo3TBCfOb2wLf7Qii9XQ Z0Jb3nn9L48pQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH] kconfig: remove redundant check in expr_join_or() Date: Sun, 19 May 2024 22:34:02 +0900 Message-Id: <20240519133403.2121105-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The check for 'sym1 == sym2' is redundant here because it has already been done a few lines above: if (sym1 != sym2) return NULL; Signed-off-by: Masahiro Yamada --- scripts/kconfig/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index a290de36307b..4d95fce5f9a7 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -476,7 +476,7 @@ static struct expr *expr_join_or(struct expr *e1, struct expr *e2) return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); } } - if (sym1->type == S_BOOLEAN && sym1 == sym2) { + if (sym1->type == S_BOOLEAN) { if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) return expr_alloc_symbol(&symbol_yes); -- 2.40.1