From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36524 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q03kZ-0005ZB-Ov for qemu-devel@nongnu.org; Wed, 16 Mar 2011 23:19:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q03kW-0003vf-JG for qemu-devel@nongnu.org; Wed, 16 Mar 2011 23:19:47 -0400 Received: from ozlabs.org ([203.10.76.45]:40709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q03kW-0003uy-8D for qemu-devel@nongnu.org; Wed, 16 Mar 2011 23:19:44 -0400 Date: Thu, 17 Mar 2011 14:19:35 +1100 From: David Gibson Subject: Re: [Qemu-devel] [PATCH 14/26] Implement the bus structure for PAPR virtual IO Message-ID: <20110317031935.GL1105@yookeroo> References: <1300251423-6715-1-git-send-email-david@gibson.dropbear.id.au> <1300251423-6715-15-git-send-email-david@gibson.dropbear.id.au> <4D8133FB.9090700@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D8133FB.9090700@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: paulus@samba.org, agraf@suse.de, anton@samba.org, qemu-devel@nongnu.org On Wed, Mar 16, 2011 at 05:04:43PM -0500, Anthony Liguori wrote: > On 03/15/2011 11:56 PM, David Gibson wrote: [snip] > >+static int spapr_vio_busdev_init(DeviceState *dev, DeviceInfo *info) > >+{ > >+ VIOsPAPRDeviceInfo *_info = (VIOsPAPRDeviceInfo *)info; > >+ VIOsPAPRDevice *_dev = (VIOsPAPRDevice *)dev; > >+ char *id; > >+ > >+ if (asprintf(&id, "%s@%x", _info->dt_name, _dev->reg)< 0) { > >+ return -1; > >+ } > >+ > >+ _dev->qdev.id = id; > >+ > >+ return _info->init(_dev); > > The C standard actually reserves the _ and __ namespaces for > compilers and system headers. The kernel can get away with it > because it doesn't use system headers but we've had trouble with > this in QEMU. Ok, I was just following the example of the s390 code here. Nonetheless I've changed it. [snip] > >+ if (info->hcalls) > >+ info->hcalls(bus); > > Got a little sloppy with braces here.. Not so much sloppy as just very, very used to the kernel style. [snip] > We have a checkpatch.pl in the tree. I'd suggest using that to get > rid of the rest of the CODING_STYLE issues which I'll stop > commenting on. Yeah, believe it or not I did already fix up a lot of these. I thought I'd got nearly all of them, but obviously not :(. Either that or I did get them and lost the changes in the git mishap I had a while back. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson