From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector Date: Thu, 16 Aug 2012 19:34:18 +0300 Message-ID: <502D210A.8000800@redhat.com> References: <1345134065.4683.471.camel@ul30vt.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , Marcelo Tosatti , kvm@vger.kernel.org To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3529 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030387Ab2HPSW5 (ORCPT ); Thu, 16 Aug 2012 14:22:57 -0400 In-Reply-To: <1345134065.4683.471.camel@ul30vt.home> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- error compiling committee.c: too many arguments to function