[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/6] Arm/GICv2: don't needlessly use xzalloc_bytes()

Hi Jan,

On 05/02/2020 13:16, Jan Beulich wrote:
... when plain xzalloc() (which is more type safe) does.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Julien Grall <julien@xxxxxxx>


--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -969,7 +969,7 @@ static void gicv2_add_v2m_frame_to_list(
                nr_spis, V2M_MAX_SPI - V2M_MIN_SPI + 1);
/* Allocate an entry to record new v2m frame information. */
-    v2m_data = xzalloc_bytes(sizeof(struct v2m_data));
+    v2m_data = xzalloc(struct v2m_data);
      if ( !v2m_data )
          panic("GICv2: Cannot allocate memory for v2m frame\n");

Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.