* [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro
@ 2024-08-01 10:25 Peter Maydell
2024-08-01 11:34 ` Markus Armbruster
2024-08-01 11:52 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2024-08-01 10:25 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Markus Armbruster
In commit bb71846325e23 we added some macro magic to avoid
variable-shadowing when using some of our more complicated
macros. One of the internal components of this is a macro
named MAKE_IDENTFIER. Fix the typo in its name: it should
be MAKE_IDENTIFIER.
Commit created with
sed -i -e 's/MAKE_IDENTFIER/MAKE_IDENTIFIER/g' include/qemu/*.h include/qapi/qmp/qobject.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/qapi/qmp/qobject.h | 2 +-
include/qemu/atomic.h | 2 +-
include/qemu/compiler.h | 2 +-
include/qemu/osdep.h | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index 89b97d88bca..256d782688c 100644
--- a/include/qapi/qmp/qobject.h
+++ b/include/qapi/qmp/qobject.h
@@ -54,7 +54,7 @@ struct QObject {
typeof(obj) _obj = (obj); \
_obj ? container_of(&_obj->base, QObject, base) : NULL; \
})
-#define QOBJECT(obj) QOBJECT_INTERNAL((obj), MAKE_IDENTFIER(_obj))
+#define QOBJECT(obj) QOBJECT_INTERNAL((obj), MAKE_IDENTIFIER(_obj))
/* Required for qobject_to() */
#define QTYPE_CAST_TO_QNull QTYPE_QNULL
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index dc4118ddd9e..7a3f2e6576b 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -128,7 +128,7 @@
_val; \
})
#define qatomic_rcu_read(ptr) \
- qatomic_rcu_read_internal((ptr), MAKE_IDENTFIER(_val))
+ qatomic_rcu_read_internal((ptr), MAKE_IDENTIFIER(_val))
#define qatomic_rcu_set(ptr, i) do { \
qemu_build_assert(sizeof(*ptr) <= ATOMIC_REG_SIZE); \
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 554c5ce7df7..c06954ccb41 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -38,7 +38,7 @@
#endif
/* Expands into an identifier stemN, where N is another number each time */
-#define MAKE_IDENTFIER(stem) glue(stem, __COUNTER__)
+#define MAKE_IDENTIFIER(stem) glue(stem, __COUNTER__)
#ifndef likely
#define likely(x) __builtin_expect(!!(x), 1)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 720ed21a7e4..38a127a699e 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -399,7 +399,7 @@ void QEMU_ERROR("code path is reachable")
})
#undef MIN
#define MIN(a, b) \
- MIN_INTERNAL((a), (b), MAKE_IDENTFIER(_a), MAKE_IDENTFIER(_b))
+ MIN_INTERNAL((a), (b), MAKE_IDENTIFIER(_a), MAKE_IDENTIFIER(_b))
#define MAX_INTERNAL(a, b, _a, _b) \
({ \
@@ -408,7 +408,7 @@ void QEMU_ERROR("code path is reachable")
})
#undef MAX
#define MAX(a, b) \
- MAX_INTERNAL((a), (b), MAKE_IDENTFIER(_a), MAKE_IDENTFIER(_b))
+ MAX_INTERNAL((a), (b), MAKE_IDENTIFIER(_a), MAKE_IDENTIFIER(_b))
#ifdef __COVERITY__
# define MIN_CONST(a, b) ((a) < (b) ? (a) : (b))
@@ -440,7 +440,7 @@ void QEMU_ERROR("code path is reachable")
_a == 0 ? _b : (_b == 0 || _b > _a) ? _a : _b; \
})
#define MIN_NON_ZERO(a, b) \
- MIN_NON_ZERO_INTERNAL((a), (b), MAKE_IDENTFIER(_a), MAKE_IDENTFIER(_b))
+ MIN_NON_ZERO_INTERNAL((a), (b), MAKE_IDENTIFIER(_a), MAKE_IDENTIFIER(_b))
/*
* Round number down to multiple. Safe when m is not a power of 2 (see
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro
2024-08-01 10:25 [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro Peter Maydell
@ 2024-08-01 11:34 ` Markus Armbruster
2024-08-01 11:52 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2024-08-01 11:34 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, qemu-trivial
Peter Maydell <peter.maydell@linaro.org> writes:
> In commit bb71846325e23 we added some macro magic to avoid
> variable-shadowing when using some of our more complicated
> macros. One of the internal components of this is a macro
> named MAKE_IDENTFIER. Fix the typo in its name: it should
> be MAKE_IDENTIFIER.
>
> Commit created with
> sed -i -e 's/MAKE_IDENTFIER/MAKE_IDENTIFIER/g' include/qemu/*.h include/qapi/qmp/qobject.h
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Can't believe I messed this up, but git proves I did %-}
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro
2024-08-01 10:25 [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro Peter Maydell
2024-08-01 11:34 ` Markus Armbruster
@ 2024-08-01 11:52 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-01 11:52 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: qemu-trivial, Markus Armbruster
On 1/8/24 12:25, Peter Maydell wrote:
> In commit bb71846325e23 we added some macro magic to avoid
> variable-shadowing when using some of our more complicated
> macros. One of the internal components of this is a macro
> named MAKE_IDENTFIER. Fix the typo in its name: it should
> be MAKE_IDENTIFIER.
>
> Commit created with
> sed -i -e 's/MAKE_IDENTFIER/MAKE_IDENTIFIER/g' include/qemu/*.h include/qapi/qmp/qobject.h
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> include/qapi/qmp/qobject.h | 2 +-
> include/qemu/atomic.h | 2 +-
> include/qemu/compiler.h | 2 +-
> include/qemu/osdep.h | 6 +++---
> 4 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-01 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 10:25 [PATCH] include: Fix typo in name of MAKE_IDENTFIER macro Peter Maydell
2024-08-01 11:34 ` Markus Armbruster
2024-08-01 11:52 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).