Skip to contentSkip to conversation

xen/perfc: Fix build after commit fc32575968 when CONFIG_PERF_COUNTERS=y

PATCH In review Julien Grall 3 participants 3 messages Sep 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/perfc: Fix build after commit fc32575968 when CONFIG_PERF_COUNTERS=y

The commit fc32575968 "public/sysctl: drop unnecessary typedefs and handles" went a bit too far by replacing all xen_systcl_*_t type to struct xen_sysctl_*.

However, xen_sysctl_perfc_val_t was a typedef on uint32_t and therefore is not associated to a structure.

Use xen_sysctl_perfc_val_t to fix the build when CONFIG_PERF_COUNTERS=y

---
 xen/common/perfc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/common/perfc.c +2 -2
index 76051739a5..067567766a 100644
@@ -153,7 +153,7 @@ void perfc_reset(unsigned char key)
 }
 
 static struct xen_sysctl_perfc_desc perfc_d[NR_PERFCTRS];
-static struct xen_sysctl_perfc_val *perfc_vals;
+static xen_sysctl_perfc_val_t *perfc_vals;
 static unsigned int      perfc_nbr_vals;
 static cpumask_t         perfc_cpumap;
 
@@ -190,7 +190,7 @@ static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc,
         }
 
         xfree(perfc_vals);
-        perfc_vals = xmalloc_array(struct xen_sysctl_perfc_val, perfc_nbr_vals);
+        perfc_vals = xmalloc_array(xen_sysctl_perfc_val_t, perfc_nbr_vals);
     }
 
     if ( guest_handle_is_null(desc) )
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Julien Grall

The commit fc32575968 "public/sysctl: drop unnecessary typedefs and handles" went a bit too far by replacing all xen_systcl_*_t type to struct xen_sysctl_*.

However, xen_sysctl_perfc_val_t was a typedef on uint32_t and therefore is not associated to a structure.

Use xen_sysctl_perfc_val_t to fix the build when CONFIG_PERF_COUNTERS=y

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Julien Grall
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 21.09.17 at 13:35, <[email protected]> wrote:

The commit fc32575968 "public/sysctl: drop unnecessary typedefs and handles" went a bit too far by replacing all xen_systcl_*_t type to struct xen_sysctl_*.

However, xen_sysctl_perfc_val_t was a typedef on uint32_t and therefore is not associated to a structure.

Use xen_sysctl_perfc_val_t to fix the build when CONFIG_PERF_COUNTERS=y

Oops, I'm sorry.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel