Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hRq1b-0000fx-Js for mharc-qemu-trivial@gnu.org; Fri, 17 May 2019 23:28:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRq1Z-0000dM-LV for qemu-trivial@nongnu.org; Fri, 17 May 2019 23:28:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRq1Y-00039r-Mx for qemu-trivial@nongnu.org; Fri, 17 May 2019 23:28:41 -0400 Received: from m12-18.163.com ([220.181.12.18]:41004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRq1W-00036t-51; Fri, 17 May 2019 23:28:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=lEt432YQhPlz0GLMEz gULiVC576SIEeGv9BeGhl/DjA=; b=UW5PnO7d5QCNDiQEBvgy3QarxwLpNpYKfX haoNYQXLuHLeFsky/ytbo2mBSWqedWCy1haE2MI68B76NiqVIPmAwsROz+XlooGP vkgxUUVjzfA9Ma9Q3sC2kQWDAVPRoD3GqN2fzIjLVm0DidYD0e8Qptm6S55xtcei qX+DWFNZI= Received: from localhost.localdomain (unknown [183.159.73.182]) by smtp14 (Coremail) with SMTP id EsCowACXzsrXe99czqL5Gg--.37649S5; Sat, 18 May 2019 11:28:35 +0800 (CST) From: Li Qiang To: alex.williamson@redhat.com, lvivier@redhat.com Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, liq3ea@gmail.com, philmd@redhat.com, Li Qiang Date: Fri, 17 May 2019 20:28:11 -0700 Message-Id: <20190518032811.60341-4-liq3ea@163.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190518032811.60341-1-liq3ea@163.com> References: <20190518032811.60341-1-liq3ea@163.com> X-CM-TRANSID: EsCowACXzsrXe99czqL5Gg--.37649S5 X-Coremail-Antispam: 1Uf129KBjvJXoW7WF15ur4DJFy7tFWkAw4xZwb_yoW8Gw1rpF Z8CF9Ykr4Fqw1xCrsavr4avF17JF4kWr129F4vg3yjya1xGas5Jw4DKFy7u348XFZYvFyF 9r9rA345tF1rZr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UN6p9UUUUU= X-Originating-IP: [183.159.73.182] X-CM-SenderInfo: 5oltjvrd6rljoofrz/xtbBawG4bVetvcf8zAABsO X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 220.181.12.18 Subject: [Qemu-trivial] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 May 2019 03:28:42 -0000 CC: qemu-trivial@nongnu.org Signed-off-by: Li Qiang --- hw/pci/msix.c | 2 -- hw/vfio/pci.c | 2 -- include/hw/pci/msix.h | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 4e336416a7..d39dcf32e8 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -24,8 +24,6 @@ #include "qapi/error.h" #include "trace.h" -#define MSIX_CAP_LENGTH 12 - /* MSI enable bit and maskall bit are in byte 1 in FLAGS register */ #define MSIX_CONTROL_OFFSET (PCI_MSIX_FLAGS + 1) #define MSIX_ENABLE_MASK (PCI_MSIX_FLAGS_ENABLE >> 8) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 08729e5875..8e555db12e 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -35,8 +35,6 @@ #include "trace.h" #include "qapi/error.h" -#define MSIX_CAP_LENGTH 12 - #define TYPE_VFIO_PCI "vfio-pci" #define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI) diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 1f27658d35..08acfa836e 100644 --- a/include/hw/pci/msix.h +++ b/include/hw/pci/msix.h @@ -4,6 +4,8 @@ #include "qemu-common.h" #include "hw/pci/pci.h" +#define MSIX_CAP_LENGTH 12 + void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg); MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector); int msix_init(PCIDevice *dev, unsigned short nentries, -- 2.17.1