Skip to content

Commit 28980db

Browse files
yghannambp3tk0v
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/Y%[email protected]
1 parent c4605bd commit 28980db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/edac/amd64_edac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3928,7 +3928,7 @@ static const struct attribute_group *amd64_edac_attr_groups[] = {
39283928

39293929
static int hw_info_get(struct amd64_pvt *pvt)
39303930
{
3931-
u16 pci_id1, pci_id2;
3931+
u16 pci_id1 = 0, pci_id2 = 0;
39323932
int ret;
39333933

39343934
if (pvt->fam >= 0x17) {

0 commit comments

Comments
 (0)