[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/26] Implement the bus structure for PAPR virt
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 14/26] Implement the bus structure for PAPR virtual IO |
Date: |
Thu, 17 Mar 2011 14:19:35 +1100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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, "address@hidden", _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
- [Qemu-devel] [PATCH 06/26] Correct ppc popcntb logic, implement popcntw and popcntd, (continued)
- [Qemu-devel] [PATCH 14/26] Implement the bus structure for PAPR virtual IO, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 13/26] Start implementing pSeries logical partition machine, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 16/26] Implement hcall based RTAS for pSeries machines, David Gibson, 2011/03/16
- Re: [Qemu-devel] [PATCH 16/26] Implement hcall based RTAS for pSeries machines, Anthony Liguori, 2011/03/16