All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState
Date: Fri, 3 Mar 2017 17:54:54 +0100	[thread overview]
Message-ID: <b4b5780b-4604-9577-f42a-8821c4cb18d4@redhat.com> (raw)
In-Reply-To: <f55bb0be-778c-6ded-1564-9b77c4521f52@kaod.org>

On 03.03.2017 15:49, Cédric Le Goater wrote:
> On 03/03/2017 03:13 PM, Thomas Huth wrote:
>> On 03.03.2017 14:37, Cédric Le Goater wrote:
>>> Also use an 'Object *' under the sPAPR machine to hold the RTC
>>> object.
>>
>> The change from TYPE_SYS_BUS_DEVICE to TYPE_DEVICE is certainly a good
>> idea! But what's the advantage of using Object* instead of DeviceState*
>> in sPAPRMachineState ?
> 
> it makes spapr_rtc_create() a little simpler.  
> 
> We could go even further and use a sPAPRRTCState under sPAPRMachineState 
> that we  would initialize with object_initialize(). 

I think a sPAPRRTCState* would make more sense here - if you just see an
Object* and are not familiar with the code, you wonder what this pointer
is all about (and you then have to cast it to something different if you
want to do anything with it) ... so IMHO either a DeviceState* or
sPAPRRTCState* is the better choice here.

 Thomas

  reply	other threads:[~2017-03-03 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 13:37 [Qemu-devel] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState Cédric Le Goater
2017-03-03 14:13 ` Thomas Huth
2017-03-03 14:49   ` Cédric Le Goater
2017-03-03 16:54     ` Thomas Huth [this message]
2017-03-03 17:23       ` Cédric Le Goater
2017-03-05 23:23         ` David Gibson
2017-03-06  7:56           ` Cédric Le Goater
2017-03-06  9:01             ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4b5780b-4604-9577-f42a-8821c4cb18d4@redhat.com \
    --to=thuth@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.