Skip to contentSkip to conversation

hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return value

PATCH Applied Julien Grall 3 participants 3 messages Jan 11, 2013 – Jan 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return value

The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation for i386. ULL need to be specify for uint64_t value.

---
 hw/pc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/pc.c +2 -2
index dfa3144..ba1f19d 100644
@@ -105,7 +105,7 @@ static void ioport80_write(void *opaque, hwaddr addr, uint64_t data,
 
 static uint64_t ioport80_read(void *opaque, hwaddr addr, unsigned size)
 {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
 }
 
 /* MSDOS compatibility mode FPU exception support */
@@ -130,7 +130,7 @@ static void ioportF0_write(void *opaque, hwaddr addr, uint64_t data,
 
 static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
 {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
 }
 
 /* TSC handling */
Signature · 1 line
Julien Grall
#1 lore raw

Am 11.01.2013 17:41, schrieb Julien Grall:

Quoted 22 lines

The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation for i386. ULL need to be specify for uint64_t value.

---
  hw/pc.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
hw/pc.c +1 -1
index dfa3144..ba1f19d 100644
@@ -105,7 +105,7 @@ static void ioport80_write(void *opaque, hwaddr addr, uint64_t data,
 
  static uint64_t ioport80_read(void *opaque, hwaddr addr, unsigned size)
  {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
  }
 
  /* MSDOS compatibility mode FPU exception support */

hw/pc.c static void ioportF0_write(void *opaque, hwaddr addr, uint64_t data, · line 136

Quoted 8 lines
hw/pc.c +1 -1
@@ -130,7 +130,7 @@ static void ioportF0_write(void *opaque, hwaddr addr, uint64_t data,
 
  static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
  {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
  }
 
  /* TSC handling */

Better: use UINT64_MAX. Then reviewers don't have to count 'f's.

As this patch is a build fix, it should be committed directly without waiting for a qemu-trivial pull request.

Stefan

Applied
#2 lore raw
In reply to Julien Grall

Thanks, applied.

Quoted 34 lines · Julien Grall

The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation for i386. ULL need to be specify for uint64_t value.

---
 hw/pc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/pc.c +2 -3
index dfa3144..ba1f19d 100644
@@ -105,7 +105,7 @@ static void ioport80_write(void *opaque, hwaddr addr, uint64_t data,
 
 static uint64_t ioport80_read(void *opaque, hwaddr addr, unsigned size)
 {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
 }
 
 /* MSDOS compatibility mode FPU exception support */
@@ -130,7 +130,7 @@ static void ioportF0_write(void *opaque, hwaddr addr, uint64_t data,
 
 static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
 {
-    return 0xffffffffffffffff;
+    return 0xffffffffffffffffULL;
 }
 
 /* TSC handling */
--

Julien Grall