[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 40/58] mptsas: Move QOM macros to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 40/58] mptsas: Move QOM macros to header |
Date: |
Wed, 19 Aug 2020 20:12:18 -0400 |
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2: new patch in series v2
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>
Cc: qemu-devel@nongnu.org
---
hw/scsi/mptsas.h | 6 +++++-
hw/scsi/mptsas.c | 5 -----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/scsi/mptsas.h b/hw/scsi/mptsas.h
index 0436a33911..9ac98fc20e 100644
--- a/hw/scsi/mptsas.h
+++ b/hw/scsi/mptsas.h
@@ -11,9 +11,13 @@
#define MPTSAS_MAXIMUM_CHAIN_DEPTH 0x22
-typedef struct MPTSASState MPTSASState;
typedef struct MPTSASRequest MPTSASRequest;
+#define TYPE_MPTSAS1068 "mptsas1068"
+typedef struct MPTSASState MPTSASState;
+#define MPT_SAS(obj) \
+ OBJECT_CHECK(MPTSASState, (obj), TYPE_MPTSAS1068)
+
enum {
DOORBELL_NONE,
DOORBELL_WRITE,
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 14cbed84d0..135e7d96e4 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -42,11 +42,6 @@
#define NAA_LOCALLY_ASSIGNED_ID 0x3ULL
#define IEEE_COMPANY_LOCALLY_ASSIGNED 0x525400
-#define TYPE_MPTSAS1068 "mptsas1068"
-
-#define MPT_SAS(obj) \
- OBJECT_CHECK(MPTSASState, (obj), TYPE_MPTSAS1068)
-
#define MPTSAS1068_PRODUCT_ID \
(MPI_FW_HEADER_PID_FAMILY_1068_SAS | \
MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI | \
--
2.26.2
- Re: [PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header, (continued)
- [PATCH v2 36/58] piix: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 37/58] auxbus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 38/58] rocker: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 39/58] pxa2xx: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 40/58] mptsas: Move QOM macros to header,
Eduardo Habkost <=
- [PATCH v2 41/58] kvm: Move QOM macros to kvm.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 42/58] vfio/pci: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object *., Eduardo Habkost, 2020/08/19
- [PATCH v2 45/58] qom: Allow class type name to be specified in OBJECT_DECLARE*, Eduardo Habkost, 2020/08/19
- [PATCH v2 47/58] qom: Make type checker functions accept const pointers, Eduardo Habkost, 2020/08/19