From mboxrd@z Thu Jan 1 00:00:00 1970 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 B3B5C256C61; Wed, 5 Mar 2025 18:19:43 +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=1741198783; cv=none; b=GiA5NrdB0f3lnCgSgGKmaLGUquy962fsYoNn7hmDEh5b5TAPy6hm3WaBlwyHb194yu1RfjeB3xX4mS2wAxpU7FWm4O5iZ59F1e9uoqzgs/GkS82LWUYhYMiOTZ9jL1jJgaUqqAova7OIgLqLLv/k2HtyFe2qwl1rOF0KLRqtnlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741198783; c=relaxed/simple; bh=WDXxnfjpAqVq0no40ShDP8jLA2Vp/4k0cKGQXyuN+4Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qfJ16LnmkwJzuSDy1CGjtshWFHeHsuuXt6jjxqyBS0/Bil1TR8hmkZy7Xs2EuPopNOmlI5nJVVoHL5yjKBUVtfoc35ERe8dBCaZD3gBNjVkItgQPcUIwOP0cVxaVr1zBpWeeaBty0fPYg/vRSUYaU5dSUWXd76OzCi82klA34Rw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GkESHHeX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GkESHHeX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D0A6C4CED1; Wed, 5 Mar 2025 18:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741198783; bh=WDXxnfjpAqVq0no40ShDP8jLA2Vp/4k0cKGQXyuN+4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GkESHHeX787L3em36wraCLa61/WAU5MteNqWQRgc8x0GHFIrfGUaiMkIyEVX9WBIY 9iGD/K8f18eQZDJQG2/wO4t1Tba7DU/gNSrXUj4v23hiwQ6Ml2cPxuaOrSXH8p4AhA gwlEJMS2qXEgu+0on+gEPSdHPIGT0FrXsPa6qX6c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Rob Herring (Arm)" , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Palmer Dabbelt Subject: [PATCH 6.13 146/157] riscv: cacheinfo: Use of_property_present() for non-boolean properties Date: Wed, 5 Mar 2025 18:49:42 +0100 Message-ID: <20250305174511.166168892@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250305174505.268725418@linuxfoundation.org> References: <20250305174505.268725418@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rob Herring commit fb8179ce2996bffaa36a04e2b6262843b01b7565 upstream. The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) Reviewed-by: Clément Léger Cc: stable@vger.kernel.org Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") Link: https://lore.kernel.org/r/20241104190314.270095-1-robh@kernel.org Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/kernel/cacheinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -108,11 +108,11 @@ int populate_cache_leaves(unsigned int c 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 c 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; }