qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 1/2] qemu/qdev: type safety in reset handler


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCH 1/2] qemu/qdev: type safety in reset handler
Date: Wed, 16 Sep 2009 00:37:54 +0300
User-agent: Mutt/1.5.19 (2009-01-05)

On Tue, Sep 15, 2009 at 11:16:42PM +0200, Paolo Bonzini wrote:
> On 09/15/2009 10:42 PM, Michael S. Tsirkin wrote:
>> On Tue, Sep 15, 2009 at 11:20:25PM +0300, Blue Swirl wrote:
>>> On Tue, Sep 15, 2009 at 5:33 PM, Michael S. Tsirkin<address@hidden>  wrote:
>>>> Add type safety to qdev reset handlers, by declaring them as
>>>> DeviceState * rather than void *.
>>>
>>> The function seems a bit unnecessary,
>>
>> which function?
>>
>>> how about instead:
>>
>> instead of which one?
>>
>>> static void rtl8139_reset(struct DeviceState *d)
>>> {
>>>      RTL8139State *s = container_of(d, RTL8139State, dev.qdev);
>
> He means not introducing pci_rtl8139_reset.
>
> Paolo

Several places in this file use the variant that gets RTL8139State,
to me it seems nicer to have that in a single place.

-- 
MST




reply via email to

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