On Sun, Jan 29, 2006 at 06:54:54PM +0100, Daniele Venzano wrote: > >>+/* Power management capabilities bits */ > >>+enum sis900_cfgpmc_register_bits { > >>+ PMVER = 0x00070000, > >>+ DSI = 0x00100000, > >>+ PMESP = 0xf8000000 > >>+}; > >>+ > >>+enum sis900_pmesp_bits { > >>+ PME_D0 = 0x1, > >>+ PME_D1 = 0x2, > >>+ PME_D2 = 0x4, > >>+ PME_D3H = 0x8, > >>+ PME_D3C = 0x10 > >>+}; > > > >Why not something like this instead? > > > > /* Power management capabilities bits */ > > enum sis900_cfgpmc_register_bits { > > PMVER = 0x00070000, > > DSI = 0x00100000, > > PMESP = 0xf8000000 > > PME_D0 = 0x08000000, > > PME_D1 = 0x10000000, > > PME_D2 = 0x20000000, > > PME_D3H = 0x40000000, > > PME_D3C = 0x80000000 > > }; > > It's really the same and the way it is now is more similar to the way > those bits are explained in the datasheets.
Sure, it's the same. > and the way it is now is more similar to the way those bits are > explained in the datasheets. It doesn't matter much to me, but the advantage is that it avoids the need for shifts -- note how there are 3 mistakes in the line "ret = inl(CFGPMC & PMESP);" and one of them is having forgotten a shift. cheers, Lennert - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html