From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUHsK-000697-Px for qemu-devel@nongnu.org; Wed, 08 Jun 2011 08:28:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUHsI-0000px-Jp for qemu-devel@nongnu.org; Wed, 08 Jun 2011 08:28:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUHsI-0000pr-6S for qemu-devel@nongnu.org; Wed, 08 Jun 2011 08:28:42 -0400 Message-ID: <4DEF6AF6.6000805@redhat.com> Date: Wed, 08 Jun 2011 14:28:38 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <0074e8926b2a8c93a8ef6aab9071d3e7e882a6c3.1307528800.git.jan.kiszka@siemens.com> In-Reply-To: <0074e8926b2a8c93a8ef6aab9071d3e7e882a6c3.1307528800.git.jan.kiszka@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/7] msi: Guard msi/msix_write_config with msi_present List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel , "Michael S. Tsirkin" > @@ -1173,12 +1173,8 @@ static int intel_hda_exit(PCIDevice *pci) > static void intel_hda_write_config(PCIDevice *pci, uint32_t addr, > uint32_t val, int len) > { > - IntelHDAState *d = DO_UPCAST(IntelHDAState, pci, pci); > - > pci_default_write_config(pci, addr, val, len); > - if (d->msi) { > - msi_write_config(pci, addr, val, len); > - } > + msi_write_config(pci, addr, val, len); > } Nothing device specific left in there now. If msi_write_config() checks itself whenever msi is enabled or not we could call it from pci_default_write_config(), then zap this function altogether, no? cheers, Gerd