On 1/13/26 07:47, Akihiko Odaki wrote: >> +void virtio_gpu_virgl_resource_destroy(VirtIOGPU *g, >> + struct >> virtio_gpu_simple_resource *base, >> + Error **errp) > > An error reporting rule described in include/qapi/error.h requires > functions that use Error to return a value indicating success or failure. > > For this particular case, I think it can simply return what > virtio_gpu_virgl_resource_unref() returns, without having errp.
The error reporting arg is added here because resource_destroy() callback of VirtIOGPUClass requires it: ``` vgc->resource_destroy = virtio_gpu_virgl_resource_destroy; ``` The include/qapi/error.h says "Whenever practical, also return a value that indicates success / failure". Hence, the returned value is optional. I don't quite see how errp can be avoided. Perhaps you're meaning to add virtio_gpu_gl_resource_destroy() that will be local to virtio-gpu-gl.c. Will change this in v10, otherwise please clarify more your suggestion. Thanks for the review. -- Best regards, Dmitry
