diff --git a/sys/dev/cardbus/cardbusreg.h b/sys/dev/cardbus/cardbusreg.h index ec3157e4780e..c356323d2125 100644 --- a/sys/dev/cardbus/cardbusreg.h +++ b/sys/dev/cardbus/cardbusreg.h @@ -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))