r82600_edac: '&' vs '|' typo
Subsystems (2)
RFC 1/1 r82600_edac: '&' vs '|' typo
This is a shot in the dark. Doing the & here seems like not correct because "0x1 & 0x2" is zero. I think '|' is probably intended because that's often the case with these.
But this is just a guess.
I'd prefer to leave it the same if no one knows for sure what we're trying to do here.
drivers/edac/r82600_edac.c +4 -4
@@ -146,14 +146,14 @@ static void r82600_get_error_info(struct mem_ctl_info *mci,if (info->eapr &BIT (0 ))/* Clear error to allow next error to be reported [p.62] */ pci_write_bits32 (pdev,R82600_EAP , - ((u32 )BIT (0 ) & (u32 )BIT (1 )), - ((u32 )BIT (0 ) & (u32 )BIT (1 ))); + ((u32 )BIT (0 ) | (u32 )BIT (1 )), + ((u32 )BIT (0 ) | (u32 )BIT (1 )));if (info->eapr &BIT (1 ))/* Clear error to allow next error to be reported [p.62] */ pci_write_bits32 (pdev,R82600_EAP , - ((u32 )BIT (0 ) & (u32 )BIT (1 )), - ((u32 )BIT (0 ) & (u32 )BIT (1 ))); + ((u32 )BIT (0 ) | (u32 )BIT (1 )), + ((u32 )BIT (0 ) | (u32 )BIT (1 ))); } static int r82600_process_error_info(struct mem_ctl_info *mci,
Yes, this looks like my error. I still have a copy of the data sheet, but no access to this hardware to test, but this fix looks like what I must have intended.
Tim.
Quoted 32 lines · Dan Carpenter
This is a shot in the dark. Doing the & here seems like not correct because "
0x1&0x2" is zero. I think '|' is probably intended because that's often the case with these.But this is just a guess.
I'd prefer to leave it the same if no one knows for sure what we're trying to do here.
drivers/edac/r82600_edac.c +4
-4@@ -146,14 +146,14 @@ static void r82600_get_error_info(struct mem_ctl_info *mci,if (info->eapr &BIT (0 ))/* Clear error to allow next error to be reported [p.62] */ pci_write_bits32 (pdev,R82600_EAP , - ((u32 )BIT (0 ) & (u32 )BIT (1 )), - ((u32 )BIT (0 ) & (u32 )BIT (1 ))); + ((u32 )BIT (0 ) | (u32 )BIT (1 )), + ((u32 )BIT (0 ) | (u32 )BIT (1 )));if (info->eapr &BIT (1 ))/* Clear error to allow next error to be reported [p.62] */ pci_write_bits32 (pdev,R82600_EAP , - ((u32 )BIT (0 ) & (u32 )BIT (1 )), - ((u32 )BIT (0 ) & (u32 )BIT (1 ))); + ((u32 )BIT (0 ) | (u32 )BIT (1 )), + ((u32 )BIT (0 ) | (u32 )BIT (1 ))); } static int r82600_process_error_info(struct mem_ctl_info *mci,