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

Re: [Xen-devel] [PATCH v3 10/16] xen/arm: move vgic rank data to gic header file



Hi Vijay,

On 15/04/14 12:17, vijay.kilari@xxxxxxxxx wrote:
@@ -117,9 +118,14 @@ void domain_vgic_free(struct domain *d)
  int vcpu_vgic_init(struct vcpu *v)
  {
      int i;
-    memset(&v->arch.vgic.private_irqs, 0, sizeof(v->arch.vgic.private_irqs));

-    spin_lock_init(&v->arch.vgic.private_irqs.lock);
+    v->arch.vgic.private_irqs = xzalloc(struct vgic_irq_rank);
+    if ( v->arch.vgic.private_irqs == NULL )
+      return -ENOMEM;
+
+    memset(v->arch.vgic.private_irqs, 0, sizeof(v->arch.vgic.private_irqs));
+

It's pointless to zeroed the memory here. xzalloc already did the job for you.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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