From nobody Tue May 13 13:39:09 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675077961; cv=none; d=zohomail.com; s=zohoarc; b=KIcHJh7luv5sZ+Qharr3EoItwcvhP6AQS+SolEElAGIGeurwcrTwoqBo7vFSgsVMsbaiLYGfcOn4blBchhg0Ur95TUxdx/TigsjmPxvoQUndwzS+p6xhIVrlm1j07qnFxIOcjxWbGYLhcYkaWx+9dzUJ2zku9vubZHMuZ2d97f0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675077961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GVyy6rATcfiYUPM0MkQZkA8NgRAxXFF1471V3qgMy8A=; b=BupESIQKg7rXjY2ja+N4O8SSc8/MOSCV2nQhl5KLr1NWr3JYWOoJFuuBmn6Ldbm+Uutj9GzwQb24/AhxXcyNTfmMKGw0teXMp3C0urq2faSGuhaTeP7ym97JucBi+6oDiFObYXcbU0kC5zAxmKrjBRDGSiZ8k7PcF+wtDCTw8iw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675077961287163.9309696456785; Mon, 30 Jan 2023 03:26:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMSIA-0006WO-Q0; Mon, 30 Jan 2023 06:25:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMSHd-0006US-RZ for qemu-devel@nongnu.org; Mon, 30 Jan 2023 06:25:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMSHW-00083g-C5 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 06:25:04 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-664-Rs4C7BZoNfiJef0o6jy8ug-1; Mon, 30 Jan 2023 06:24:59 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B147985C069 for ; Mon, 30 Jan 2023 11:24:59 +0000 (UTC) Received: from localhost (unknown [10.39.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0341492B01; Mon, 30 Jan 2023 11:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675077901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GVyy6rATcfiYUPM0MkQZkA8NgRAxXFF1471V3qgMy8A=; b=cYB3aITgk2sOE7QM5TfvD/THxvlRMk/zy+9lxoQ+XvaLzwmtD4oJuF9+ui5Wb5wCMBcADO 0ibBBXd7Klf9EVyirIWwPalGWjqd8gJyEjn/yf4XZ3W3mgd9jhTEhm49Hk1MnlP2VZzwun xKNoncGUdlQFlUhbLyBrCmPMATFLHeM= X-MC-Unique: Rs4C7BZoNfiJef0o6jy8ug-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH 06/11] ui: rename cursor_{put->unref} Date: Mon, 30 Jan 2023 15:24:26 +0400 Message-Id: <20230130112431.69559-7-marcandre.lureau@redhat.com> In-Reply-To: <20230130112431.69559-1-marcandre.lureau@redhat.com> References: <20230130112431.69559-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675077962901100003 From: Marc-Andr=C3=A9 Lureau The naming is more conventional in QEMU. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 2 +- hw/display/qxl-render.c | 4 ++-- hw/display/qxl.c | 2 +- hw/display/vmware_vga.c | 4 ++-- ui/cursor.c | 2 +- ui/dbus-listener.c | 2 +- ui/spice-display.c | 4 ++-- ui/vnc.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 8e6cf782a1..ec28402a4f 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -153,7 +153,7 @@ typedef struct QEMUCursor { =20 QEMUCursor *cursor_alloc(int width, int height); void cursor_get(QEMUCursor *c); -void cursor_put(QEMUCursor *c); +void cursor_unref(QEMUCursor *c); QEMUCursor *cursor_builtin_hidden(void); QEMUCursor *cursor_builtin_left_ptr(void); void cursor_print_ascii_art(QEMUCursor *c, const char *prefix); diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index fcfd40c3ac..ec99ec887a 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -290,7 +290,7 @@ static QEMUCursor *qxl_cursor(PCIQXLDevice *qxl, QXLCur= sor *cursor, return c; =20 fail: - cursor_put(c); + cursor_unref(c); return NULL; } =20 @@ -336,7 +336,7 @@ int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt = *ext) } qemu_mutex_lock(&qxl->ssd.lock); if (qxl->ssd.cursor) { - cursor_put(qxl->ssd.cursor); + cursor_unref(qxl->ssd.cursor); } qxl->ssd.cursor =3D c; qxl->ssd.mouse_x =3D cmd->u.set.position.x; diff --git a/hw/display/qxl.c b/hw/display/qxl.c index ec712d3ca2..80ce1e9a93 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -299,7 +299,7 @@ void qxl_spice_reset_cursor(PCIQXLDevice *qxl) qxl->guest_cursor =3D 0; qemu_mutex_unlock(&qxl->track_lock); if (qxl->ssd.cursor) { - cursor_put(qxl->ssd.cursor); + cursor_unref(qxl->ssd.cursor); } qxl->ssd.cursor =3D cursor_builtin_hidden(); } diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 59ae7f74b8..09591fbd39 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -550,12 +550,12 @@ static inline void vmsvga_cursor_define(struct vmsvga= _state_s *s, default: fprintf(stderr, "%s: unhandled bpp %d, using fallback cursor\n", __func__, c->bpp); - cursor_put(qc); + cursor_unref(qc); qc =3D cursor_builtin_left_ptr(); } =20 dpy_cursor_define(s->vga.con, qc); - cursor_put(qc); + cursor_unref(qc); } #endif =20 diff --git a/ui/cursor.c b/ui/cursor.c index 835f0802f9..31b09bf058 100644 --- a/ui/cursor.c +++ b/ui/cursor.c @@ -111,7 +111,7 @@ void cursor_get(QEMUCursor *c) c->refcount++; } =20 -void cursor_put(QEMUCursor *c) +void cursor_unref(QEMUCursor *c) { if (c =3D=3D NULL) return; diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 620d9450cc..cc1054caff 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -346,7 +346,7 @@ static void dbus_cursor_define(DisplayChangeListener *d= cl, c->data, c->width * c->height * 4, TRUE, - (GDestroyNotify)cursor_put, + (GDestroyNotify)cursor_unref, c); =20 qemu_dbus_display1_listener_call_cursor_define( diff --git a/ui/spice-display.c b/ui/spice-display.c index 0616a6982f..161868735b 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -463,7 +463,7 @@ void qemu_spice_cursor_refresh_bh(void *opaque) qemu_mutex_unlock(&ssd->lock); dpy_cursor_define(ssd->dcl.con, c); qemu_mutex_lock(&ssd->lock); - cursor_put(c); + cursor_unref(c); } =20 if (ssd->mouse_x !=3D -1 && ssd->mouse_y !=3D -1) { @@ -765,7 +765,7 @@ static void display_mouse_define(DisplayChangeListener = *dcl, =20 qemu_mutex_lock(&ssd->lock); cursor_get(c); - cursor_put(ssd->cursor); + cursor_unref(ssd->cursor); ssd->cursor =3D c; ssd->hot_x =3D c->hot_x; ssd->hot_y =3D c->hot_y; diff --git a/ui/vnc.c b/ui/vnc.c index d9eacad759..0bdcc3dfce 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1029,7 +1029,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListen= er *dcl, VncDisplay *vd =3D container_of(dcl, VncDisplay, dcl); VncState *vs; =20 - cursor_put(vd->cursor); + cursor_unref(vd->cursor); g_free(vd->cursor_mask); =20 vd->cursor =3D c; --=20 2.39.1