Am 03.04.2012 01:57, schrieb Peter Crosthwaite: > On Tue, Apr 3, 2012 at 3:39 AM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> On 30 March 2012 07:37, Peter A. G. Crosthwaite >> <peter.crosthwa...@petalogix.com> wrote: >>> +typedef struct spi_bus { >>> + BusState qbus; >>> + SPISlave **slaves; >>> + uint8_t num_slaves; >>> + uint8_t cur_slave; >>> +} spi_bus; >> >> CODING_STYLE demands camelcase for type names, so SPIBus. >> > > Ok, I have a related question tho, if camel casing with acronyms, > should a space perhaps be inserted after for readability? As in > SPI_Bus rather than SPIBus.
Negative, we have PCIDevice, I2CSlave, etc. The underscore is used in macro names, such as X86_CPU() vs. X86CPU. If we allow underscores in type names as word separator then sooner or later we'll run into the same ugly uppercase name conflicts that caused the huge'ish CPUState refactoring. .NET avoids four consecutive uppercase letter by writing, e.g., XmlDocument. So far we have rather adopted the older (e.g., Java) model of not lower-casing acronyms. My preference would be for consistency. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg