From patchwork Tue Apr 25 12:32:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1773474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=B4CDpBpO; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=fq6ZK+Mz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=boB4044r; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q5Pl55rpsz23s0 for ; Wed, 26 Apr 2023 00:38:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yig3yJnZNfFxeKsFkQJMPtrCSjnR/HBlO89Cj5mPwXM=; b=B4CDpBpOvQWxR4 ledF5ECkXBGcoXkLNg4hTmGLVgyiwTGRUCb+n9FwhIt4Ep+HGTkNHoEVRnCuwf1KJdb+jjd2Crp5h wWjBoAn29/zQlUs98cv8cc5Sej+Z6Ltyz1S/wf22hzrTy2tFZ30gj0pbJ1sHYH2R2bbWnEkP0Koyl +/egYxb25r3hQ6sHhhJYaHwsQ9JftNztrzUvQ5du+xycOA/7DhiON+l2MRKIG+yuXwEk0luxmuLot 9dt/nzbNsGOohxNQU1+B6i0Y3BWdD737JUW8q1XBcpycnP0aTWiugBnf9NWTnbN5sxwwwXx//AZiM Cd0O24EIdGBrntuap+2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prJoZ-001QPU-2d; Tue, 25 Apr 2023 14:38:43 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prJoY-001QOY-1J for opensbi@bombadil.infradead.org; Tue, 25 Apr 2023 14:38:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=KVSk3RwQJ+7lhNcTiLJWTSEKMHebgpm2CU20LVJWQ98=; b=fq6ZK+MzNsNUzOxLEB+3x3VvWr DzFEwJ0C0ZjWBSRQScEt5qJZQI6nL3JrSMaOMBXPQIO5ZzWQD1UNaHqr5dPk+6Fi+yBEHK+6DABzF SP9xy/bL/4p42CalKxnHFNZYq7jENh4txRVre+s5HXIeyEs/b6fiQ1TCZnYbme8p9q3z4FnghsQR1 1PjVz/MSA6IFWIpNFnb2HUu/lm1EcavaUW/AsZ330wg/55R8N3wQ0hBsZ6/MCSlaPw4lvGq2W1CsN ryHh8yp1xLcOqfHsvQBv7oeNKFSVcS94V0H+BKzNgwJ5yyOc6zJkpHOIofBggWJW2B8C8UQ1IQzro kSBf207Q==; Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prHrS-009cv3-1A for opensbi@lists.infradead.org; Tue, 25 Apr 2023 12:33:41 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-38e3a1a07c8so3397996b6e.0 for ; Tue, 25 Apr 2023 05:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1682426012; x=1685018012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KVSk3RwQJ+7lhNcTiLJWTSEKMHebgpm2CU20LVJWQ98=; b=boB4044rebslNMf4q4rjlgoGbPsyDt+tCSg1MDdUUHywJVXX39BfypyU5weWA9BHWy 5WaIFf3LQE/EqS4JJ89R84wZRvYUDGssVB6Mnqth/VbqTmCSg2SmZ+OJZw17BKDN/Fyc Yu7ofduKe6BbMW7DWldINjSl7Kj/yxnap5mbpZp+1BjOoIj7ML6fFPWtw/emSj1e62ww stDYbarjU151aySG6XxtFqaKQmT87HgGUXUoIfELxEtjITVuO+2onx7PtK7zaX5mHzr/ 312EsqImB0mRyZMeRZgRi5Z0qfWP3fLkmSoMSFHfbggHg/GU178gnG5vyNXmJ6hoQBXW Pdmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682426012; x=1685018012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KVSk3RwQJ+7lhNcTiLJWTSEKMHebgpm2CU20LVJWQ98=; b=g/+ZjFT9c+Pgc4sLoP+Zw1eh4kRZ7N3eV6H/22thYY25e7zW7w/Njj02h75Z1bBPOW OHb7/5JS01/mU81hSKpX4xlK+JEfUHYwE9ypW9pTr9mSeAfqRzetfSpBk+yXfkdsOMy3 ufJKc+dD170gbVJsbwGoCYm6YpeuFUoNofqi5tZxxPpTOi5RlFrW0qQUd/yPue209dfD foxYSh7wnKyAhbhVPG3r432IwiSsFvyJjqF0hG8LHBjfnMRvaIrOS9L8JyvhLvu1RqgL qCfp3JdWt4m+SUEbxX6Pvo0OpEk/Lx6/KImTTZtvKG9ALudSfAzrOGxomMy7KMQxW4MP 0igQ== X-Gm-Message-State: AAQBX9d4juDs5u1+GKHGzJ50dWSFE2nE3dJMCXIf4q26YvtSyDJFxD7m jqA0DaMaqgdnQ1zGYh5ebRZfYg== X-Google-Smtp-Source: AKy350aRU5GmTsbaXZGTsCW6M0FYiIZGyWUlknNfLbzpLDmSFWVxIJns+GBUnBK/JUXcLinJFv1pmQ== X-Received: by 2002:a05:6808:5d6:b0:38e:47a5:e4a0 with SMTP id d22-20020a05680805d600b0038e47a5e4a0mr7069323oij.56.1682426012187; Tue, 25 Apr 2023 05:33:32 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id s132-20020acaa98a000000b0038de3f4e375sm5511001oie.23.2023.04.25.05.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 05:33:31 -0700 (PDT) From: Anup Patel To: Atish Patra , Alistair Francis Cc: Anup Patel , opensbi@lists.infradead.org, Anup Patel Subject: [PATCH 16/17] lib: utils/irqchip: Don't check hartid in imsic_update_hartid_table() Date: Tue, 25 Apr 2023 18:02:29 +0530 Message-Id: <20230425123230.3943447-17-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230425123230.3943447-1-apatel@ventanamicro.com> References: <20230425123230.3943447-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_133334_475342_BA842CC1 X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The imsic_map_hartid_to_data() already checks hartid before using so we don't need to check in imsic_update_hartid_table(). Signed-off-by: Anup Patel --- lib/utils/irqchip/fdt_irqchip_imsic.c | 3 --- 1 file changed, 3 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:235 listed in] [list.dnswl.org] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The imsic_map_hartid_to_data() already checks hartid before using so we don't need to check in imsic_update_hartid_table(). Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- lib/utils/irqchip/fdt_irqchip_imsic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/utils/irqchip/fdt_irqchip_imsic.c b/lib/utils/irqchip/fdt_irqchip_imsic.c index d890400..574cadc 100644 --- a/lib/utils/irqchip/fdt_irqchip_imsic.c +++ b/lib/utils/irqchip/fdt_irqchip_imsic.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +43,6 @@ static int irqchip_imsic_update_hartid_table(void *fdt, int nodeoff, err = fdt_parse_hart_id(fdt, cpu_offset, &hartid); if (err) return SBI_EINVAL; - if (SBI_HARTMASK_MAX_BITS <= hartid) - return SBI_EINVAL; switch (hwirq) { case IRQ_M_EXT: