From patchwork Mon Jun 26 11:19:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 112879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7412635vqr; Mon, 26 Jun 2023 04:35:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DP/2YiS/n1AjBwzydzDJadt7XQlCDw5VMz7MWhS/z+fUX4mmiTzsrvDKglWAgHWfyvbG8 X-Received: by 2002:a05:6808:120d:b0:3a1:b9d7:3821 with SMTP id a13-20020a056808120d00b003a1b9d73821mr9154170oil.37.1687779343704; Mon, 26 Jun 2023 04:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687779343; cv=none; d=google.com; s=arc-20160816; b=eCAb2dSh8ok+0c+VNOmq1enbPUN6tM/Yxwesa0YeFwE12267Pa+EaQaLdqgG6MGdO+ XJSsS0YoLOVillNMPNj9PmrL185r3p/W1hM8rJIeXw5mol5k6E/jdsrCu5T3VuT+nAI9 o3kHpGVR0P02OIjCIi89a4QsWmw/JW8KYWfw/iU4f19sDYn1jpTb5Txv8u2ERpBVWtah 8X2dz0MdvOe5eTlFaxiUcj1AMUU+n7ES7kCT+NN3Zh9iD7EWwDZykm4rqkGrol9DZc7p h+qwWYgfoU2psHEcD90xvw7+NJYPwRwjTn6NfluYusXpLd4daYReMktE/QKtb5TSqj25 0S1Q== 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=pjbRQTj3/shGhEQNCzhOP4ATDodEOI10UsFTo44LWPI=; fh=id5NoWTfrmVnmm2w/Ed5X4erHGUuViLdGWw+WL1NNbc=; b=r1l5Pclh6fnVUn7JuBjjJWaT/4MK5BLSjoygIkX839o+gb1O1iYDGy/gLVi1jZFfOc BLopYoI+1F1WyrebGuMoHtAWOY2PnPu5inAjnuEKngLqwAt0Us5Ro9RYC5PQIGGQ3RAs PMQcCqKOWXaPKEgYdbZiT5E0KZLtAS3mo4RcOEoRAHic6T5344TX61+REs/Qqzsq2JZR m+TJ91afmBAbFjUZqHwla3KV+/1rsMtJS0RdtJ6y27X9Z4yWZOkatARu9t2QdgISH548 499wES2nfZ7szQuLxEFXZLyg7xFa1NMGFN3elhWgZmXdJc7ejGfflxi/87GHdwIcwu5p qPRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=teoQKccp; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 28-20020a630c5c000000b0055757030059si4830594pgm.3.2023.06.26.04.35.30; Mon, 26 Jun 2023 04:35:43 -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=teoQKccp; 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 S230340AbjFZLVA (ORCPT + 99 others); Mon, 26 Jun 2023 07:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbjFZLUx (ORCPT ); Mon, 26 Jun 2023 07:20:53 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6DB10F; Mon, 26 Jun 2023 04:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1687778452; x=1719314452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W1hk6ucl8KNm2U0fXh/wXmuimq2rclUouXAdbjBH3TA=; b=teoQKccpY6WOzG56JwUxFZ4v/3VIav/QRUU50tghDE+nHddM0tsP5vqG ybdWT2tajp0qNrkKzHY8pYTIVM9nC3AP5GdXdjYye79wSMQbblirZTauO xYNaW6FYlXbe3jzqFYciyBWaO9GhQOHOnxNsHwubEBQskfAVW53msfmKy Oy5frttUcP/Gh1n4xgZLOEdZytgss6616ik5WYebhIxbSA3zBRZgjYo/i i0zBJ0r1sOjGFAcO7ZswUSEZLaCuhB5XsUHUXrJtxkiaXDaE8ihct2q30 S2MMcVv0d/21RsSYb8YPk/FzkAeII8qYpFEpVPL4AsEBNdndkthRC9EF4 Q==; X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="220501420" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Jun 2023 04:20:52 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 26 Jun 2023 04:20:50 -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; Mon, 26 Jun 2023 04:20:48 -0700 From: Conor Dooley To: CC: , , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Albert Ou , Andrew Jones , Heiko Stuebner , "Evan Green" , Sunil V L , , , Subject: [PATCH v1 2/9] RISC-V: drop a needless check in print_isa_ext() Date: Mon, 26 Jun 2023 12:19:40 +0100 Message-ID: <20230626-skydiver-frown-659b982a43ad@wendy> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230626-provable-angrily-81760e8c3cc6@wendy> References: <20230626-provable-angrily-81760e8c3cc6@wendy> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=737; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=W1hk6ucl8KNm2U0fXh/wXmuimq2rclUouXAdbjBH3TA=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDCkzS3zbNKQ3J0nbH6lftSZ2Rnpt8ivbm0VXvk5y+luhUXH4 k/7njlIWBjEOBlkxRZbE230tUuv/uOxw7nkLM4eVCWQIAxenAExkzzdGhpmXL7yX/Km0bOKzqUo5Va ssct7t8czb1rt3rp6Jmsi55gcMf/gOCC7dLrsr2ElpSpft1TnRzJYmoTfWtsj/r/m2sk1IhwkA X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C 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, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769764912851547224?= X-GMAIL-MSGID: =?utf-8?q?1769764912851547224?= isa_ext_arr cannot be empty, as some of the extensions within it are always built into the kernel. Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones --- 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 742bb42e7e86..01f7e5c62997 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -233,10 +233,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))