cacheinfo: Remove unused check in init_cache_level()
authorPierre Gondois <pierre.gondois@arm.com>
Tue, 24 Jan 2023 15:40:48 +0000 (16:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2023 15:02:02 +0000 (16:02 +0100)
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.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Link: https://lore.kernel.org/r/20230124154053.355376-4-pierre.gondois@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/cacheinfo.c

index 91677f4d3395de81fb704189feee1224257c77a8..3ba70985e3a2709767f3ec6c682e37a34bb95af0 100644 (file)
@@ -67,9 +67,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