All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] arch_init: Setting QEMU_ARCH enum straight
@ 2014-09-08 12:30 Bastian Koppelmann
  2014-09-15 13:03 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 2+ messages in thread
From: Bastian Koppelmann @ 2014-09-08 12:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Every QEMU_ARCH is now hexadecimal instead of a mixture of decimal and hexadecimal.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
 include/sysemu/arch_init.h | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index 8939233..e1ec025 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -5,21 +5,21 @@
 #include "qemu/option.h"
 
 enum {
-    QEMU_ARCH_ALL = -1,
-    QEMU_ARCH_ALPHA = 1,
-    QEMU_ARCH_ARM = 2,
-    QEMU_ARCH_CRIS = 4,
-    QEMU_ARCH_I386 = 8,
-    QEMU_ARCH_M68K = 16,
-    QEMU_ARCH_LM32 = 32,
-    QEMU_ARCH_MICROBLAZE = 64,
-    QEMU_ARCH_MIPS = 128,
-    QEMU_ARCH_PPC = 256,
-    QEMU_ARCH_S390X = 512,
-    QEMU_ARCH_SH4 = 1024,
-    QEMU_ARCH_SPARC = 2048,
-    QEMU_ARCH_XTENSA = 4096,
-    QEMU_ARCH_OPENRISC = 8192,
+    QEMU_ARCH_ALL = -0x1,
+    QEMU_ARCH_ALPHA = 0x1,
+    QEMU_ARCH_ARM = 0x2,
+    QEMU_ARCH_CRIS = 0x4,
+    QEMU_ARCH_I386 = 0x8,
+    QEMU_ARCH_M68K = 0x10,
+    QEMU_ARCH_LM32 = 0x20,
+    QEMU_ARCH_MICROBLAZE = 0x40,
+    QEMU_ARCH_MIPS = 0x80,
+    QEMU_ARCH_PPC = 0x100,
+    QEMU_ARCH_S390X = 0x200,
+    QEMU_ARCH_SH4 = 0x400,
+    QEMU_ARCH_SPARC = 0x800,
+    QEMU_ARCH_XTENSA = 0x1000,
+    QEMU_ARCH_OPENRISC = 0x2000,
     QEMU_ARCH_UNICORE32 = 0x4000,
     QEMU_ARCH_MOXIE = 0x8000,
     QEMU_ARCH_TRICORE = 0x10000,
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] arch_init: Setting QEMU_ARCH enum straight
  2014-09-08 12:30 [Qemu-devel] [PATCH] arch_init: Setting QEMU_ARCH enum straight Bastian Koppelmann
@ 2014-09-15 13:03 ` Michael Tokarev
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2014-09-15 13:03 UTC (permalink / raw)
  To: Bastian Koppelmann, qemu-devel; +Cc: qemu-trivial

08.09.2014 16:30, Bastian Koppelmann wrote:
> Every QEMU_ARCH is now hexadecimal instead of a mixture of decimal and hexadecimal.

I'm not sure it is worth the trouble really.  For readability, the best in this case
(in my opinion anyway) is to use (1<<n) notation (with consecutive n), so it becomes
really obvious that these are distinct bits.  Besides, -0x01 (fo ARCH_ALL) does look
a bit weird :)

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-15 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 12:30 [Qemu-devel] [PATCH] arch_init: Setting QEMU_ARCH enum straight Bastian Koppelmann
2014-09-15 13:03 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.