[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable
From: |
Eric Farman |
Subject: |
Re: [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable |
Date: |
Mon, 13 Feb 2023 13:40:51 -0500 |
User-agent: |
Evolution 3.46.3 (3.46.3-1.fc37) |
On Mon, 2023-02-13 at 18:01 +0100, Philippe Mathieu-Daudé wrote:
> QOM parenthood relationship is:
>
> VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState
>
> No need to double-cast, call CCW_DEVICE() on VFIOCCWDevice.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
> ---
> hw/vfio/ccw.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index 2ea7b4a63c..cd66b66742 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -314,8 +314,7 @@ static void vfio_ccw_io_notifier_handler(void
> *opaque)
> {
> VFIOCCWDevice *vcdev = opaque;
> struct ccw_io_region *region = vcdev->io_region;
> - S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
> - CcwDevice *ccw_dev = CCW_DEVICE(cdev);
> + CcwDevice *ccw_dev = CCW_DEVICE(vcdev);
> SubchDev *sch = ccw_dev->sch;
> SCHIB *schib = &sch->curr_status;
> SCSW s;
- [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses, Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable, Philippe Mathieu-Daudé, 2023/02/13
- Re: [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable,
Eric Farman <=
- [PATCH v3 4/6] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE(), Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 6/6] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW(), Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 1/6] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT(), Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 3/6] hw/vfio/ccw: Use intermediate S390CCWDevice variable, Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 2/6] hw/vfio/ccw: Simplify using DEVICE() macro, Philippe Mathieu-Daudé, 2023/02/13
- Re: [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses, Philippe Mathieu-Daudé, 2023/02/27