Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

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

 



On Thu, 2012-08-16 at 19:34 +0300, Avi Kivity wrote:
> On 08/16/2012 07:21 PM, Alex Williamson wrote:
> >>  
> >> +int kvm_device_msix_set_vector(KVMState *s, uint32_t dev_id, uint32_t vector,
> >> +                               int virq)
> >> +{
> >> +    struct kvm_assigned_msix_entry msix_entry = {
> >> +        .assigned_dev_id = dev_id,
> >> +        .gsi = virq,
> >> +        .entry = vector,
> >> +    };
> >> +
> >> +    memset(msix_entry.padding, 0, sizeof(msix_entry.padding));
> > 
> > nit, I think this can be done w/o a memset.  .padding = { 0 }?  Thanks,
> 
> It can be done with a null statement.  The msix_entry initialization
> above zero-initializes all fields that are not mentioned in the initializer.

Yeah, I thought that was probably the case as well.  Thanks for
confirming.  The .padding = 0 in the previous patch could also be
dropped then.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux