hw/xen: Constify XenLegacyDevice::XenDevOps
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 10 May 2024 09:22:42 +0000 (10:22 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Jun 2024 09:53:43 +0000 (11:53 +0200)
XenDevOps @ops is not updated, mark it const.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Paul Durrant <paul@xen.org>
Message-Id: <20240510104908.76908-3-philmd@linaro.org>

hw/xen/xen-legacy-backend.c
include/hw/xen/xen_pvdev.h

index 6f0b300a421b4d535cb4e9de1b3dd038dbaf8758..33620fe42eef0b7a8aeb404bb7a71d55d7cf934e 100644 (file)
@@ -170,7 +170,7 @@ int xen_be_copy_grant_refs(struct XenLegacyDevice *xendev,
  */
 static struct XenLegacyDevice *xen_be_get_xendev(const char *type, int dom,
                                                  int dev,
-                                                 struct XenDevOps *ops)
+                                                 const struct XenDevOps *ops)
 {
     struct XenLegacyDevice *xendev;
 
index fdf84f47af11efaf59963911ebaaa6ccca0b16db..0c98444047607b2b0be7c127c9fa568252f75758 100644 (file)
@@ -52,7 +52,7 @@ struct XenLegacyDevice {
     xenevtchn_handle   *evtchndev;
     xengnttab_handle   *gnttabdev;
 
-    struct XenDevOps   *ops;
+    const struct XenDevOps *ops;
     QTAILQ_ENTRY(XenLegacyDevice) next;
 };