Skip to contentSkip to conversation

qtest/ahci: Fix clang 3.5.0 error

PATCH Applied John Snow 3 participants 4 messages Mar 17, 2015 – Mar 19, 2015

lore
Share & tools
lore

John Snow

author
#0 lore raw

PATCH 1/1 qtest/ahci: Fix clang 3.5.0 error

A thinko that clang 3.5.0 caught.
Thankfully does not introduce any new failures.

---
 tests/ahci-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/ahci-test.c +1 -1
index cf0b98b..169e83b 100644
@@ -583,7 +583,7 @@ static void ahci_test_port_spec(AHCIQState *ahci, uint8_t port)
         ASSERT_BIT_CLEAR(reg, AHCI_PX_CMD_MPSP);
     }
     /* If, via CPD or MPSP we detect a drive, HPCP must be on. */
-    if (BITANY(reg, AHCI_PX_CMD_CPD || AHCI_PX_CMD_MPSP)) {
+    if (BITANY(reg, AHCI_PX_CMD_CPD | AHCI_PX_CMD_MPSP)) {
         ASSERT_BIT_SET(reg, AHCI_PX_CMD_HPCP);
     }
     /* HPCP and ESP cannot both be active. */
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · John Snow

A thinko that clang 3.5.0 caught.
Thankfully does not introduce any new failures.

How you caught the bug is interesting enough to be mentioned in the commit message, but the nature of the bug surely is more interesting than that. Suggest to change the subject to

qtest/ahci: Fix a bit mask expression

Perhaps it can be fixed up on commit.

author
#2 lore raw
Quoted 11 lines · Markus Armbruster
Quoted 4 lines · John Snow

A thinko that clang 3.5.0 caught.
Thankfully does not introduce any new failures.

How you caught the bug is interesting enough to be mentioned in the commit message, but the nature of the bug surely is more interesting than that. Suggest to change the subject to

Quoted 6 lines

qtest/ahci: Fix a bit mask expression

Perhaps it can be fixed up on commit.

If it goes in through trivial,

can we change this to Markus's suggestion?

Thank you,
--js

#3 lore raw
In reply to John Snow
Quoted 2 lines · John Snow

A thinko that clang 3.5.0 caught.
Thankfully does not introduce any new failures.

Applied to trivial, changing subject to the one suggested by Markus.

Thanks,

/mjt