Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1057349rwp; Thu, 13 Jul 2023 05:38:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHurxIladyzRClSpYnIsJchJ3ptltJYZig22pXXXnr4q2FTaldH+n5ftccramRa2HmmOlIC X-Received: by 2002:a17:906:7a59:b0:973:cc48:f19c with SMTP id i25-20020a1709067a5900b00973cc48f19cmr1310359ejo.56.1689251928184; Thu, 13 Jul 2023 05:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689251928; cv=none; d=google.com; s=arc-20160816; b=wfkEzLtQmfxOP91W3oRKwOXHkrDgh5dq3rrQIv4h+ypPDELRDTG/hDI7kax45epa02 mqHR9m5KNm66Mc7O3oex1qGOMhwU/pzliA3rjeDK3Kv/5KfOqUGslOGys8iddm0v+nSF 9yzoUluLikPHiKyDeEfPag1HH7gbT0uqBnyRFFhjqJEH374JruSq7RTNN8629Pz6oatP uzEQeyT2qpxDuMakoALQyVqKY8lEjTkpYMmzRD32npXE+ZYmT2CcMZ2DlzUzlpdH+sHU NR3bhYWMz/MJLRnhG5BlJ24/mbvma4UHAVCrkZA9bU+PTspETkJawV7j8LFVRoW1vIvM wGag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vC1BnLacuWIn4JP44zo+QlFO9OWCrIZRrezYlKwlTx8=; fh=+t+G/OXZaGbelVlx/PAQKy/ssq96RZ9Njlv0n65gx60=; b=fVTtflSkBEWja3KajMSn4CUbfjyV+a8FNjWkXpULY9i638lPOVCPVGRMMoQHdctSBa LmmHz0NKd6DuVpf+ZqkEOEuo7xcWQNJtHvJ6ERyum3VvU4yhkVoCiU03Mn3dBpN1aanT 9Xp36hra2Fdt3c1zWcAJXZ8beXNJszS6O3C0ux5oZt9NsVvu7w99qmrqiUEVHu0oCHcf pd42AigMf8n5Xld0SzFeljlTsnaUFzNkoLTW28nimP4165ulWSpCsUXGPusF+h7arHpK X8Aa7Bnzcf/z29YHphKY+N0s2DRq1QHihIlHyUJPhPwX/e9nAp598qEqzn6mCwE8axSB hBBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=tJRpUm64; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v12-20020a1709064e8c00b00992e14a3655si7665381eju.354.2023.07.13.05.38.23; Thu, 13 Jul 2023 05:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=tJRpUm64; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230027AbjGMMMr (ORCPT + 99 others); Thu, 13 Jul 2023 08:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234544AbjGMMMk (ORCPT ); Thu, 13 Jul 2023 08:12:40 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A3E926B8; Thu, 13 Jul 2023 05:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689250359; x=1720786359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1i34KSawlUL8WNjNkmTiVglWiYjIqUpNKEWr7RWMan4=; b=tJRpUm644RjT8ajQUgOA7tn35xOLCi3JHWrUQ7fsOecP9bu4S8Xc3jw+ NaX/hcsUNPHsrpBoJ9ngjD0IpweeHEtO5pErFidMU69bMXWVXPzdFMo1i 7LP0xxHCBmEXO0PD7wZcczpertKfJ9jH7edJsT4dP0n7zpCWFIVvnu1qm rtPVKFt/bcajtS2n6DGbWnPt4StyWIh/HQepgvr2DR7yv/nLb9cC0rmQs QjyIBP6BHYMD3cLGbxI4FQ+jMyBGGohFld1dMNF+SWHFcz6qwRYyr5Blz fxyrkm1x0X8f92FNyoVdHwN01mLFRjNOO5+Hx4BT8DkYiSGi2/kBeiEiL A==; X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="222827139" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Jul 2023 05:12:39 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 13 Jul 2023 05:12:38 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Thu, 13 Jul 2023 05:12:36 -0700 From: Conor Dooley To: CC: , , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Albert Ou , "Jonathan Corbet" , Andrew Jones , "Heiko Stuebner" , Evan Green , Sunil V L , , , , Subject: [PATCH v5 03/11] RISC-V: drop a needless check in print_isa_ext() Date: Thu, 13 Jul 2023 13:11:01 +0100 Message-ID: <20230713-veggie-mug-3d3bf6787ae2@wendy> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230713-target-much-8ac624e90df8@wendy> References: <20230713-target-much-8ac624e90df8@wendy> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1275; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=1i34KSawlUL8WNjNkmTiVglWiYjIqUpNKEWr7RWMan4=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDCnrX15dnT3zoNehbztPtS703Cn0evqXSf3LJDnnbIvR88xU NBKN7ihlYRDjYJAVU2RJvN3XIrX+j8sO5563MHNYmUCGMHBxCsBEYk8yMmy41VY7X+Pdp5ctjsmT7j aHfhK+t10mrNpt/vK/GazS9wIY/tm2HFI/t7Zy87PdG0V3eT1fuvLXR8643YfK3/C5tm6fcIYHAA== X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org isa_ext_arr cannot be empty, as some of the extensions within it are always built into the kernel. When this code was first added, back in commit a9b202606c69 ("RISC-V: Improve /proc/cpuinfo output for ISA extensions"), the array was empty and needed a dummy item & thus there could be no extensions present. When the first multi-letter ones did get added, it was Sscofpmf - which didn't have a Kconfig symbol to disable it. Remove this check, as it has been redundant since Sscofpmf was added. Reviewed-by: Andrew Jones Signed-off-by: Conor Dooley --- Changes in v2: - Reword commit message to explain why this can be dropped --- arch/riscv/kernel/cpu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index f808b67f5a27..e721f15fdf17 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -237,10 +237,6 @@ static void print_isa_ext(struct seq_file *f) arr_sz = ARRAY_SIZE(isa_ext_arr) - 1; - /* No extension support available */ - if (arr_sz <= 0) - return; - for (i = 0; i <= arr_sz; i++) { edata = &isa_ext_arr[i]; if (!__riscv_isa_extension_available(NULL, edata->isa_ext_id)) -- 2.40.1