qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 16/18] qom: optimize qdev_get_canonical_path


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 16/18] qom: optimize qdev_get_canonical_path using a parent link
Date: Fri, 09 Dec 2011 12:13:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

Am 02.12.2011 21:20, schrieb Anthony Liguori:
> The full tree search was a bit unreasonable.
> 
> Signed-off-by: Anthony Liguori <address@hidden>

> diff --git a/hw/qdev.h b/hw/qdev.h
> index 4351e2e..fdab848 100644
> --- a/hw/qdev.h
> +++ b/hw/qdev.h
> @@ -92,6 +92,10 @@ struct DeviceState {
>      uint32_t ref;
>  
>      QTAILQ_HEAD(, DeviceProperty) properties;
> +
> +    /* Do not, under any circumstance, use this parent link below anywhere
> +     * outside of qdev.c.  You have been warned. */
> +    DeviceState *parent;
>  };

I would expect that a warning works better if it tells people _why_
their code will break if they do it anyway (it's not clear to me)

Kevin



reply via email to

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