On Thu, Jun 30, 2011 at 01:42, Jiang, Scott wrote: >> OK, i'll try and get this done this week. in general, i'm trying to >> widdle down the code in the def* and cdef* files to a more standard >> asm/<peripheral>.h header. this keeps global namespace pollution >> down. > > Some macro names are too generic, like DMA32. If it is only for a peripheral, > it should have a prefix.
well, now you're treading into dangerous territory ;). what the new ADI standard that's coming down the pipe is to uniquely prefix everything based on register name and some other qualifiers. but imo, that is hard to read/use. a good example of this i think is the current Blackfin SPI code: http://blackfin.uclinux.org/git/?p=linux-kernel;a=blob;f=arch/blackfin/include/asm/bfin5xx_spi.h http://blackfin.uclinux.org/git/?p=linux-kernel;a=blob;f=drivers/spi/spi_bfin5xx.c any time you start combining multiple values, i think it gets unwieldy fast ... i'm not sure it's necessary. thus i think it's ok to have generic names like DMA32 (if that's what the HRM says the field is of the register) in asm/<peripheral>.h headers. the only way you'll get that is if you include the header, and then it's because you have code that explicitly wants it. -mike _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
