Patchwork [4/9] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF_2

login
register
mail settings
Submitter Luiz Capitulino
Date July 18, 2012, 5:49 p.m.
Message ID <1342633760-351-5-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/171770/
State New
Headers show

Comments

Luiz Capitulino - July 18, 2012, 5:49 p.m.
The error class name is PropertyValueNotPowerOf2, not PropertyValueNotPowerOf_2.

Rename the QERR_PROPERTY_VALUE_NOT_POWER_OF_2 macro to
QERR_PROPERTY_VALUE_NOT_POWER_OF2 to reflect that, so that future error macro
generation generates the expected macro name.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/qdev-properties.c | 2 +-
 qerror.c             | 2 +-
 qerror.h             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 3571cf3..38f78b3 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -885,7 +885,7 @@  static void set_blocksize(Object *obj, Visitor *v, void *opaque,
 
     /* We rely on power-of-2 blocksizes for bitmasks */
     if ((value & (value - 1)) != 0) {
-        error_set(errp, QERR_PROPERTY_VALUE_NOT_POWER_OF_2,
+        error_set(errp, QERR_PROPERTY_VALUE_NOT_POWER_OF2,
                   dev->id?:"", name, (int64_t)value);
         return;
     }
diff --git a/qerror.c b/qerror.c
index 132ab2d..e09c410 100644
--- a/qerror.c
+++ b/qerror.c
@@ -245,7 +245,7 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Property '%(device).%(property)' can't find value '%(value)'",
     },
     {
-        .error_fmt = QERR_PROPERTY_VALUE_NOT_POWER_OF_2,
+        .error_fmt = QERR_PROPERTY_VALUE_NOT_POWER_OF2,
         .desc      = "Property '%(device).%(property)' doesn't take "
                      "value '%(value)', it's not a power of 2",
     },
diff --git a/qerror.h b/qerror.h
index 27ce395..58d0295 100644
--- a/qerror.h
+++ b/qerror.h
@@ -205,7 +205,7 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_PROPERTY_VALUE_NOT_FOUND \
     "{ 'class': 'PropertyValueNotFound', 'data': { 'device': %s, 'property': %s, 'value': %s } }"
 
-#define QERR_PROPERTY_VALUE_NOT_POWER_OF_2 \
+#define QERR_PROPERTY_VALUE_NOT_POWER_OF2 \
     "{ 'class': 'PropertyValueNotPowerOf2', 'data': { " \
     "'device': %s, 'property': %s, 'value': %"PRId64" } }"