[RFC] r82600_edac: '&' vs '|' typo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index 2fd6a54..656eab6 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -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,
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux