From: Conor Dooley <conor@kernel.org>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Conor Dooley <conor.dooley@microchip.com>,
Dan Carpenter <error27@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Akihiko Odaki <akihiko.odaki@daynix.com>,
Palmer Dabbelt <palmer@rivosinc.com>,
Gavin Shan <gshan@redhat.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next v2 3/3] cacheinfo: Remove unused check in init_cache_level()
Date: Tue, 24 Jan 2023 17:01:04 +0000 [thread overview]
Message-ID: <Y9AO0GDslKS0Hs1c@spud> (raw)
In-Reply-To: <20230124154053.355376-4-pierre.gondois@arm.com>
[-- Attachment #1.1: Type: text/plain, Size: 1249 bytes --]
On Tue, Jan 24, 2023 at 04:40:48PM +0100, Pierre Gondois wrote:
> commit e75d18cecbb3 ("arm64: cacheinfo: Fix incorrect assignment
> of signed error value to unsigned fw_level")
> checks the fw_level value in init_cache_level() in case the value is
> negative.
> Remove this check as the error code is not returned through
> fw_level anymore, and reset fw_level if acpi_get_cache_info()
> failed. This allows to try fetching the cache information from
> clidr_el1.
I dunno anything about clidr_el1, but the mechanics of the change seem
fair. There is a non-acpi path too, which shouldn't return negative
numbers either so LGTM.
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> ---
> arch/arm64/kernel/cacheinfo.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/arm64/kernel/cacheinfo.c b/arch/arm64/kernel/cacheinfo.c
> index bf348b8d321f..c307f69e9b55 100644
> --- a/arch/arm64/kernel/cacheinfo.c
> +++ b/arch/arm64/kernel/cacheinfo.c
> @@ -62,9 +62,6 @@ int init_cache_level(unsigned int cpu)
> fw_level = 0;
> }
>
> - if (fw_level < 0)
> - return fw_level;
> -
> if (level < fw_level) {
> /*
> * some external caches not specified in CLIDR_EL1
> --
> 2.25.1
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-01-24 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 15:40 [PATCH -next v2 0/3] cacheinfo: Fix misbehaviours around init_cache_level() Pierre Gondois
2023-01-24 15:40 ` [PATCH -next v2 1/3] cacheinfo: Initialize variables in fetch_cache_info() Pierre Gondois
2023-01-24 17:19 ` Conor Dooley
2023-01-24 15:40 ` [PATCH -next v2 2/3] cacheinfo: Make default acpi_get_cache_info() return an error Pierre Gondois
2023-01-24 17:15 ` Conor Dooley
2023-01-24 15:40 ` [PATCH -next v2 3/3] cacheinfo: Remove unused check in init_cache_level() Pierre Gondois
2023-01-24 17:01 ` Conor Dooley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9AO0GDslKS0Hs1c@spud \
--to=conor@kernel.org \
--cc=akihiko.odaki@daynix.com \
--cc=catalin.marinas@arm.com \
--cc=conor.dooley@microchip.com \
--cc=error27@gmail.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=gshan@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=palmer@rivosinc.com \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).