Skip to contentSkip to conversation

Trivial patches for June 25 to July 27 2011

GIT PULL In review Stefan Hajnoczi 3 participants 10 messages Jul 27, 2011 Kbuild

lore
Share & tools
lore
#2 lore raw

PATCH 2/7 Makefile: Minor cscope fixups

In reply to Stefan Hajnoczi

From: Alexandre Raymond <[email protected]>

Create cscope symbols for assembly files in addition to .c/.h files. Create cscope database with full path instead of relative path so cscope can be used with CSCOPE_DB in any directory.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index daa3aa0..eb1c788 100644
@@ -291,7 +291,7 @@ TAGS:
 
 cscope:
 	rm -f ./cscope.*
-	find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
+	find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files
 	cscope -b
 
 # documentation
Signature · 1 line
1.7.5.4
#3 lore raw

PATCH 3/7 slirp: Fix unusual "comments" in unused code

In reply to Stefan Hajnoczi

From: Stefan Weil <[email protected]>

cppcheck detected two rather strange comments which were not correctly written as C comments.

They did not cause any harm because they were framed by #ifdef notdef ... #endif, so they were never compiled.

Fix them nevertheless (we could also remove the unused code).

---
 slirp/ip_input.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
slirp/ip_input.c +2 -2
index 5e67631..c7b3eb4 100644
@@ -511,7 +511,7 @@ typedef uint32_t n_time;
 				 */
 				break;
 			}
-			off--;			/ * 0 origin *  /
+                        off--; /* 0 origin */
 			if (off > optlen - sizeof(struct in_addr)) {
 				/*
 				 * End of source route.  Should be for us.
@@ -554,7 +554,7 @@ typedef uint32_t n_time;
 			/*
 			 * If no space remains, ignore.
 			 */
-			off--;			 * 0 origin *
+                        off--; /* 0 origin */
 			if (off > optlen - sizeof(struct in_addr))
 				break;
 			bcopy((caddr_t)(&ip->ip_dst), (caddr_t)&ipaddr.sin_addr,
Signature · 1 line
1.7.5.4
#4 lore raw

PATCH 4/7 Makefile: fix out-of-tree builds

In reply to Stefan Hajnoczi

From: Alexandre Raymond <[email protected]>

This patch fixes a minor bugs which prevented QEMU from being built out of tree.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index eb1c788..cbd614a 100644
@@ -46,7 +46,7 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
 -include $(SUBDIR_DEVICES_MAK_DEP)
 
-%/config-devices.mak: default-configs/%.mak
+%/config-devices.mak: $(SRC_PATH)/default-configs/%.mak
 	$(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, "  GEN   $@")
 	@if test -f $@; then \
 	  if cmp -s [email protected] $@; then \
Signature · 1 line
1.7.5.4
#0 lore raw

The following changes since commit c886edfb851c0c590d4e77f058f2ec8ed95ad1b5:

Let users select their pythons (2011-07-25 16:50:12 +0000)

are available in the git repository at:
ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Alexandre Raymond (2):
Makefile: Minor cscope fixups
Makefile: fix out-of-tree builds

Juan Quintela (1):
xen_mapcache: remove unused variable

Michael Roth (1):

      Makefile: add missing deps on $(GENERATED_HEADERS)

Stefan Weil (1):
slirp: Fix unusual "comments" in unused code

Wolfgang Mauerer (1):
vhost build fix for i386

Zhi Yong Wu (1):

      qmp: fix efect -> effect typo in qmp-commands.hx
 Makefile         |    8 +++++---
 configure        |   23 +++++++++++++++++++++++
 qmp-commands.hx  |    2 +-
 slirp/ip_input.c |    4 ++--
 xen-mapcache.c   |    3 +--
 5 files changed, 32 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.5.4
#7 lore raw

PATCH 5/7 qmp: fix efect -> effect typo in qmp-commands.hx

From: Zhi Yong Wu <[email protected]>

---
 qmp-commands.hx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qmp-commands.hx +1 -1
index 54e313c..03f67da 100644
@@ -42,7 +42,7 @@ and we're going to establish a deprecation policy for badly defined commands.
 
 If you're planning to adopt QMP, please observe the following:
 
-    1. The deprecation policy will take efect and be documented soon, please
+    1. The deprecation policy will take effect and be documented soon, please
        check the documentation of each used command as soon as a new release of
        QEMU is available
 
Signature · 1 line
1.7.5.4
#8 lore raw

PATCH 6/7 Makefile: add missing deps on $(GENERATED_HEADERS)

In reply to Stefan Hajnoczi

From: Michael Roth <[email protected]>

This fixes a build issue with make -j6+ due to qapi-generated files being built before $(GENERATED_HEADERS) have been created.

---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Makefile +3 -1
index cbd614a..daae310 100644
@@ -192,8 +192,10 @@ test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types
 test-qmp-commands: test-qmp-commands.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
 
 QGALIB=qga/guest-agent-command-state.o qga/guest-agent-commands.o
+QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c)
 
-qemu-ga.o: $(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) $(qapi-obj-y)
+$(QGALIB_GEN): $(GENERATED_HEADERS)
+$(QGALIB) qemu-ga.o: $(QGALIB_GEN) $(qapi-obj-y)
 qemu-ga$(EXESUF): qemu-ga.o $(QGALIB) qemu-tool.o qemu-error.o error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) $(qapi-obj-y) qemu-timer-common.o qemu-sockets.o module.o qapi/qmp-dispatch.o qapi/qmp-registry.o $(qapi-dir)/qga-qapi-visit.o $(qapi-dir)/qga-qapi-types.o $(qapi-dir)/qga-qmp-marshal.o
 
 QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
