[PATCH 0/3] cxl: Fix issues with g_steal_pointer()

Thomas Huth posted 3 patches 8 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240304104406.59855-1-thuth@redhat.com
Maintainers: Jonathan Cameron <jonathan.cameron@huawei.com>, Fan Ni <fan.ni@samsung.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
include/hw/cxl/cxl_cdat.h    | 17 +++++++++++------
hw/cxl/cxl-cdat.c            |  4 ++--
hw/mem/cxl_type3.c           | 24 ++++++++++++------------
hw/pci-bridge/cxl_upstream.c |  8 ++++----
4 files changed, 29 insertions(+), 24 deletions(-)
[PATCH 0/3] cxl: Fix issues with g_steal_pointer()
Posted by Thomas Huth 8 months, 3 weeks ago
When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher
(which we'll certainly do in the not too distant future), glib adds
type safety checks to the g_steal_pointer() macro. This triggers
errors in the cxl code since the pointer types do not always match
here. Let's fix those errors now so we can switch to a newer version
of the glib in a future version of QEMU.

Thomas Huth (3):
  hw/cxl/cxl-cdat: Fix type of buf in ct3_load_cdat()
  hw/pci-bridge/cxl_upstream: Fix problem with g_steal_pointer()
  hw/mem/cxl_type3: Fix problem with g_steal_pointer()

 include/hw/cxl/cxl_cdat.h    | 17 +++++++++++------
 hw/cxl/cxl-cdat.c            |  4 ++--
 hw/mem/cxl_type3.c           | 24 ++++++++++++------------
 hw/pci-bridge/cxl_upstream.c |  8 ++++----
 4 files changed, 29 insertions(+), 24 deletions(-)

-- 
2.44.0
Re: [PATCH 0/3] cxl: Fix issues with g_steal_pointer()
Posted by Michael Tokarev 8 months, 3 weeks ago
04.03.2024 13:44, Thomas Huth wrote:
> When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher
> (which we'll certainly do in the not too distant future), glib adds
> type safety checks to the g_steal_pointer() macro. This triggers
> errors in the cxl code since the pointer types do not always match
> here. Let's fix those errors now so we can switch to a newer version
> of the glib in a future version of QEMU.

Picked up for qemu-trivial, thank you!

/mjt