Don't abuse the fact that -a == ~a + 1. Signed vs unsigned checkers

complain when a is a unsigned type.  So instead use the latter here
and be on our way.

Spotted by: flexlint by way of phk
This commit is contained in:
Warner Losh 2002-10-07 22:58:24 +00:00
parent c5d5c855b7
commit 0a9e69cc6f

View File

@ -88,4 +88,4 @@
#define CARDBUS_MAPREG_MEM_ADDR(mr) \
((mr) & CARDBUS_MAPREG_MEM_ADDR_MASK)
#define CARDBUS_MAPREG_MEM_SIZE(mr) \
(CARDBUS_MAPREG_MEM_ADDR(mr) & -CARDBUS_MAPREG_MEM_ADDR(mr))
(CARDBUS_MAPREG_MEM_ADDR(mr) & (~CARDBUS_MAPREG_MEM_ADDR(mr) + 1))