qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port
Date: Thu, 25 Jul 2013 15:23:59 +0300

On Thu, Jul 25, 2013 at 02:03:33PM +0200, Gerd Hoffmann wrote:
> On 07/25/13 13:22, Michael S. Tsirkin wrote:
> > On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote:
> >>   Hi,
> >>
> >>> I can change the implementation but I don't think it's
> >>> a good idea to copy property names around:
> >>> it's too fragile, compiler won't warn us if we
> >>> change the name or value semantics,
> >>
> >> I'm not worried.  Changing the strings will break the command line
> >> interface too (qemu -device pvpanic,ioport=...), so that isn't going to
> >> happen.
> >>
> >> cheers,
> >>   Gerd
> > 
> > What will catch this breakage?
> > There are 0 users actually tweaking the port
> > number so I'm sure no one will notice this.
> > 
> > In any case, catching errors at compile time
> > is much better than at runtime.
> > 
> > What exactly are advantages of duplicating
> > property names in this way? I don't see any.
> 
> You don't need access to pvpanic internals then and thus the code can be
> moved over to the acpi generator.  At least in this case where all info
> needed is already available via properties.
> 
> cheers,
>   Gerd

We'll have to disagree here.
There's no access to internals with an API.
I prefer using APIs, since they are compiler-checked.

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]