qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [v5 0/2] virtio-gpu: fix error handling and improve consistency
@ 2025-11-24  3:24 Honglei Huang
  2025-11-24  3:24 ` [v5 1/2] virtio-gpu: fix error handling in virgl_cmd_resource_create_blob Honglei Huang
  2025-11-24  3:24 ` [v5 2/2] virtio-gpu: use consistent error checking for virtio_gpu_create_mapping_iov Honglei Huang
  0 siblings, 2 replies; 7+ messages in thread
From: Honglei Huang @ 2025-11-24  3:24 UTC (permalink / raw)
  To: alex.bennee, dmitry.osipenko, odaki, armbru
  Cc: mst, cohuck, pbonzini, qemu-devel, Ray.Huang, Honglei Huang

This series addresses error handling issues in virtio-gpu and improves
code consistency across the virtio-gpu subsystem.

The first patch fixes a critical bug in virgl_cmd_resource_create_blob()
where an inverted error check causes the function to fail when it should
succeed. This is a standalone bug fix that should be backported.

The second patch improves code consistency by unifying the error checking
style for virtio_gpu_create_mapping_iov() across all virtio-gpu files,
following the preferred QEMU coding convention.

Changes since v4:
- Split the single patch into two separate patches for better clarity
- Separated the critical bug fix from the style consistency improvements
- The bug fix (patch 1) can now be easily identified and backported
- The consistency improvements (patch 2) are clearly marked as cleanup

Changes since v3:
- Extended consistency improvements to virtio-gpu-rutabaga.c
- Changed CHECK(!ret) to CHECK(ret >= 0) and CHECK(!result) to
  CHECK(result >= 0) in rutabaga functions for consistency
- Now covers all virtio-gpu files that use virtio_gpu_create_mapping_iov()

Changes since v2:
- Use 'if (ret < 0)' instead of 'if (ret != 0)' following maintainer's
  feedback on preferred QEMU coding style for error checking functions
  that return 0 on success and negative on error
- Updated all similar usages across virtio-gpu files for consistency
- Expanded scope from single function fix to codebase-wide style consistency

Honglei Huang (2):
  virtio-gpu: fix error handling in virgl_cmd_resource_create_blob
  virtio-gpu: use consistent error checking for
    virtio_gpu_create_mapping_iov

 hw/display/virtio-gpu-rutabaga.c | 4 ++--
 hw/display/virtio-gpu-virgl.c    | 4 ++--
 hw/display/virtio-gpu.c          | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-26  2:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24  3:24 [v5 0/2] virtio-gpu: fix error handling and improve consistency Honglei Huang
2025-11-24  3:24 ` [v5 1/2] virtio-gpu: fix error handling in virgl_cmd_resource_create_blob Honglei Huang
2025-11-24 21:28   ` Dmitry Osipenko
2025-11-24  3:24 ` [v5 2/2] virtio-gpu: use consistent error checking for virtio_gpu_create_mapping_iov Honglei Huang
2025-11-24 21:31   ` Dmitry Osipenko
2025-11-25  5:53     ` Honglei Huang
2025-11-26  2:01     ` Honglei Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).