From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEraj-0001gL-38 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 20:27:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SErah-0006FK-BG for qemu-devel@nongnu.org; Mon, 02 Apr 2012 20:27:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38405 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SErah-0006FF-5B for qemu-devel@nongnu.org; Mon, 02 Apr 2012 20:27:19 -0400 Message-ID: <4F7A43E3.4050608@suse.de> Date: Tue, 03 Apr 2012 02:27:15 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <9f6137506576a94fb95a58143e33db964d9c6a53.1333088411.git.peter.crosthwaite@petalogix.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v1 1/4] SPI: initial support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , paul@codesourcery.com, qemu-devel@nongnu.org, john.williams@petalogix.com, edgar.iglesias@gmail.com Am 03.04.2012 01:57, schrieb Peter Crosthwaite: > On Tue, Apr 3, 2012 at 3:39 AM, Peter Maydell wrote: >> On 30 March 2012 07:37, Peter A. G. Crosthwaite >> 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. >> >=20 > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg