diff options
author | Yazen Ghannam <yazen.ghannam@amd.com> | 2023-02-14 10:42:22 +0100 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-02-14 17:56:14 +0100 |
commit | 28980db94742f9f2fb0f68ea35f2171b38007bae (patch) | |
tree | d2fef05faaf94b2c6fad5c7902a4ee78abcde628 /drivers/edac | |
parent | c4605bde334367b22bbf43cbbef0d1b7c75433dc (diff) | |
download | linux-stable-28980db94742f9f2fb0f68ea35f2171b38007bae.tar.gz linux-stable-28980db94742f9f2fb0f68ea35f2171b38007bae.tar.bz2 linux-stable-28980db94742f9f2fb0f68ea35f2171b38007bae.zip |
EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive
Reportedly, clang cannot do interprocedural analysis:
https://lore.kernel.org/r/20230213-amd64_edac-wsometimes-uninitialized-v1-1-5bde32b89e02@kernel.org
and see that those arguments won't be used uninitialized.
So, yeah, the code's fine even without this. Normally, such a "fix"
won't be applied but that warning gets automatically enabled in -Wall
builds and when CONFIG_WERROR is set in allmodconfig builds, the build
fails.
So shut it up with a minimal fix as this code will see more
reorganization very soon.
[ bp: Write commit message. ]
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/Y%2BqdVHidnrrKvxiD@dev-arch.thelio-3990X
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/amd64_edac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 1c4bef1cdf28..5b42533f306a 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3928,7 +3928,7 @@ static const struct attribute_group *amd64_edac_attr_groups[] = { static int hw_info_get(struct amd64_pvt *pvt) { - u16 pci_id1, pci_id2; + u16 pci_id1 = 0, pci_id2 = 0; int ret; if (pvt->fam >= 0x17) { |