Signature · 1 line
1.7.5.4
#9 lore raw

PATCH 7/7 xen_mapcache: remove unused variable

In reply to Stefan Hajnoczi

From: Juan Quintela <[email protected]>

---
 xen-mapcache.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
xen-mapcache.c +1 -2
index 007136a..15d1241 100644
@@ -237,7 +237,7 @@ uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
 
 ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
 {
-    MapCacheEntry *entry = NULL, *pentry = NULL;
+    MapCacheEntry *entry = NULL;
     MapCacheRev *reventry;
     target_phys_addr_t paddr_index;
     target_phys_addr_t size;
@@ -263,7 +263,6 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
 
     entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
     while (entry && (entry->paddr_index != paddr_index || entry->size != size)) {
-        pentry = entry;
         entry = entry->next;
     }
     if (!entry) {
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/7 vhost build fix for i386

In reply to Stefan Hajnoczi

From: Wolfgang Mauerer <[email protected]>

vhost.c uses __sync_fetch_and_and(), which is only available for -march=i486 and above (see
https://bugzilla.redhat.com/show_bug.cgi?id=624279).

---
 configure |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
configure +23 -0
index 38e3724..9bfe917 100755
@@ -2510,6 +2510,29 @@ if test "$trace_backend" = "dtrace"; then
 fi
 
 ##########################################
+# __sync_fetch_and_and requires at least -march=i486. Many toolchains
+# use i686 as default anyway, but for those that don't, an explicit
+# specification is necessary
+if test $vhost_net = "yes" && test $cpu = "i386"; then
+  cat > $TMPC << EOF
+int sfaa(unsigned *ptr)
+{
+  return __sync_fetch_and_and(ptr, 0);
+}
+
+int main(int argc, char **argv)
+{
+  int val = 42;
+  sfaa(&val);
+  return val;
+}
+EOF
+  if ! compile_prog "" "" ; then
+    CFLAGS+="-march=i486"
+  fi
+fi
+
+##########################################
 # End of CC checks
 # After here, no more $cc or $ld runs
 
Signature · 1 line
1.7.5.4
#5 lore raw

Re: [Qemu-devel] [PATCH 4/7] Makefile: fix out-of-tree builds

In reply to Stefan Hajnoczi

Hi Stefan,

You may drop this patch, it doesn't do anything after all...

Sorry about that.

Alexandre

Quoted 28 lines · Stefan Hajnoczi

From: Alexandre Raymond <[email protected]>

This patch fixes a minor bugs which prevented QEMU from being built out of tree.

---
 Makefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -2
index eb1c788..cbd614a 100644
@@ -46,7 +46,7 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
  -include $(SUBDIR_DEVICES_MAK_DEP)
 
-%/config-devices.mak: default-configs/%.mak
+%/config-devices.mak: $(SRC_PATH)/default-configs/%.mak
        $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, "  GEN   $@")
        @if test -f $@; then \
          if cmp -s [email protected] $@; then \
--

1.7.5.4

#6 lore raw

Re: [Qemu-devel] [PATCH 4/7] Makefile: fix out-of-tree builds

In reply to Stefan Hajnoczi
Quoted 16 lines · Stefan Hajnoczi

From: Alexandre Raymond <[email protected]>

This patch fixes a minor bugs which prevented QEMU from being built out of tree.

---
 Makefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index eb1c788..cbd614a 100644

Makefile config-all-devices.mak: $(SUBDIR_DEVICES_MAK) · line 50

Quoted 6 lines
Makefile +1 -1
@@ -46,7 +46,7 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
 
  -include $(SUBDIR_DEVICES_MAK_DEP)
 
-%/config-devices.mak: default-configs/%.mak
+%/config-devices.mak: $(SRC_PATH)/default-configs/%.mak
        $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, "  GEN   $@")

Agreed, we don't need to explicitly use $(SRC_PATH) since VPATH is set to the source directory and $< expands to the full path name. I have dropped it from the git branch.

Stefan