Patchwork hw/escc: Drop duplicate definition of 'disabled' property

login
register
mail settings
Submitter Peter Maydell
Date July 24, 2012, 2:10 p.m.
Message ID <1343139027-23659-1-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/172885/
State New
Headers show

Comments

Peter Maydell - July 24, 2012, 2:10 p.m.
Drop a duplicate definition of the 'disabled' property from
the escc qdev property list: this redefinition is currently
effectively ignored but will become an error. (The duplication
was inadvertently introduced in 2009 in commit ec02f7dec2.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Other than the armv7m_nvic, this is the only other case of an
attempt to set a duplicate property that I could find in my
"start every machine QEMU implements" test...

 hw/escc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Andreas Färber - July 24, 2012, 2:15 p.m.
Am 24.07.2012 16:10, schrieb Peter Maydell:
> Drop a duplicate definition of the 'disabled' property from
> the escc qdev property list: this redefinition is currently
> effectively ignored but will become an error. (The duplication
> was inadvertently introduced in 2009 in commit ec02f7dec2.)
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

The mentioned commit turned 7 properties into 8, so it's no typo.

Acked-by: Andreas Färber <afaerber@suse.de>

/-F

> ---
> Other than the armv7m_nvic, this is the only other case of an
> attempt to set a duplicate property that I could find in my
> "start every machine QEMU implements" test...
> 
>  hw/escc.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/escc.c b/hw/escc.c
> index 4d8a8e8..e1f5e73 100644
> --- a/hw/escc.c
> +++ b/hw/escc.c
> @@ -905,7 +905,6 @@ static Property escc_properties[] = {
>      DEFINE_PROP_UINT32("frequency", SerialState, frequency,   0),
>      DEFINE_PROP_UINT32("it_shift",  SerialState, it_shift,    0),
>      DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
> -    DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
>      DEFINE_PROP_UINT32("chnBtype",  SerialState, chn[0].type, 0),
>      DEFINE_PROP_UINT32("chnAtype",  SerialState, chn[1].type, 0),
>      DEFINE_PROP_CHR("chrB", SerialState, chn[0].chr),
>
Blue Swirl - July 28, 2012, 12:16 p.m.
Thanks, applied.

On Tue, Jul 24, 2012 at 2:10 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> Drop a duplicate definition of the 'disabled' property from
> the escc qdev property list: this redefinition is currently
> effectively ignored but will become an error. (The duplication
> was inadvertently introduced in 2009 in commit ec02f7dec2.)
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Other than the armv7m_nvic, this is the only other case of an
> attempt to set a duplicate property that I could find in my
> "start every machine QEMU implements" test...
>
>  hw/escc.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/hw/escc.c b/hw/escc.c
> index 4d8a8e8..e1f5e73 100644
> --- a/hw/escc.c
> +++ b/hw/escc.c
> @@ -905,7 +905,6 @@ static Property escc_properties[] = {
>      DEFINE_PROP_UINT32("frequency", SerialState, frequency,   0),
>      DEFINE_PROP_UINT32("it_shift",  SerialState, it_shift,    0),
>      DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
> -    DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
>      DEFINE_PROP_UINT32("chnBtype",  SerialState, chn[0].type, 0),
>      DEFINE_PROP_UINT32("chnAtype",  SerialState, chn[1].type, 0),
>      DEFINE_PROP_CHR("chrB", SerialState, chn[0].chr),
> --
> 1.7.5.4
>

Patch

diff --git a/hw/escc.c b/hw/escc.c
index 4d8a8e8..e1f5e73 100644
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -905,7 +905,6 @@  static Property escc_properties[] = {
     DEFINE_PROP_UINT32("frequency", SerialState, frequency,   0),
     DEFINE_PROP_UINT32("it_shift",  SerialState, it_shift,    0),
     DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
-    DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
     DEFINE_PROP_UINT32("chnBtype",  SerialState, chn[0].type, 0),
     DEFINE_PROP_UINT32("chnAtype",  SerialState, chn[1].type, 0),
     DEFINE_PROP_CHR("chrB", SerialState, chn[0].chr),