Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp439037lqh; Tue, 7 May 2024 04:05:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6lBoLy2NezwloI+3Jun0WVwW5fr0bi/WPrwbFjZVCWIgz4irEouXDBdXQEDd2nxGM7dMny8LuLO38rHmZ43TBF4Z9EdsjT4yhLdYWWw== X-Google-Smtp-Source: AGHT+IGAL9Qd4MiszSfihQP1ntfIu3tY5CtJAVr3jwjci8/cJcM66fdxQybSU/nn5hEg9k9lCGcf X-Received: by 2002:a05:6a21:3a41:b0:1ad:8755:976 with SMTP id zu1-20020a056a213a4100b001ad87550976mr13584958pzb.13.1715079943664; Tue, 07 May 2024 04:05:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715079943; cv=pass; d=google.com; s=arc-20160816; b=tGUS+SAOfbK2DY3hn0CWrN2Eq5Rgtns8Ss+/70bpEWPUeXmrp/RkJpqDaNs3xo2txX kVKlBBRUOMbPQAkdGl6eQqQRZdSmFIDFk360QkrYYdVVRu7pjx1HM+7tIpPjiGPbcEYZ YkOHygyUdWfvQ882D+ULCr7D2ZdQhKwobi9bzUMhhsvcA6Ao/ozGQJVLi4Hpfa23Vdc4 85kbUkIUfUhgHonn7skk4W0RgO8QPuSW9GOFU8MTabXqqjl4MQoFQJOEjI1jbYLTBO7d kpkam2q8I8SBPzTVOs1OnaeE8Od5onMyfVE94tQp4i/NbwTbJqAk5HyuZwUQ1EWaKp3W eYrw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=76tRRT05GBa2DxRs1S50LJXI1wN+iIDdYBRpd0E1dH0=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=yxG0sun3S58hywauR4X09e8Eq3b0TsfssUF3IENRng7RGI6WkNOMYy98nbzKPdcLGq Y7OJ7yXQreheAeWxN5wreUSg9LJFI+2f7Ye4z0iAKE8XHwkmExNIoGSrERNMqFvjOIgT a056ZyotNlhtt2QAq8+N5J8Uxvf6hyOS/whr72q0KkDTTzD75y0Cni1wkOA/s1EGXHT7 NJjc8HZayudvSV9LRP5qlV9h+v1DWimYaOZRsbuv+JbeJnk8JrpTSYf7PUfCum4UDh1t ZdaDWBvjj3JXAdhZtCVGWuQI1Hmx/M/3Y4qTtGLpNei1GyaLRDZ6csYQyy+fJa7pdZKm E7pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p7l0Ynxs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j18-20020a170903029200b001ec2b95b420si7821297plr.519.2024.05.07.04.05.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 04:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p7l0Ynxs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171111-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A6574B235A5 for ; Tue, 7 May 2024 10:39:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4427B152170; Tue, 7 May 2024 10:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p7l0Ynxs" 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 6D6701514F5; Tue, 7 May 2024 10:38:34 +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=1715078314; cv=none; b=bbu8O2Q5ZVmWcdv3gVsG2dN7PF0o4GEV70CBdoTRKMnqWl8mPbxfoLNM4g0pahqu5xYA1NiT+Et9LAc+ZwiM7Gr+BHDjp+V+4HPKg/trv2iBVTfgl0SU3haC18quAL570aArdj6CSzPF6nTuPFucvPJM5BR947zXfbMtEcc4X34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078314; c=relaxed/simple; bh=/8Wqr+SuY8M/oz8mz047pX05dfShxUAsQlubT6STB+c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WZBlPEwVsI29+tog4LHyshWsC9IzbHev5/O2SkRUQkBWbsX45VLZuabDCHjoIvNa6n9PPUF6bRatxN+obfP2xrslqr88YbOzo3t9ez54lIRoGjaVBKMSQL4KVT6Y+sIN654yCFWgWsHVo2FYue2HWrbajmrrB4bIkm09Nu8qDjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p7l0Ynxs; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D7FBC4AF63; Tue, 7 May 2024 10:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715078314; bh=/8Wqr+SuY8M/oz8mz047pX05dfShxUAsQlubT6STB+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p7l0YnxsvHNSJX6ml4H2vrHc/gu/GnALPSD8r0zP7IpBKm/cp8QoBZ/NsBu97Rf/C czhlDOBXZl8f66hsgovD/h5AaTfHYKbcfHkEV1QBPiUtzMFUG/edJrHgLzRVPU/sNz VogjpG7JRrPSO+paB64oGSDu42ZXALqWf8pqJz9ngXziZmqrW98Z9bo4aKSh7grS+O lZAzUDJ+I4k5pA+9XRNXgCHEGPE9Av8cY7JGMC+6+tPxDtPj0/B0aa46euqAaOH/9e pMrXPj+sk3HqXsIXW1xg6NQ4eWBOZuOLJtxq9IStd+jl4/jgOYdh35Hzg4+IVTDM64 dz1Kw9I66YR4g== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 2/3] kconfig: m/nconf: remove dead code to display value of bool choice Date: Tue, 7 May 2024 19:37:55 +0900 Message-Id: <20240507103756.1401996-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240507103756.1401996-1-masahiroy@kernel.org> References: <20240507103756.1401996-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Previously, optional bool choices met the following conditions simultaneously: - sym_is_choice(sym) - sym_is_changeable(sym) - type == S_BOOLEAN It no longer occurs since 6a1215888e23 ("kconfig: remove 'optional' property support"). Remove the dead code. Signed-off-by: Masahiro Yamada --- scripts/kconfig/mconf.c | 17 +++++------------ scripts/kconfig/nconf.c | 26 +++++++++----------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index b33335eba460..64bf373f7921 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -525,19 +525,12 @@ static void build_conf(struct menu *menu) val = sym_get_tristate_value(sym); if (sym_is_changeable(sym)) { - switch (type) { - case S_BOOLEAN: - item_make("[%c]", val == no ? ' ' : '*'); - break; - case S_TRISTATE: - switch (val) { - case yes: ch = '*'; break; - case mod: ch = 'M'; break; - default: ch = ' '; break; - } - item_make("<%c>", ch); - break; + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; } + item_make("<%c>", ch); item_set_tag('t'); item_set_data(menu); } else { diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index b5b3232f592a..715e156fdbb1 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -826,26 +826,18 @@ static void build_conf(struct menu *menu) val = sym_get_tristate_value(sym); if (sym_is_changeable(sym)) { - switch (type) { - case S_BOOLEAN: - item_make(menu, 't', "[%c]", - val == no ? ' ' : '*'); + switch (val) { + case yes: + ch = '*'; break; - case S_TRISTATE: - switch (val) { - case yes: - ch = '*'; - break; - case mod: - ch = 'M'; - break; - default: - ch = ' '; - break; - } - item_make(menu, 't', "<%c>", ch); + case mod: + ch = 'M'; + break; + default: + ch = ' '; break; } + item_make(menu, 't', "<%c>", ch); } else { item_make(menu, def_menu ? 't' : ':', " "); } -- 2.40.1