Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp399536lqo; Fri, 10 May 2024 03:27:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUMBzBCGX6GGICjWsI2mKiVLU+4z7+c/fUMESeTZ2charxClHDQaCsyxzn+abj1/495j3GqvmlBC3oOc0Gx6K23WdHLFNk0vn/Qc/TPg== X-Google-Smtp-Source: AGHT+IGHtDIrsyKcJM8IBOdMDeY1V6tMYl+wzpFCRPmz5Ps4CB5bYj0H5fhJvWMht3KU3HDgpUTt X-Received: by 2002:a05:6a20:4313:b0:1af:cbe1:8a50 with SMTP id adf61e73a8af0-1afde0b5bfcmr2588026637.10.1715336861836; Fri, 10 May 2024 03:27:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715336861; cv=pass; d=google.com; s=arc-20160816; b=QDOvrGFS2odCVowLcXLnvNVPrKenEqrEoZMD4qPHQ+EkJ9blGP0d/9CQliSzmg1dmK lTqEHFHseAMsA3D5PyhWOO0ce2drtFnbh9K9ZMWRnTlX9PZvG7tTdGdR5iYBowXGcUkV HY7wqsYn229APa+NKoDuRhvPb9YFuSZgSXnyy6GvfnqnuDe3+r1WCTiNXw/06X0SrmfM uKjNFt+6mdCjm8ZeNqw6WnyF/GUqQl1gqiVks0nLNUxWiLyAOP8Fe4jbN3px9CiC5N0D YoMYW7sfKqkRwSFMUyB3pkXzAN7lR7yDwY96G78FboA3fCvM25LAJqHp0LMPBuIDffgv TGlw== 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=Iui4DcriiV64C/DFOleUvhNtJLV/XLYo4QcNWAyunFQ=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=T45oHtBjIQv5FULrePQuJ/PYALZKqye2/Br/MNUL70NUsbdBVxAO3zres3h6MOcGET RW7ehmz3LLCpd3l1hJZnb4TcyV7fvDu3x1qUgwtcVkB8KY8249hYl7Pi+PNomrG7Z5gm z+NGvOBLTUTjJinFu9Igy8eLV5rUPN7uugXe4wWDVfFIWY0x+IN8jQ1ahklDvTCLdEi9 UXEMTyaRyqYfeRieAIjg3roMnqMR+q9SPbecYMajh/ayJcZ1AVyg1wi9DAnLtCPw+jTy soFTUptBfx71rLEqLUAugUUlv6a3Q0V+H1Sgt4rHh1VaBvcbPxcBwbD0gO5aoT/R2P6k UyLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YT7bLdue; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628a5b91fsi5466002a91.40.2024.05.10.03.27.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 03:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YT7bLdue; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175588-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175588-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D742283315 for ; Fri, 10 May 2024 10:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09FF916C448; Fri, 10 May 2024 10:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YT7bLdue" 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 32253168AFE; Fri, 10 May 2024 10:24:43 +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=1715336683; cv=none; b=AKe5BIXs/UIBsvbObSVLfJJe13kC41eoXIolwvKlpD7Rpmloxw4SitHpsKUTmePtKiGYNSUAwSq/goX+kqXbMPDyH0A/Dgkcwpjzlz5Ne2IujpImS1teLyAh1ZiG+gfxW9TnTfhvwAN5USWPEnZ3vUJMez2zbfvUesJdCL20IVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715336683; c=relaxed/simple; bh=Ze8Q2NPH+lSYb7GIrGOA0moGIm4Q2QeviYx2Y8PWdGc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p+ZBpBO7YFiVVsrTwSf02CGynl9yNsgi5MKPkYvtVtZJUb12lZTG42wxaZnIgOVAZ8JBo30yL99Z6FpXql9WG5NGDTux7Tcd/LgJrwhUQAf/NfRhEZ55Vo4noIvsHg3W36hTZo6QH1dT9uyA9UBlyzF4z/7FrUuMGkwcXZanT7I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YT7bLdue; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FC53C32782; Fri, 10 May 2024 10:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715336683; bh=Ze8Q2NPH+lSYb7GIrGOA0moGIm4Q2QeviYx2Y8PWdGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YT7bLdueDc0PkEw8gXPF2shBbQsnt/830VRkyRsZcvmfXO+UtbvGXJ3yxvLwB8d6u qekB5YocfItYOmDeux5RFNdAuHeKdbjb2T9cGSOSUhKVA52AGPaeEmgBSajsjNMItd qrYkNqw8ucGaLjWlSFLTjhQdMYRBNA5QROhvtU4DfGfnmpQZ9s+8WKsqMSdhMC5QIz NbgunPzNCayr3WcLXIE88KsTi6hQmh2rVAm+xabYEsEO8ctE4zpzZUqCe3v+AancK7 iF2bKuvGtRdywDRYOJGmVaFIHm1OrKAvWdYpwndOSzgJRU9VwXfkIymwlNzgrLaPGA //kgkgOJeScJw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH v2 2/3] kconfig: m/nconf: remove dead code to display value of bool choice Date: Fri, 10 May 2024 19:23:22 +0900 Message-Id: <20240510102323.2948886-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240510102323.2948886-1-masahiroy@kernel.org> References: <20240510102323.2948886-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 --- (no changes since v1) 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 8de4af43e865..90cd59a96aac 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 bf460233a4cc..93047cd28f3f 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