|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v2 16/19] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() |
Date: | Mon, 13 Feb 2023 18:03:53 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 |
On 13/2/23 17:24, Eric Farman wrote:
On Mon, 2023-02-13 at 17:10 +0100, Philippe Mathieu-Daudé wrote:On 13/2/23 16:51, Philippe Mathieu-Daudé wrote:On 13/2/23 16:29, Eric Farman wrote:On Mon, 2023-02-13 at 08:08 +0100, Philippe Mathieu-Daudé wrote:Use the VFIO_CCW() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/vfio/ccw.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-)
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);If I'm not mistaken, I believe that this (and (un)realize below) could be changed to: CcwDevice *ccw_dev = CCW_DEVICE(dev);Even ...
VFIOCCWDevice *vcdev = VFIO_CCW(dev);Ha, I didn't look to see if we cared about the intermediary ones, but this is true here. (Realize cares a bit, but that's easy enough.)But I somehow got scared to of removing too many casts... Are these paths covered by a "make check-qtest" on a s390x host?They are covered by the Avocado tests :) $ avocado --show=app,console run -t arch:s390x tests/avocadoWoo! Then I'm happy with the big squash then. Reviewed-by: Eric Farman <farman@linux.ibm.com>
Thanks! Posted cleaned v3 here: 20230213170145.45666-1-philmd@linaro.org/">https://lore.kernel.org/qemu-devel/20230213170145.45666-1-philmd@linaro.org/
[Prev in Thread] | Current Thread | [Next in Thread] |