From patchwork Tue Dec 31 16:13:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 13923891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 665E7E77188 for ; Tue, 31 Dec 2024 16:14:41 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=FaRRZh1U49d44Od/SaZAF0hwQYsE7kLDS898viCO8es=; b=UN7e3anaPwle6j GAjihb8lwShD0/rHa2Y5ltx4/Mbv5Q+cZu9OPDna76YfO1DcCASAV6lMKTsMxWduNsv0If3nSHrMS s7EiPyomBvNdhT1cf1yOnKT15Ji3doJOukL10fvMQqdxZN7u6M6OcAGbqe2BxMyyWF3p5bq0rvguB jjVWrM3gDZlfj6VL+bw5XBKuBWz/IhxW9VRSY6pAOfvH2KKt6GaHfmq40yiwMvi8plHbHvJDkaYd0 NnWTKec9k6MaQWn8wCcOtQWix0NUOPtbT8x5Y+WorfZAQ24FjFqR+pIjLaSNxF+XfyTOkKI1q6zA+ 5B1jgc+EQb5Xzez1u8lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tSet5-00000007RwM-1p4o; Tue, 31 Dec 2024 16:14:31 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tSest-00000007RtB-2qjM for linux-riscv@lists.infradead.org; Tue, 31 Dec 2024 16:14:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B67725C0163; Tue, 31 Dec 2024 16:13:36 +0000 (UTC) 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?b?Q2zDqW1lbnQgTMOpZ2Vy?= , 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241231_081419_758299_A4F90662 X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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ément Léger Signed-off-by: Rob Herring (Arm) --- 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; - 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); prev = np; @@ -125,11 +125,11 @@ int populate_cache_leaves(unsigned int cpu) break; if (level <= 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 = level; }