2013/6/25 Michal Kazior <michal.kazior@xxxxxxxxx>: > On 25 June 2013 16:52, Rafał Miłecki <zajec5@xxxxxxxxx> wrote: >> I got following problem with the patch: >> CC [M] drivers/bcma/driver_chipcommon_pmu.o >> drivers/bcma/driver_chipcommon_pmu.c: In function ‘bcma_pmu2_pll_init0’: >> drivers/bcma/driver_chipcommon_pmu.c:128:5: warning: large integer implicitly truncated to unsigned type [-Woverflow] >> >> This is caused by: >> mask = ~(BCMA_RES_4314_HT_AVAIL | >> BCMA_RES_4314_MACPHY_CLK_AVAIL); >> >> Any idea why >> u32 mask = ~(BIT(28) | BIT(29)) >> causes that? :| >> >> I could expect that in case of using BIT(31), but not 28/29... > > Are you perhaps compiling for a 64bit target? If so then I you're > dealing with a 64bit bitmask here. Negating ends up as an overflow as > you try to cram it into the 32bit var. Ahh, thanks! Is there any preferred solution for that? u32 mask = (u32)~(BIT(28) | BIT(29)) u32 mask = ~(BIT(28) | BIT(29)) & 0xFFFF ? I guess the first one looks nicer? -- Rafał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html