Skip to contentSkip to conversation

Trivial patches for Auguest 25 to September 2 2011

GIT PULL New Stefan Hajnoczi 3 participants 6 messages Sep 2, 2011 – Sep 8, 2011

lore
Share & tools
lore
#0 lore raw

The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b:

Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500)

are available in the git repository at:

ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Boris Figovsky (1):

      x86: fix daa opcode for al register values higher than 0xf9

Brad Smith (1):
libcacard: use INSTALL_DATA for data

Stefan Weil (1):
sh4: Fix potential crash in debug code

 hw/sh_intc.c            |    9 +++++----
 libcacard/Makefile      |    2 +-
 target-i386/op_helper.c |    6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)
#1 lore raw

PATCH 1/3 sh4: Fix potential crash in debug code

From: Stefan Weil <[email protected]>

cppcheck reports this error:

qemu/hw/sh_intc.c:390: error: Possible null pointer dereference:
s - otherwise it is redundant to check if s is null at line 385

If s were NULL, the printf() statement would crash. Setting braces fixes this bug.

---
 hw/sh_intc.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
hw/sh_intc.c +5 -4
index ecb46e5..e07424f 100644
@@ -382,13 +382,14 @@ void sh_intc_register_sources(struct intc_desc *desc,
 
 	sh_intc_register_source(desc, vect->enum_id, groups, nr_groups);
 	s = sh_intc_source(desc, vect->enum_id);
-	if (s)
-	    s->vect = vect->vect;
+        if (s) {
+            s->vect = vect->vect;
 
 #ifdef DEBUG_INTC_SOURCES
-	printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",
-	       vect->enum_id, s->vect, s->enable_count, s->enable_max);
+            printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",
+                   vect->enum_id, s->vect, s->enable_count, s->enable_max);
 #endif
+        }
     }
 
     if (groups) {
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/3 x86: fix daa opcode for al register values higher than 0xf9

In reply to Stefan Hajnoczi

From: Boris Figovsky <[email protected]>

The second if statement should consider the original al register value, and not the new one.

---
 target-i386/op_helper.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
target-i386/op_helper.c +3 -3
index 1bbc3b5..1fc248f 100644
@@ -1970,20 +1970,20 @@ void helper_aas(void)
 
 void helper_daa(void)
 {
-    int al, af, cf;
+    int old_al, al, af, cf;
     int eflags;
 
     eflags = helper_cc_compute_all(CC_OP);
     cf = eflags & CC_C;
     af = eflags & CC_A;
-    al = EAX & 0xff;
+    old_al = al = EAX & 0xff;
 
     eflags = 0;
     if (((al & 0x0f) > 9 ) || af) {
         al = (al + 6) & 0xff;
         eflags |= CC_A;
     }
-    if ((al > 0x9f) || cf) {
+    if ((old_al > 0x99) || cf) {
         al = (al + 0x60) & 0xff;
         eflags |= CC_C;
     }
Signature · 1 line
1.7.5.4
#3 lore raw

PATCH 3/3 libcacard: use INSTALL_DATA for data

In reply to Stefan Hajnoczi

From: Brad Smith <[email protected]>

---
 libcacard/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
libcacard/Makefile +1 -1
index bf052bc..81d9eb5 100644
@@ -56,7 +56,7 @@ install-libcacard: libcacard.pc libcacard.la vscclient
 	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
-	$(LIBTOOL) --mode=install $(INSTALL_PROG) libcacard.la "$(DESTDIR)$(libdir)"
+	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
 	for inc in *.h; do \
 		$(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
Signature · 1 line
1.7.5.4
#4 lore raw
In reply to Stefan Hajnoczi
Quoted 14 lines · Stefan Hajnoczi

The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b:

 Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500)

are available in the git repository at:

 ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Boris Figovsky (1):
     x86: fix daa opcode for al register values higher than 0xf9

Brad Smith (1):
     libcacard: use INSTALL_DATA for data

Quoted 7 lines

Stefan Weil (1):
     sh4: Fix potential crash in debug code

 hw/sh_intc.c            |    9 +++++----
 libcacard/Makefile      |    2 +-
 target-i386/op_helper.c |    6 +++---

 3 files changed, 9 insertions(+), 8 deletions(-)

Ping?

Stefan

#5 lore raw
In reply to Stefan Hajnoczi
Quoted 7 lines · Stefan Hajnoczi

The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b:

   Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500)

are available in the git repository at:

ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 16 lines

Boris Figovsky (1):

       x86: fix daa opcode for al register values higher than 0xf9

Brad Smith (1):
libcacard: use INSTALL_DATA for data

Stefan Weil (1):
sh4: Fix potential crash in debug code

  hw/sh_intc.c            |    9 +++++----
  libcacard/Makefile      |    2 +-
  target-i386/op_helper.c |    6 +++---
  3 files changed, 9 insertions(+), 8 deletions(-)