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>,
kernel test robot <lkp@intel.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>,
Palmer Dabbelt <palmer@rivosinc.com>,
Oliver Upton <oliver.upton@linux.dev>,
Akihiko Odaki <akihiko.odaki@daynix.com>,
Gavin Shan <gshan@redhat.com>,
Jeremy Linton <jeremy.linton@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next v2 1/3] cacheinfo: Initialize variables in fetch_cache_info()
Date: Tue, 24 Jan 2023 17:19:07 +0000 [thread overview]
Message-ID: <Y9ATCzWu/YjbZPVE@spud> (raw)
In-Reply-To: <20230124154053.355376-2-pierre.gondois@arm.com>
[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]
On Tue, Jan 24, 2023 at 04:40:46PM +0100, Pierre Gondois wrote:
> Set potentially uninitialized variables to 0. This is particularly
> relevant when CONFIG_ACPI_PPTT is not set.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/all/202301052307.JYt1GWaJ-lkp@intel.com/
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/all/Y86iruJPuwNN7rZw@kili/
> Fixes: 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU")
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks for the quick respin Pierre :)
> ---
> drivers/base/cacheinfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
> index 418a18acc8f9..f6573c335f4c 100644
> --- a/drivers/base/cacheinfo.c
> +++ b/drivers/base/cacheinfo.c
> @@ -424,7 +424,7 @@ int allocate_cache_info(int cpu)
> int fetch_cache_info(unsigned int cpu)
> {
> struct cpu_cacheinfo *this_cpu_ci;
> - unsigned int levels, split_levels;
> + unsigned int levels = 0, split_levels = 0;
> int ret;
>
> if (acpi_disabled) {
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-01-24 17:19 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 [this message]
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
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=Y9ATCzWu/YjbZPVE@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=jeremy.linton@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oliver.upton@linux.dev \
--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