From patchwork Mon Sep 23 11:56:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1988567 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=0wxj15MP; 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=CZnwSW+H; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XC1hD4fKzz1xsg for ; Mon, 23 Sep 2024 21:57:32 +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=69YZcBeQ4Kk8N1fm4+GnjQmxZQv/k/SdobwU4RPW3Xs=; b=0wxj15MPEHLBnq n0kxvs3kn2SuZ3DtCL9xKxACKGuL6R5UcD6OBxjSRxjAsWu5dQMT9u/benpjzoMjCpIwAVxTgGwPa 6z3kyAwEDXY0ryqsy9+GQhuxW/yGTrXrMVkBAswFHCrDso+u51Nt4+PxwSdNu4dURRoFYKPCMepY1 TDlCnsd8KKFr1hlw2q9DmGVpilCoyFH6+0fz0EkSdGRilqOyq3ktcgwEquy9DLa/MvusmkMpPTLax k4ENCVd2xrhnhuNeIB3Ca3ZalttpJbTq6cJKMeIq2GEpWCULzB6Jb3ftLbrAJM3btvbEc86TRSmHO XbBcUVCkXRpjzVx+uSNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sshh0-0000000H7Iy-3xn3; Mon, 23 Sep 2024 11:57:26 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sshgy-0000000H7HD-0FaG for opensbi@lists.infradead.org; Mon, 23 Sep 2024 11:57:25 +0000 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7db12af2f31so3549187a12.1 for ; Mon, 23 Sep 2024 04:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1727092643; x=1727697443; darn=lists.infradead.org; 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=FiIOjRfCW4r8Jfu1qKzJo1I7w+qBEjIJquusLfl7jZU=; b=CZnwSW+HejR7A4JFwpxq7/FO040GNsV3KaqAL7XLq7e/nRmC3SXTE5o4ZlTZiTOQNd SviChjPYsOaAFw8Pv/PxpVz8xO4iJ0BXO6kabwjwFOXh8aPIhE/9WTY002Jdbzssnrfg WZcEAeLDi6x7b0bIFzqekxzwwVN0ZH3kYBExR350S9nzpdkO1I/Lg2orM/hZIYFQq70H yH8cvNCrT5TmIiKcKXPsJRxsIkb1r6AmX8IEE0zydnaHR9b9SP2TE6I9B762SDqWXmq/ 3nSm1tCYMp5/VXSkP+YB7LXRhjbSrRJE2sdiW3NUeGHhYKJnpmtxKiGAl0jq9i/AsHLk comw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727092643; x=1727697443; 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=FiIOjRfCW4r8Jfu1qKzJo1I7w+qBEjIJquusLfl7jZU=; b=mqq3mz8ACOtilKF3bLQOjDenKAk7+5Nrl6zwcbmcDAa80EhDWSPmpwGDYxmbcBDY9e jvPM6eEHtk7UKTfqH7Yb4QKkXd7E09wUv/cC2MdU2atZq1+BGvRbR/uevMD9PP4xmCM7 nBXgRz6F2yaqB85+5o+Al0e0LH1vbEuz1K8Qnw4H6VsG1UQn5+zb13X2EqvYLHIpeVd4 r8ewM6JLQbifJfS6/i/d3kEkrzVsYiTR8Ke+aVGjWbSa3hE3eaHKmS4AFN2D8cpkB+tL 72nmoO83yTajkAkuD7/WC/i44ICQpfvMIDAgX/12ODvbEu5CmMN2/pDgqSesfix8mhf4 u7qg== X-Forwarded-Encrypted: i=1; AJvYcCUbQXDsx1DPs/+caFsYcZfe3cCwGB6juKGzXjkW7ct8WfDLNwVUrNMRACe6YF73vjmoNgSKwg7A@lists.infradead.org X-Gm-Message-State: AOJu0Ywswtqe63nuPaWVsNk+ZK/tBdlnP/pb9KDxj0MbXRC6M0tpzwpF iKvTf4msRejysSt/clBqTvsTsw7B9QHf7zdSzEijZG0p/Yz5rQTid+SpQ5xJAh1ffJx00H9pZNv pP0g= X-Google-Smtp-Source: AGHT+IHfjGPb2IrGQkaSISSyOAfyEq+O0Yu8BzlRTXESBrxwr6lsGsxJEMf8KYobZtKjL6N3B9aGow== X-Received: by 2002:a17:90b:80c:b0:2d3:bc5e:8452 with SMTP id 98e67ed59e1d1-2dd7f71b8ebmr14145466a91.32.1727092642984; Mon, 23 Sep 2024 04:57:22 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dd6ef361b0sm9252106a91.44.2024.09.23.04.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 04:57:22 -0700 (PDT) From: Anup Patel To: Atish Patra Cc: Andrew Jones , Anup Patel , opensbi@lists.infradead.org, Anup Patel Subject: [PATCH 4/9] lib: sbi_domain: Make sbi_domain_root_add_memregion() as local function Date: Mon, 23 Sep 2024 17:26:55 +0530 Message-ID: <20240923115700.381916-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240923115700.381916-1-apatel@ventanamicro.com> References: <20240923115700.381916-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_045724_170931_28508B91 X-CRM114-Status: GOOD ( 12.16 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.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 sbi_domain_root_add_memregion() is only used within sbi_domain implementation so make rename and make it a local function. Signed-off-by: Anup Patel --- include/sbi/sbi_domain.h | 10 lib/sbi/sbi_domain.c | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:536 listed in] [list.dnswl.org] 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_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 sbi_domain_root_add_memregion() is only used within sbi_domain implementation so make rename and make it a local function. Signed-off-by: Anup Patel Reviewed-by: Samuel Holland --- include/sbi/sbi_domain.h | 10 ---------- lib/sbi/sbi_domain.c | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index 313ae156..22aa8e50 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -293,16 +293,6 @@ void sbi_domain_dump_all(const char *suffix); int sbi_domain_register(struct sbi_domain *dom, const struct sbi_hartmask *assign_mask); -/** - * Add a memory region to the root domain - * @param reg pointer to the memory region to be added - * - * @return 0 on success - * @return SBI_EALREADY if memory region conflicts with the existing one - * @return SBI_EINVAL otherwise - */ -int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg); - /** * Add a memory range with its flags to the root domain * @param addr start physical address of memory range diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c index 7198e27e..04e70d3b 100644 --- a/lib/sbi/sbi_domain.c +++ b/lib/sbi/sbi_domain.c @@ -590,7 +590,7 @@ int sbi_domain_register(struct sbi_domain *dom, return 0; } -int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg) +static int root_add_memregion(const struct sbi_domain_memregion *reg) { int rc; bool reg_merged; @@ -668,7 +668,7 @@ int sbi_domain_root_add_memrange(unsigned long addr, unsigned long size, (end - pos) : align; sbi_domain_memregion_init(pos, rsize, region_flags, ®); - rc = sbi_domain_root_add_memregion(®); + rc = root_add_memregion(®); if (rc) return rc; pos += rsize;