qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/2] hw: arm: Set vendor property for IMX SDHCI emulations


From: Peter Maydell
Subject: Re: [PATCH v2 2/2] hw: arm: Set vendor property for IMX SDHCI emulations
Date: Mon, 15 Jun 2020 14:18:00 +0100

On Wed, 3 Jun 2020 at 15:53, Guenter Roeck <linux@roeck-us.net> wrote:
>
> Set vendor property to IMX to enable IMX specific functionality
> in sdhci code.
>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Added missing error checks
>     Added Philippe's Tested-by: tag
>
>  hw/arm/fsl-imx25.c  | 6 ++++++
>  hw/arm/fsl-imx6.c   | 6 ++++++
>  hw/arm/fsl-imx6ul.c | 2 ++
>  hw/arm/fsl-imx7.c   | 2 ++
>  4 files changed, 16 insertions(+)
>
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index cdaa79c26b..a853ffcc00 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -274,6 +274,12 @@ static void fsl_imx25_realize(DeviceState *dev, Error 
> **errp)
>                                   &err);
>          object_property_set_uint(OBJECT(&s->esdhc[i]), 
> IMX25_ESDHC_CAPABILITIES,
>                                   "capareg", &err);
> +        object_property_set_uint(OBJECT(&s->esdhc[i]), SDHCI_VENDOR_IMX,
> +                                 "vendor", &err);
> +        if (err) {
> +            error_propagate(errp, err);
> +            return;
> +        }

The existing error handling in this function is wrong -- for multiple
calls that take a pointer to a local Error*, the
check-and-error_propagate() has to be done after each call, it can't
be rolled up into a single check after all the calls. (see
include/qapi/error.h for the patterns that are valid).

On the other hand this change is correct-in-itself so I guess it
isn't making the problem worse...

thanks
-- PMM



reply via email to

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