From nobody Fri Dec 19 12:29:11 2025 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 6C9A514E2E8 for ; Tue, 31 Dec 2024 16:14:18 +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=1735661658; cv=none; b=aWTdfZkocLO8yBJ7RmxkU4WjxE1CbDzP05gfHcYEtnnjiz6Xvmkc+zca1U9Zr98pOY6uY6HkHfnsBjdh00f93+fc9VYlE7pywc83hnVULAW2UYJcyHoKDvcO6YNiitNdKU26FSAn8YtVEF4CqB4P3K6aPub/JtMg9ewvFItejE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735661658; c=relaxed/simple; bh=J7KTir/8KIL3JI4HLaHABhUNLhSy8/fxpv+djk8Rlkk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PSUJED24gTyvj+VDutNJc+vk6z7ULT4UiTtOBeIMb/7ALbtBWKsjwYc28lYaIa2++VHwBmwQHzMe0f/EExs86/GNhHENIIHwVx2GFcbVzKWsI9muEespG39P13hB5aESUU5bWez8NrgMse+7yRz95vYkiDhBmawpQEvkYN5WD8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=icnYUcHu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="icnYUcHu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CF8BC4CED2; Tue, 31 Dec 2024 16:14:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735661657; bh=J7KTir/8KIL3JI4HLaHABhUNLhSy8/fxpv+djk8Rlkk=; h=From:To:Cc:Subject:Date:From; b=icnYUcHuMLeyd4PXcYn/Pu7xsZrrdR6OAJH0w7pvBJJpILtsxIc8UTWQXtTC0lWgE GYZPV2cfuWVNaLtyrLbWlPLxv9uAjDWrbIGvHXOurRVZLO4Ry6CwPG/3SMCw3nxzjG P5jBuLMx+AqlD29n5mKgg9HaXFbGnOTJcedBskLT3cNf8aDWJyUX/qMV21DKu6eG2/ EKfkcam6ZMn7KcSPAcf58LAyE5HWhqb/YXd6BSEv3sOIQX1eC4jl9Oy+1aRlogvEl6 Wj2JZyJl3kpZPLKHrOF9+8LhXtfUPGuVVuNK5Ti9V1p/xiSUIYJ9kR2ofJB4spnInZ IqRKiP+iVYlFw== From: "Rob Herring (Arm)" To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2] riscv: cacheinfo: Use of_property_present() for non-boolean properties Date: Tue, 31 Dec 2024 10:13:59 -0600 Message-ID: <20241231161400.214307-1-robh@kernel.org> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Reviewed-by: Cl=C3=A9ment L=C3=A9ger Signed-off-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven --- arch/riscv/kernel/cacheinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 2d40736fc37c..26b085dbdd07 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -108,11 +108,11 @@ int populate_cache_leaves(unsigned int cpu) if (!np) return -ENOENT; =20 - if (of_property_read_bool(np, "cache-size")) + if (of_property_present(np, "cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) + if (of_property_present(np, "i-cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); - if (of_property_read_bool(np, "d-cache-size")) + if (of_property_present(np, "d-cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); =20 prev =3D np; @@ -125,11 +125,11 @@ int populate_cache_leaves(unsigned int cpu) break; if (level <=3D levels) break; - if (of_property_read_bool(np, "cache-size")) + if (of_property_present(np, "cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); - if (of_property_read_bool(np, "i-cache-size")) + if (of_property_present(np, "i-cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); - if (of_property_read_bool(np, "d-cache-size")) + if (of_property_present(np, "d-cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); levels =3D level; } --=20 2.45.2