Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
---
src/conf/device_conf.c | 6 +++---
src/conf/device_conf.h | 4 ----
src/conf/domain_addr.c | 2 +-
src/util/virccw.h | 3 +++
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index 92b908b2e6..bdc9219f84 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -261,9 +261,9 @@ virPCIDeviceAddressFormat(virBuffer *buf,
bool
virDomainDeviceCCWAddressIsValid(virCCWDeviceAddress *addr)
{
- return addr->cssid <= VIR_DOMAIN_DEVICE_CCW_MAX_CSSID &&
- addr->ssid <= VIR_DOMAIN_DEVICE_CCW_MAX_SSID &&
- addr->devno <= VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO;
+ return addr->cssid <= VIR_CCW_DEVICE_MAX_CSSID &&
+ addr->ssid <= VIR_CCW_DEVICE_MAX_SSID &&
+ addr->devno <= VIR_CCW_DEVICE_MAX_DEVNO;
}
int
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index 950d333e2e..5c4b7b2f8e 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -70,10 +70,6 @@ struct _virDomainDeviceVirtioSerialAddress {
unsigned int port;
};
-#define VIR_DOMAIN_DEVICE_CCW_MAX_CSSID 254
-#define VIR_DOMAIN_DEVICE_CCW_MAX_SSID 3
-#define VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO 65535
-
typedef struct _virDomainDeviceCcidAddress virDomainDeviceCcidAddress;
struct _virDomainDeviceCcidAddress {
unsigned int controller;
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 7dd26c3271..65b438f13c 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1309,7 +1309,7 @@ virDomainCCWAddressIncrement(virCCWDeviceAddress *addr)
virCCWDeviceAddress ccwaddr = *addr;
/* We are not touching subchannel sets and channel subsystems */
- if (++ccwaddr.devno > VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO)
+ if (++ccwaddr.devno > VIR_CCW_DEVICE_MAX_DEVNO)
return -1;
*addr = ccwaddr;
diff --git a/src/util/virccw.h b/src/util/virccw.h
index 127359c299..c3a47127f1 100644
--- a/src/util/virccw.h
+++ b/src/util/virccw.h
@@ -22,6 +22,9 @@
#include "internal.h"
+#define VIR_CCW_DEVICE_MAX_CSSID 254
+#define VIR_CCW_DEVICE_MAX_SSID 3
+#define VIR_CCW_DEVICE_MAX_DEVNO 65535
#define VIR_CCW_DEVICE_ADDRESS_FMT "%x.%x.%04x"
typedef struct _virCCWDeviceAddress virCCWDeviceAddress;
--
2.33.1