Skip to contentSkip to conversation

Trivial patches for 2016-09-14

GIT PULL Michael Tokarev 2 participants 29 messages Sep 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

This is a backlog of all trivial patches accumulated since Jul this year. Not a huge amount for more than a month.

Please consider applying.

Thanks,

/mjt

The following changes since commit 507e4ddc3abf67391bcbc9624fd60b969c159b78:

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging (2016-09-13 17:55:35 +0100)

are available in the git repository at:

git://git.corpit.ru/qemu.git tags/trivial-patches-fetch

for you to fetch changes up to f3f1ef84774aef77d344b196dea2a09b244b87a1:

mptsas: change .realize function name (2016-09-14 10:56:40 +0300)

----------------------------------------------------------------
trivial patches for 2016-09-14

----------------------------------------------------------------
Cao jin (4):
timer: update comments
cpus: rename local variable to meaningful one
cpus: update comments
mptsas: change .realize function name

Colin Lord (1):
help: Update help to remove misleading display information

Eduardo Habkost (1):
win32: don't run subprocess tests on Mingw32 platform

Ladi Prosek (1):
Remove unused function declarations

Laurent Vivier (6):
coccinelle: add a script to remove useless casts linux-user,s390x: remove useless cast
s390x: remove useless cast
tricore: remove useless cast
fw_cfg: remove useless casts
sheepdog: remove useless casts

Markus Armbruster (1):
MAINTAINERS: Fix up F: entry bit rot

Md Haris Iqbal (1):
linux-user/qemu.h: change malloc to g_malloc, free to g_free

Reda Sallahi (1):
sh4: fix broken link to documentation

Stefano Dong (董兴水) (1):
ivshmem: Delete duplicate debug message

Thomas Huth (9):
Remove remainders of HPPA backend
tcg: Remove duplicate header includes
ui/console: Fix non-working backspace key in monitor of gtk UI
MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section
MAINTAINERS: Add include/hw/tricore/ to TriCore section
MAINTAINERS: Add include/hw/sh4/ to SH4 section
MAINTAINERS: Add include/sysemu/cpus.h
MAINTAINERS: Fix wildcard for scsi headers
MAINTAINERS: Add some header files to the PC chipset section

Tomáš Golembiovský (1):
curl: Operate on zero-length file

 MAINTAINERS                       |   26 +-
 block/curl.c                      |   25 +-
 block/qcow2.h                     |    1 -
 block/sheepdog.c                  |    4 +-
 configure                         |    7 +-
 cpus.c                            |   13 +-
 disas.c                           |    2 -
 disas/Makefile.objs               |    1 -
 disas/hppa.c                      | 2832 -------------------------------------
 disas/sh4.c                       |    6 -
 hw/misc/ivshmem.c                 |    1 -
 hw/nvram/fw_cfg.c                 |    4 +-
 hw/ppc/ppc405.h                   |    6 -
 hw/s390x/sclp.c                   |    2 +-
 hw/s390x/virtio-ccw.h             |    1 -
 hw/scsi/mptsas.c                  |    4 +-
 hw/sh4/shix.c                     |    2 +-
 hw/tricore/tricore_testboard.c    |    2 +-
 include/block/block.h             |    6 -
 include/block/block_int.h         |    9 -
 include/hw/arm/pxa.h              |    1 -
 include/hw/bt.h                   |    2 -
 include/hw/i386/pc.h              |    2 -
 include/hw/pci-host/spapr.h       |    2 -
 include/hw/pci/pci_bridge.h       |    1 -
 include/hw/pci/pcie_port.h        |    1 -
 include/hw/ppc/ppc4xx.h           |    6 -
 include/hw/ppc/spapr.h            |    3 -
 include/hw/ppc/spapr_vio.h        |    4 -
 include/hw/scsi/scsi.h            |    1 -
 include/hw/virtio/virtio-bus.h    |    3 -
 include/migration/migration.h     |    2 -
 include/net/net.h                 |    2 -
 include/qemu/bitmap.h             |    4 -
 include/qemu/timer.h              |   19 +-
 include/qemu/uri.h                |    2 -
 include/sysemu/kvm.h              |    2 -
 include/ui/console.h              |    2 -
 include/ui/input.h                |    2 -
 include/ui/spice-display.h        |    2 -
 linux-user/qemu.h                 |    4 +-
 linux-user/signal.c               |    2 +-
 linux-user/syscall_defs.h         |    4 +-
 qemu-options.hx                   |   38 +-
 qemu-tech.texi                    |    3 +-
 scripts/coccinelle/typecast.cocci |    7 +
 target-alpha/cpu.h                |    1 -
 target-m68k/cpu.h                 |    1 -
 target-ppc/cpu.h                  |    2 -
 target-ppc/mmu-hash64.h           |    1 -
 target-s390x/cpu.h                |    2 -
 target-sh4/README.sh4             |    2 +-
 tcg/tcg.c                         |    2 -
 tcg/tcg.h                         |    2 -
 tcg/tci/README                    |    2 +-
 ui/console.c                      |    1 +
 56 files changed, 93 insertions(+), 2998 deletions(-)
 delete mode 100644 disas/hppa.c
 create mode 100644 scripts/coccinelle/typecast.cocci
#1 lore raw

[Qemu-devel] [PULL 09/27] MAINTAINERS: Add some header files to the PC chipset section

From: Thomas Huth <[email protected]>

These header files obviously belong to the PC chipset (since their names match the other .c files in this section).

---
 MAINTAINERS | 4 ++++
 1 file changed, 4 insertions(+)
MAINTAINERS +4 -0
index 13dae75..2dcb58b 100644
@@ -719,6 +719,10 @@ F: hw/misc/pc-testdev.c
 F: hw/timer/hpet*
 F: hw/timer/i8254*
 F: hw/timer/mc146818rtc*
+F: include/hw/i2c/pm_smbus.h
+F: include/hw/timer/hpet.h
+F: include/hw/timer/i8254*
+F: include/hw/timer/mc146818rtc*
 
 Machine core
 M: Eduardo Habkost <[email protected]>
Signature · 1 line
2.1.4
#2 lore raw

[Qemu-devel] [PULL 13/27] ivshmem: Delete duplicate debug message

In reply to Michael Tokarev

From: Stefano Dong (董兴水) <[email protected]>

Duplicated in commit ca0b756. Delete it.

---
 hw/misc/ivshmem.c | 1 -
 1 file changed, 1 deletion(-)
hw/misc/ivshmem.c +0 -1
index 40a2ebc..f803dfd 100644
@@ -628,7 +628,6 @@ static void ivshmem_read(void *opaque, const uint8_t *buf, int size)
     s->msg_buffered_bytes = 0;
 
     fd = qemu_chr_fe_get_msgfd(s->server_chr);
-    IVSHMEM_DPRINTF("posn is %" PRId64 ", fd is %d\n", msg, fd);
 
     process_msg(s, msg, fd, &err);
     if (err) {
Signature · 1 line
2.1.4
#3 lore raw

[Qemu-devel] [PULL 14/27] timer: update comments

In reply to Michael Tokarev

From: Cao jin <[email protected]>

The comments is outdated. The patch has following changes:
1. tense correction.
2. all clock time value is returned in nanoseconds, so, they are same in precision.
3. virtual clock doesn't use cpu cycles.

---
 include/qemu/timer.h | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)
include/qemu/timer.h +6 -13
index 4bfcd35..bdfae00 100644
@@ -22,23 +22,20 @@
  * @QEMU_CLOCK_REALTIME: Real time clock
  *
  * The real time clock should be used only for stuff which does not
- * change the virtual machine state, as it is run even if the virtual
- * machine is stopped. The real time clock has a frequency of 1000
- * Hz.
+ * change the virtual machine state, as it runs even if the virtual
+ * machine is stopped.
  *
  * @QEMU_CLOCK_VIRTUAL: virtual clock
  *
- * The virtual clock is only run during the emulation. It is stopped
- * when the virtual machine is stopped. Virtual timers use a high
- * precision clock, usually cpu cycles (use ticks_per_sec).
+ * The virtual clock only runs during the emulation. It stops
+ * when the virtual machine is stopped.
  *
  * @QEMU_CLOCK_HOST: host clock
  *
- * The host clock should be use for device models that emulate accurate
+ * The host clock should be used for device models that emulate accurate
  * real time sources. It will continue to run when the virtual machine
  * is suspended, and it will reflect system time changes the host may
- * undergo (e.g. due to NTP). The host clock has the same precision as
- * the virtual clock.
+ * undergo (e.g. due to NTP).
  *
  * @QEMU_CLOCK_VIRTUAL_RT: realtime clock used for icount warp
  *
@@ -77,10 +74,6 @@ struct QEMUTimer {
 extern QEMUTimerListGroup main_loop_tlg;
 
 /*
- * QEMUClockType
- */
-
-/*
  * qemu_clock_get_ns;
  * @type: the clock type
  *
Signature · 1 line
2.1.4
#4 lore raw

[Qemu-devel] [PULL 02/27] tcg: Remove duplicate header includes

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

host-utils.h and timer.h are included twice in tcg.c. One time should be enough.

---
 tcg/tcg.c | 2 --
 1 file changed, 2 deletions(-)
tcg/tcg.c +0 -2
index 42417bd..c450c62 100644
@@ -40,8 +40,6 @@
 #define NO_CPU_IO_DEFS
 #include "cpu.h"
 
-#include "qemu/host-utils.h"
-#include "qemu/timer.h"
 #include "exec/cpu-common.h"
 #include "exec/exec-all.h"
 
Signature · 1 line
2.1.4
#5 lore raw

[Qemu-devel] [PULL 04/27] MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

get_maintainer.pl now properly recognizes that the file in include/hw/unicore32/ belongs to UniCore32.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 2ffdb36..0ca0cd0 100644
@@ -202,6 +202,7 @@ M: Guan Xuetao <[email protected]>
 S: Maintained
 F: target-unicore32/
 F: hw/unicore32/
+F: include/hw/unicore32/
 
 X86
 M: Paolo Bonzini <[email protected]>
Signature · 1 line
2.1.4
#6 lore raw

[Qemu-devel] [PULL 18/27] curl: Operate on zero-length file

In reply to Michael Tokarev

From: Tomáš Golembiovský <[email protected]>

Another attempt to fix the bug 1596870.

When creating new disk backed by remote file accessed via HTTPS and the backing file has zero length, qemu-img terminates with uniformative error message:

qemu-img: disk.qcow2: CURL: Error opening file:

While it may not make much sense to operate on empty file, other block backends (e.g. raw backend for regular files) seem to allow it. This patch fixes it for the curl backend and improves the reported error.

---
 block/curl.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
block/curl.c +21 -4
index 426fb4d..571f24c 100644
@@ -675,11 +675,28 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     curl_easy_setopt(state->curl, CURLOPT_HEADERDATA, s);
     if (curl_easy_perform(state->curl))
         goto out;
-    curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d);
-    if (d)
-        s->len = (size_t)d;
-    else if(!s->len)
+    if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) {
         goto out;
+    }
+    /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
+     * know or the size is zero. From 7.19.4 CURL returns -1 if size is not
+     * known and zero if it is realy zero-length file. */
+#if LIBCURL_VERSION_NUM >= 0x071304
+    if (d < 0) {
+        pstrcpy(state->errmsg, CURL_ERROR_SIZE,
+                "Server didn't report file size.");
+        goto out;
+    }
+#else
+    if (d <= 0) {
+        pstrcpy(state->errmsg, CURL_ERROR_SIZE,
+                "Unknown file size or zero-length file.");
+        goto out;
+    }
+#endif
+
+    s->len = (size_t)d;
+
     if ((!strncasecmp(s->url, "http://", strlen("http://"))
         || !strncasecmp(s->url, "https://", strlen("https://")))
         && !s->accept_range) {
Signature · 1 line
2.1.4
#7 lore raw

[Qemu-devel] [PULL 22/27] tricore: remove useless cast

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

This patch is the result of coccinelle script
scripts/coccinelle/typecast.cocci

---
 hw/tricore/tricore_testboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/tricore/tricore_testboard.c +1 -1
index 8d3520f..19dd587 100644
@@ -46,7 +46,7 @@ static void tricore_load_kernel(CPUTriCoreState *env)
     long kernel_size;
 
     kernel_size = load_elf(tricoretb_binfo.kernel_filename, NULL,
-                           NULL, (uint64_t *)&entry, NULL,
+                           NULL, &entry, NULL,
                            NULL, 0,
                            EM_TRICORE, 1, 0);
     if (kernel_size <= 0) {
Signature · 1 line
2.1.4
#8 lore raw

[Qemu-devel] [PULL 25/27] win32: don't run subprocess tests on Mingw32 platform

In reply to Michael Tokarev

From: Eduardo Habkost <[email protected]>

Quoted 13 lines · Daniel P. Berrange

The g_test_trap_subprocess() method does not work on the Mingw32 platform, causing the test-qdev-global-props test case to abort

(test-logging.exe:230): GLib-ERROR **: g_test_trap_subprocess()
failed: Failed to execute helper program (No such file or directory)

This failure was introduced a while ago in

commit 2177801a4899bf29108b3d471417a5b4d701ec29
Author: Eduardo Habkost <[email protected]>
Date: Fri Aug 8 16:03:27 2014 -0300

Quoted 5 lines

test-qdev-global-props: Run tests on subprocess

Modify the configure time check to avoid enabling this feature on Mingw, rather than trying to rewrite the test to avoid this feature.

I would do the following instead, just in case we have extra code looking at $glib_subprocess one day.

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index d4388a6..e6b2c45 100755
@@ -3023,7 +3023,7 @@ fi
 
 # g_test_trap_subprocess added in 2.38. Used by some tests.
 glib_subprocess=yes
-if ! $pkg_config --atleast-version=2.38 glib-2.0; then
+if test "$mingw32" = "yes" || ! $pkg_config --atleast-version=2.38 glib-2.0; then
     glib_subprocess=no
 fi
 
Signature · 1 line
2.1.4
#9 lore raw

[Qemu-devel] [PULL 06/27] MAINTAINERS: Add include/hw/sh4/ to SH4 section

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

get_maintainer.pl now properly recognizes that the files in include/hw/sh4/ belong to SH4.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 8f6e8a2..3d3098c 100644
@@ -187,6 +187,7 @@ S: Odd Fixes
 F: target-sh4/
 F: hw/sh4/
 F: disas/sh4.c
+F: include/hw/sh4/
 
 SPARC
 M: Mark Cave-Ayland <[email protected]>
Signature · 1 line
2.1.4
#10 lore raw

[Qemu-devel] [PULL 01/27] Remove remainders of HPPA backend

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

The HPPA backend has been removed by the following commit:

802b5081233a6b643a8b135a5facaf14bafaa77d
tcg-hppa: Remove tcg backend

But some small pieces of the HPPA backend still survived until today. Since we also do not have support for a HPPA target in QEMU, we can nowadays safely remove the remaining HPPA parts (like the disassembler code, or the detection of HPPA in the configure script).

---
 configure                 |    5 -
 disas.c                   |    2 -
 disas/Makefile.objs       |    1 -
 disas/hppa.c              | 2832 ---------------------------------------------
 linux-user/syscall_defs.h |    4 +-
 qemu-tech.texi            |    3 +-
 tcg/tci/README            |    2 +-
 7 files changed, 4 insertions(+), 2845 deletions(-)
 delete mode 100644 disas/hppa.c
configure +0 -5
index f4c589f..d4388a6 100755
@@ -511,8 +511,6 @@ elif check_define __arm__ ; then
   cpu="arm"
 elif check_define __aarch64__ ; then
   cpu="aarch64"
-elif check_define __hppa__ ; then
-  cpu="hppa"
 else
   cpu=$(uname -m)
 fi
@@ -5908,9 +5906,6 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
   cris)
     disas_config "CRIS"
   ;;
-  hppa)
-    disas_config "HPPA"
-  ;;
   i386|x86_64|x32)
     disas_config "I386"
   ;;
disas.c +0 -2
index 05a7a12..67f116a 100644
@@ -310,8 +310,6 @@ void disas(FILE *out, void *code, unsigned long size)
     print_insn = print_insn_m68k;
 #elif defined(__s390__)
     print_insn = print_insn_s390;
-#elif defined(__hppa__)
-    print_insn = print_insn_hppa;
 #elif defined(__ia64__)
     print_insn = print_insn_ia64;
 #endif
disas/Makefile.objs +0 -1
index abeba84..09bc992 100644
@@ -9,7 +9,6 @@ libvixldir = $(SRC_PATH)/disas/libvixl
 # versions do not.
 arm-a64.o-cflags := -I$(libvixldir) -Wno-sign-compare
 common-obj-$(CONFIG_CRIS_DIS) += cris.o
-common-obj-$(CONFIG_HPPA_DIS) += hppa.o
 common-obj-$(CONFIG_I386_DIS) += i386.o
 common-obj-$(CONFIG_IA64_DIS) += ia64.o
 common-obj-$(CONFIG_M68K_DIS) += m68k.o
disas/hppa.c deleted +0 -2832

2,832 lines not on this page · raw message

linux-user/syscall_defs.h +2 -2
index 7835654..c0c9b58 100644
@@ -2329,8 +2329,8 @@ struct target_flock {
 struct target_flock64 {
     short  l_type;
     short  l_whence;
-#if defined(TARGET_PPC) || defined(TARGET_X86_64) || defined(TARGET_MIPS) \
-    || defined(TARGET_SPARC) || defined(TARGET_HPPA) \
+#if defined(TARGET_PPC) || defined(TARGET_X86_64) \
+    || defined(TARGET_MIPS) || defined(TARGET_SPARC) \
     || defined(TARGET_MICROBLAZE) || defined(TARGET_TILEGX)
     int __pad;
 #endif
qemu-tech.texi +1 -2
index bdb2285..1b048cb 100644
@@ -89,8 +89,7 @@ QEMU generic features:
 
 @item
 Working on x86, x86_64 and PowerPC32/64 hosts. Being tested on ARM,
-HPPA, Sparc32 and Sparc64. Previous versions had some support for
-Alpha and S390 hosts, but TCG (see below) doesn't support those yet.
+S390x, Sparc32 and Sparc64.
 
 @item Self-modifying code support.
 
tcg/tci/README +1 -1
index 3786b09..386c3c7 100644
@@ -9,7 +9,7 @@ code fragments ("basic blocks") from target code (any of the
 targets supported by QEMU) to a code representation which
 can be run on a host.
 
-QEMU can create native code for some hosts (arm, hppa, i386, ia64, ppc, ppc64,
+QEMU can create native code for some hosts (arm, i386, ia64, ppc, ppc64,
 s390, sparc, x86_64). For others, unofficial host support was written.
 
 By adding a code generator for a virtual machine and using an
Signature · 1 line
2.1.4
#11 lore raw

[Qemu-devel] [PULL 07/27] MAINTAINERS: Add include/sysemu/cpus.h

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

This header seems to belong to the guest CPU section since it contains prototypes for cpus.c.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 3d3098c..635ca77 100644
@@ -83,6 +83,7 @@ F: include/exec/cpu*.h
 F: include/exec/exec-all.h
 F: include/exec/helper*.h
 F: include/exec/tb-hash.h
+F: include/sysemu/cpus.h
 
 FPU emulation
 M: Aurelien Jarno <[email protected]>
Signature · 1 line
2.1.4
#12 lore raw

[Qemu-devel] [PULL 03/27] ui/console: Fix non-working backspace key in monitor of gtk UI

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

In the QEMU monitor pane of the gtk user interface, the backspace key is not working at all. This happens because of a missing mapping of the key in the qcode_to_keysym[] table. Thus let's add an entry there to get the backspace key working again.

---
 ui/console.c | 1 +
 1 file changed, 1 insertion(+)
ui/console.c +1 -0
index c24bfe4..3940762 100644
@@ -1142,6 +1142,7 @@ static const int qcode_to_keysym[Q_KEY_CODE__MAX] = {
     [Q_KEY_CODE_PGUP]   = QEMU_KEY_PAGEUP,
     [Q_KEY_CODE_PGDN]   = QEMU_KEY_PAGEDOWN,
     [Q_KEY_CODE_DELETE] = QEMU_KEY_DELETE,
+    [Q_KEY_CODE_BACKSPACE] = QEMU_KEY_BACKSPACE,
 };
 
 bool kbd_put_qcode_console(QemuConsole *s, int qcode)
Signature · 1 line
2.1.4
#13 lore raw

[Qemu-devel] [PULL 21/27] s390x: remove useless cast

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

This patch is the result of coccinelle script
scripts/coccinelle/typecast.cocci

---
 hw/s390x/sclp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/sclp.c +1 -1
index 48e38b2..e741da1 100644
@@ -426,7 +426,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code)
         goto out;
     }
 
-    sclp_c->execute(sclp, (SCCB *)&work_sccb, code);
+    sclp_c->execute(sclp, &work_sccb, code);
 
     cpu_physical_memory_write(sccb, &work_sccb,
                               be16_to_cpu(work_sccb.h.length));
Signature · 1 line
2.1.4
#14 lore raw

[Qemu-devel] [PULL 23/27] fw_cfg: remove useless casts

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

This patch is the result of coccinelle script scripts/coccinelle/typecast.cocci

---
 hw/nvram/fw_cfg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/nvram/fw_cfg.c +2 -2
index 6a68e59..1776b1b 100644
@@ -180,7 +180,7 @@ static void fw_cfg_bootsplash(FWCfgState *s)
         temp = qemu_opt_get(opts, "splash-time");
         if (temp != NULL) {
             p = (char *)temp;
-            boot_splash_time = strtol(p, (char **)&p, 10);
+            boot_splash_time = strtol(p, &p, 10);
         }
     }
 
@@ -240,7 +240,7 @@ static void fw_cfg_reboot(FWCfgState *s)
         temp = qemu_opt_get(opts, "reboot-timeout");
         if (temp != NULL) {
             p = (char *)temp;
-            reboot_timeout = strtol(p, (char **)&p, 10);
+            reboot_timeout = strtol(p, &p, 10);
         }
     }
     /* validate the input */
Signature · 1 line
2.1.4
#15 lore raw

[Qemu-devel] [PULL 10/27] MAINTAINERS: Fix up F: entry bit rot

In reply to Michael Tokarev

From: Markus Armbruster <[email protected]>

include/hw/xilinx.h is gone since commit d5001cf, drop.

include/hw/*/xlnx*.c is a typo, change .c to .h.

include/hw/acpi/piix.h is a typo, change piix.h to piix4.h.

hw/i386/*dsl and scripts/acpi*py are gone since since commit 9fc6502, drop.

hw/virtio/dataplane/* are gone since commit fee089e, drop.

ICC Bus is gone since commit dfeb867, drop.

block/raw-aio.h was moved to include/block/raw-aio.h in commit 0187f5c, update.

Tracked down with

    for i in `grep "^[FX]: " MAINTAINERS | sed "s/^.: //"`
    do if [ ! -e "$i" ]; then echo "$i"; fi
    done
---
 MAINTAINERS | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
MAINTAINERS +3 -13
index 2dcb58b..eb723fe 100644
@@ -460,7 +460,6 @@ S: Maintained
 F: hw/*/xilinx_*
 F: hw/*/cadence_*
 F: hw/misc/zynq_slcr.c
-F: include/hw/xilinx.h
 X: hw/ssi/xilinx_*
 
 Xilinx ZynqMP
@@ -469,7 +468,7 @@ M: Edgar E. Iglesias <[email protected]>
 L: [email protected]
 S: Maintained
 F: hw/*/xlnx*.c
-F: include/hw/*/xlnx*.c
+F: include/hw/*/xlnx*.h
 
 ARM ACPI Subsystem
 M: Shannon Zhao <[email protected]>
@@ -699,7 +698,7 @@ F: hw/i2c/smbus_ich9.c
 F: hw/acpi/piix4.c
 F: hw/acpi/ich9.c
 F: include/hw/acpi/ich9.h
-F: include/hw/acpi/piix.h
+F: include/hw/acpi/piix4.h
 F: hw/misc/sga.c
 
 PC Chipset
@@ -805,10 +804,8 @@ F: hw/mem/*
 F: hw/acpi/*
 F: hw/smbios/*
 F: hw/i386/acpi-build.[hc]
-F: hw/i386/*dsl
 F: hw/arm/virt-acpi-build.c
 F: include/hw/arm/virt-acpi-build.h
-F: scripts/acpi*py
 
 ppc4xx
 M: Alexander Graf <[email protected]>
@@ -910,7 +907,6 @@ L: [email protected]
 S: Supported
 F: hw/block/virtio-blk.c
 F: hw/block/dataplane/*
-F: hw/virtio/dataplane/*
 T: git git://github.com/stefanha/qemu.git block
 
 virtio-ccw
@@ -1072,12 +1068,6 @@ S: Supported
 F: qom/cpu.c
 F: include/qom/cpu.h
 
-ICC Bus
-M: Igor Mammedov <[email protected]>
-S: Supported
-F: include/hw/cpu/icc_bus.h
-F: hw/cpu/icc_bus.c
-
 Device Tree
 M: Peter Crosthwaite <[email protected]>
 M: Alexander Graf <[email protected]>
@@ -1588,7 +1578,7 @@ M: Kevin Wolf <[email protected]>
 L: [email protected]
 S: Supported
 F: block/linux-aio.c
-F: block/raw-aio.h
+F: include/block/raw-aio.h
 F: block/raw-posix.c
 F: block/raw-win32.c
 F: block/raw_bsd.c
Signature · 1 line
2.1.4
#16 lore raw

[Qemu-devel] [PULL 27/27] mptsas: change .realize function name

In reply to Michael Tokarev

From: Cao jin <[email protected]>

All the other devices` .realize function name are xxx_realize, except this one.

cc Michael S. Tsirkin <[email protected]>
cc Marcel Apfelbaum <[email protected]>
cc Paolo Bonzini <[email protected]>
cc Markus Armbruster <[email protected]>
---
 hw/scsi/mptsas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/scsi/mptsas.c +2 -2
index 0e0a22f..8a3dee1 100644
@@ -1269,7 +1269,7 @@ static const struct SCSIBusInfo mptsas_scsi_info = {
     .load_request = mptsas_load_request,
 };
 
-static void mptsas_scsi_init(PCIDevice *dev, Error **errp)
+static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
 {
     DeviceState *d = DEVICE(dev);
     MPTSASState *s = MPT_SAS(dev);
@@ -1426,7 +1426,7 @@ static void mptsas1068_class_init(ObjectClass *oc, void *data)
     DeviceClass *dc = DEVICE_CLASS(oc);
     PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc);
 
-    pc->realize = mptsas_scsi_init;
+    pc->realize = mptsas_scsi_realize;
     pc->exit = mptsas_scsi_uninit;
     pc->romfile = 0;
     pc->vendor_id = PCI_VENDOR_ID_LSI_LOGIC;
Signature · 1 line
2.1.4
#17 lore raw

[Qemu-devel] [PULL 16/27] cpus: update comments

In reply to Michael Tokarev

From: Cao jin <[email protected]>

The returned value of cpu_get_clock() is plused with the offset, so it is the time elapsed in virtual machine when vm is active.

Cc: Paolo Bonzini <[email protected]>
Cc Peter Crosthwaite <[email protected]>

---
 cpus.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
cpus.c +3 -2
index a70b536..5d5e374 100644
@@ -191,7 +191,7 @@ int64_t cpu_icount_to_ns(int64_t icount)
     return icount << icount_time_shift;
 }
 
-/* return the host CPU cycle counter and handle stop/restart */
+/* return the host CPU cycle counter */
 /* Caller must hold the BQL */
 int64_t cpu_get_ticks(void)
 {
@@ -229,7 +229,8 @@ static int64_t cpu_get_clock_locked(void)
     return time;
 }
 
-/* return the host CPU monotonic time */
+/* Return the monotonic time elapsed in VM, i.e.,
+ * the time between vm_start and vm_stop */
 int64_t cpu_get_clock(void)
 {
     int64_t ti;
Signature · 1 line
2.1.4
#18 lore raw

[Qemu-devel] [PULL 05/27] MAINTAINERS: Add include/hw/tricore/ to TriCore section

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

get_maintainer.pl now properly recognizes that the file in include/hw/tricore/ belongs to TriCore.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 0ca0cd0..8f6e8a2 100644
@@ -226,6 +226,7 @@ M: Bastian Koppelmann <[email protected]>
 S: Maintained
 F: target-tricore/
 F: hw/tricore/
+F: include/hw/tricore/
 
 Guest CPU Cores (KVM):
 ----------------------
Signature · 1 line
2.1.4
#19 lore raw

[Qemu-devel] [PULL 19/27] coccinelle: add a script to remove useless casts

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

Script from LKML.

---
 scripts/coccinelle/typecast.cocci | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 scripts/coccinelle/typecast.cocci
scripts/coccinelle/typecast.cocci new file +7 -0
new file mode 100644
index 0000000..be2183e
@@ -0,0 +1,7 @@
+// Remove useless casts
+@@
+type T;
+T v;
+@@
+-	(T *)&v
++	&v
Signature · 1 line
2.1.4
#20 lore raw

[Qemu-devel] [PULL 26/27] linux-user/qemu.h: change malloc to g_malloc, free to g_free

In reply to Michael Tokarev

From: Md Haris Iqbal <[email protected]>

---
 linux-user/qemu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/qemu.h +2 -2
index bef465d..815447f 100644
@@ -548,7 +548,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len, int copy
 #ifdef DEBUG_REMAP
     {
         void *addr;
-        addr = malloc(len);
+        addr = g_malloc(len);
         if (copy)
             memcpy(addr, g2h(guest_addr), len);
         else
@@ -574,7 +574,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
         return;
     if (len > 0)
         memcpy(g2h(guest_addr), host_ptr, len);
-    free(host_ptr);
+    g_free(host_ptr);
 #endif
 }
 
Signature · 1 line
2.1.4
#21 lore raw

[Qemu-devel] [PULL 08/27] MAINTAINERS: Fix wildcard for scsi headers

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

get_maintainer.pl currently thinks that the scsi headers are currrently unmaintained. So let's fix the corresponding wildcard expression.

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 635ca77..13dae75 100644
@@ -835,7 +835,7 @@ T: git git://github.com/jasowang/qemu.git net
 SCSI
 M: Paolo Bonzini <[email protected]>
 S: Supported
-F: include/hw/scsi*
+F: include/hw/scsi/*
 F: hw/scsi/*
 T: git git://github.com/bonzini/qemu.git scsi-next
 
Signature · 1 line
2.1.4
#22 lore raw

[Qemu-devel] [PULL 20/27] linux-user,s390x: remove useless cast

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

This patch is the result of coccinelle script
scripts/coccinelle/typecast.cocci

---
 linux-user/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/signal.c +1 -1
index 9a4d894..d3ac0e2 100644
@@ -4244,7 +4244,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
     env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr;
 
     /* Place signal number on stack to allow backtrace from handler.  */
-    __put_user(env->regs[2], (int *) &frame->signo);
+    __put_user(env->regs[2], &frame->signo);
     unlock_user_struct(frame, frame_addr, 1);
     return;
 
Signature · 1 line
2.1.4
#23 lore raw

[Qemu-devel] [PULL 15/27] cpus: rename local variable to meaningful one

In reply to Michael Tokarev

From: Cao jin <[email protected]>

The function actually returns monotonic time value in nanosecond, the "ticks" is not suitable.

Cc: Paolo Bonzini <[email protected]>
Cc Peter Crosthwaite <[email protected]>

---
 cpus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
cpus.c +4 -4
index 0ab4ab1..a70b536 100644
@@ -219,14 +219,14 @@ int64_t cpu_get_ticks(void)
 
 static int64_t cpu_get_clock_locked(void)
 {
-    int64_t ticks;
+    int64_t time;
 
-    ticks = timers_state.cpu_clock_offset;
+    time = timers_state.cpu_clock_offset;
     if (timers_state.cpu_ticks_enabled) {
-        ticks += get_clock();
+        time += get_clock();
     }
 
-    return ticks;
+    return time;
 }
 
 /* return the host CPU monotonic time */
Signature · 1 line
2.1.4
#24 lore raw

[Qemu-devel] [PULL 12/27] help: Update help to remove misleading display information

In reply to Michael Tokarev

From: Colin Lord <[email protected]>

Updates the help messages to remove misleading information about SDL being the normal display used.

---
 qemu-options.hx | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)
qemu-options.hx +21 -17
index cde4a05..258a8f6 100644
@@ -982,13 +982,14 @@ DEF("nographic", 0, QEMU_OPTION_nographic,
 STEXI
 @item -nographic
 @findex -nographic
-Normally, QEMU uses SDL to display the VGA output. With this option,
-you can totally disable graphical output so that QEMU is a simple
-command line application. The emulated serial port is redirected on
-the console and muxed with the monitor (unless redirected elsewhere
-explicitly). Therefore, you can still use QEMU to debug a Linux kernel
-with a serial console.  Use @key{C-a h} for help on switching between
-the console and monitor.
+Normally, if QEMU is compiled with graphical window support, it displays
+output such as guest graphics, guest console, and the QEMU monitor in a
+window. With this option, you can totally disable graphical output so
+that QEMU is a simple command line application. The emulated serial port
+is redirected on the console and muxed with the monitor (unless
+redirected elsewhere explicitly). Therefore, you can still use QEMU to
+debug a Linux kernel with a serial console. Use @key{C-a h} for help on
+switching between the console and monitor.
 ETEXI
 
 DEF("curses", 0, QEMU_OPTION_curses,
@@ -997,9 +998,11 @@ DEF("curses", 0, QEMU_OPTION_curses,
 STEXI
 @item -curses
 @findex -curses
-Normally, QEMU uses SDL to display the VGA output.  With this option,
-QEMU can display the VGA output when in text mode using a
-curses/ncurses interface.  Nothing is displayed in graphical mode.
+Normally, if QEMU is compiled with graphical window support, it displays
+output such as guest graphics, guest console, and the QEMU monitor in a
+window. With this option, QEMU can display the VGA output when in text
+mode using a curses/ncurses interface. Nothing is displayed in graphical
+mode.
 ETEXI
 
 DEF("no-frame", 0, QEMU_OPTION_no_frame,
@@ -1243,13 +1246,14 @@ DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
 STEXI
 @item -vnc @var{display}[,@var{option}[,@var{option}[,...]]]
 @findex -vnc
-Normally, QEMU uses SDL to display the VGA output.  With this option,
-you can have QEMU listen on VNC display @var{display} and redirect the VGA
-display over the VNC session.  It is very useful to enable the usb
-tablet device when using this option (option @option{-usbdevice
-tablet}). When using the VNC display, you must use the @option{-k}
-parameter to set the keyboard layout if you are not using en-us. Valid
-syntax for the @var{display} is
+Normally, if QEMU is compiled with graphical window support, it displays
+output such as guest graphics, guest console, and the QEMU monitor in a
+window. With this option, you can have QEMU listen on VNC display
+@var{display} and redirect the VGA display over the VNC session. It is
+very useful to enable the usb tablet device when using this option
+(option @option{-usbdevice tablet}). When using the VNC display, you
+must use the @option{-k} parameter to set the keyboard layout if you are
+not using en-us. Valid syntax for the @var{display} is
 
 @table @option
 
Signature · 1 line
2.1.4
#25 lore raw

[Qemu-devel] [PULL 11/27] sh4: fix broken link to documentation

In reply to Michael Tokarev

From: Reda Sallahi <[email protected]>

The page that was previously linked in the source code and the README file is no longer available so it now returns a 404 error message.

This puts a previous snapshot from archive.org instead.

---
 hw/sh4/shix.c         | 2 +-
 target-sh4/README.sh4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/sh4/shix.c +1 -1
index ccc9e75..14d4007 100644
@@ -23,7 +23,7 @@
  */
 /*
    Shix 2.0 board by Alexis Polti, described at
-   http://perso.enst.fr/~polti/realisations/shix20/
+   https://web.archive.org/web/20070917001736/perso.enst.fr/~polti/realisations/shix20
 
    More information in target-sh4/README.sh4
 */
target-sh4/README.sh4 +1 -1
index e578830..ece0464 100644
@@ -25,7 +25,7 @@ Goals
 
 The primary model being worked on is the soft MMU target to be able to
 emulate the Shix 2.0 board by Alexis Polti, described at
-http://perso.enst.fr/~polti/realisations/shix20/
+https://web.archive.org/web/20070917001736/http://perso.enst.fr/~polti/realisations/shix20/
 
 Ultimately, qemu will be coupled with a system C or a verilog
 simulator to simulate the whole board functionalities.
Signature · 1 line
2.1.4
#26 lore raw

[Qemu-devel] [PULL 17/27] Remove unused function declarations

In reply to Michael Tokarev

From: Ladi Prosek <[email protected]>

Unused function declarations were found using a simple gcc plugin and manually verified by grepping the sources.

---
 block/qcow2.h                  | 1 -
 disas/sh4.c                    | 6 ------
 hw/ppc/ppc405.h                | 6 ------
 hw/s390x/virtio-ccw.h          | 1 -
 include/block/block.h          | 6 ------
 include/block/block_int.h      | 9 ---------
 include/hw/arm/pxa.h           | 1 -
 include/hw/bt.h                | 2 --
 include/hw/i386/pc.h           | 2 --
 include/hw/pci-host/spapr.h    | 2 --
 include/hw/pci/pci_bridge.h    | 1 -
 include/hw/pci/pcie_port.h     | 1 -
 include/hw/ppc/ppc4xx.h        | 6 ------
 include/hw/ppc/spapr.h         | 3 ---
 include/hw/ppc/spapr_vio.h     | 4 ----
 include/hw/scsi/scsi.h         | 1 -
 include/hw/virtio/virtio-bus.h | 3 ---
 include/migration/migration.h  | 2 --
 include/net/net.h              | 2 --
 include/qemu/bitmap.h          | 4 ----
 include/qemu/uri.h             | 2 --
 include/sysemu/kvm.h           | 2 --
 include/ui/console.h           | 2 --
 include/ui/input.h             | 2 --
 include/ui/spice-display.h     | 2 --
 target-alpha/cpu.h             | 1 -
 target-m68k/cpu.h              | 1 -
 target-ppc/cpu.h               | 2 --
 target-ppc/mmu-hash64.h        | 1 -
 target-s390x/cpu.h             | 2 --
 tcg/tcg.h                      | 2 --
 31 files changed, 82 deletions(-)
block/qcow2.h +0 -1
index b36a7bf..9ce5a37 100644
@@ -530,7 +530,6 @@ int qcow2_change_refcount_order(BlockDriverState *bs, int refcount_order,
 int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
                         bool exact_size);
 int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index);
-void qcow2_l2_cache_reset(BlockDriverState *bs);
 int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset);
 int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t sector_num,
                           uint8_t *out_buf, const uint8_t *in_buf,
disas/sh4.c +0 -6
index 8b0415d..6b66176 100644
@@ -264,12 +264,6 @@ sh_dsp_reg_nums;
    be some confusion between DSP and FPU etc.  */
 #define SH_ARCH_UNKNOWN_ARCH 0xffffffff
 
-/* These are defined in bfd/cpu-sh.c .  */
-unsigned int sh_get_arch_from_bfd_mach (unsigned long mach);
-unsigned int sh_get_arch_up_from_bfd_mach (unsigned long mach);
-unsigned long sh_get_bfd_mach_from_arch_set (unsigned int arch_set);
-/* bfd_boolean sh_merge_bfd_arch (bfd *ibfd, bfd *obfd); */
-
 /* Below are the 'architecture sets'.
    They describe the following inheritance graph:
 
hw/ppc/ppc405.h +0 -6
index c67febc..a9ffc87 100644
@@ -71,11 +71,5 @@ CPUPPCState *ppc405ep_init(MemoryRegion *address_space_mem,
                         hwaddr ram_sizes[2],
                         uint32_t sysclk, qemu_irq **picp,
                         int do_init);
-/* IBM STBxxx microcontrollers */
-CPUPPCState *ppc_stb025_init (MemoryRegion ram_memories[2],
-                           hwaddr ram_bases[2],
-                           hwaddr ram_sizes[2],
-                           uint32_t sysclk, qemu_irq **picp,
-                           ram_addr_t *offsetp);
 
 #endif /* PPC405_H */
hw/s390x/virtio-ccw.h +0 -1
index 904e357..b58ab21 100644
@@ -183,7 +183,6 @@ typedef struct VirtIORNGCcw {
     VirtIORNG vdev;
 } VirtIORNGCcw;
 
-void virtio_ccw_device_update_status(SubchDev *sch);
 VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch);
 
 #ifdef CONFIG_VIRTFS
include/block/block.h +0 -6
index 7edce5c..ffecebf 100644
@@ -185,11 +185,6 @@ typedef enum BlockOpType {
     BLOCK_OP_TYPE_MAX,
 } BlockOpType;
 
-void bdrv_info_print(Monitor *mon, const QObject *data);
-void bdrv_info(Monitor *mon, QObject **ret_data);
-void bdrv_stats_print(Monitor *mon, const QObject *data);
-void bdrv_info_stats(Monitor *mon, QObject **ret_data);
-
 /* disk I/O throttling */
 void bdrv_init(void);
 void bdrv_init_with_whitelist(void);
@@ -393,7 +388,6 @@ bool bdrv_is_encrypted(BlockDriverState *bs);
 bool bdrv_key_required(BlockDriverState *bs);
 int bdrv_set_key(BlockDriverState *bs, const char *key);
 void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp);
-int bdrv_query_missing_keys(void);
 void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
                          void *opaque);
 const char *bdrv_get_node_name(const BlockDriverState *bs);
include/block/block_int.h +0 -9
index 713cea6..ef3c047 100644
@@ -562,15 +562,6 @@ extern BlockDriver bdrv_file;
 extern BlockDriver bdrv_raw;
 extern BlockDriver bdrv_qcow2;
 
-/**
- * bdrv_setup_io_funcs:
- *
- * Prepare a #BlockDriver for I/O request processing by populating
- * unimplemented coroutine and AIO interfaces with generic wrapper functions
- * that fall back to implemented interfaces.
- */
-void bdrv_setup_io_funcs(BlockDriver *bdrv);
-
 int coroutine_fn bdrv_co_preadv(BdrvChild *child,
     int64_t offset, unsigned int bytes, QEMUIOVector *qiov,
     BdrvRequestFlags flags);
include/hw/arm/pxa.h +0 -1
index dd1a48b..191e068 100644
@@ -83,7 +83,6 @@ typedef struct PXA2xxLCDState PXA2xxLCDState;
 PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
                 hwaddr base, qemu_irq irq);
 void pxa2xx_lcd_vsync_notifier(PXA2xxLCDState *s, qemu_irq handler);
-void pxa2xx_lcdc_oritentation(void *opaque, int angle);
 
 /* pxa2xx_mmci.c */
 typedef struct PXA2xxMMCIState PXA2xxMMCIState;
include/hw/bt.h +0 -2
index 185e79d..963f330 100644
@@ -174,8 +174,6 @@ enum bt_l2cap_psm_predef {
 void bt_l2cap_sdp_init(struct bt_l2cap_device_s *dev);
 
 /* bt-hid.c */
-struct bt_device_s *bt_mouse_init(struct bt_scatternet_s *net);
-struct bt_device_s *bt_tablet_init(struct bt_scatternet_s *net);
 struct bt_device_s *bt_keyboard_init(struct bt_scatternet_s *net);
 
 /* Link Management Protocol layer defines */
include/hw/i386/pc.h +0 -2
index ebba151..ab8e319 100644
@@ -216,7 +216,6 @@ void vmmouse_set_data(const uint32_t *data);
 /* pckbd.c */
 #define I8042_A20_LINE "a20"
 
-void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base);
 void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
                    MemoryRegion *region, ram_addr_t size,
                    hwaddr mask);
@@ -284,7 +283,6 @@ int cmos_get_fd_drive_type(FloppyDriveType fd0);
 I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
                       qemu_irq sci_irq, qemu_irq smi_irq,
                       int smm_enabled, DeviceState **piix4_pm);
-void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
 
 /* hpet.c */
 extern int no_hpet;
include/hw/pci-host/spapr.h +0 -2
index 5adc603..1a2b11b 100644
@@ -106,8 +106,6 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
                           uint32_t xics_phandle,
                           void *fdt);
 
-void spapr_pci_msi_init(sPAPRMachineState *spapr, hwaddr addr);
-
 void spapr_pci_rtas_init(void);
 
 sPAPRPHBState *spapr_pci_find_phb(sPAPRMachineState *spapr, uint64_t buid);
include/hw/pci/pci_bridge.h +0 -1
index 847fd7d..d5891cd 100644
@@ -45,7 +45,6 @@ void pci_bridge_update_mappings(PCIBridge *br);
 void pci_bridge_write_config(PCIDevice *d,
                              uint32_t address, uint32_t val, int len);
 void pci_bridge_disable_base_limit(PCIDevice *dev);
-void pci_bridge_reset_reg(PCIDevice *dev);
 void pci_bridge_reset(DeviceState *qdev);
 
 void pci_bridge_initfn(PCIDevice *pci_dev, const char *typename);
include/hw/pci/pcie_port.h +0 -1
index e167bf7..f7b64db 100644
@@ -53,7 +53,6 @@ struct PCIESlot {
 };
 
 void pcie_chassis_create(uint8_t chassis_number);
-void pcie_main_chassis_create(void);
 PCIESlot *pcie_chassis_find_slot(uint8_t chassis, uint16_t slot);
 int pcie_chassis_add_slot(struct PCIESlot *slot);
 void pcie_chassis_del_slot(PCIESlot *s);
include/hw/ppc/ppc4xx.h +0 -6
index 3b01ae8..66e57a5 100644
@@ -55,10 +55,4 @@ void ppc4xx_sdram_init (CPUPPCState *env, qemu_irq irq, int nbanks,
 
 #define TYPE_PPC4xx_PCI_HOST_BRIDGE "ppc4xx-pcihost"
 
-PCIBus *ppc4xx_pci_init(CPUPPCState *env, qemu_irq pci_irqs[4],
-                        hwaddr config_space,
-                        hwaddr int_ack,
-                        hwaddr special_cycle,
-                        hwaddr registers);
-
 #endif /* PPC4XX_H */
include/hw/ppc/spapr.h +0 -3
index caf7be9..6289d50 100644
@@ -368,9 +368,6 @@ void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn);
 target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode,
                              target_ulong *args);
 
-int spapr_allocate_irq(int hint, bool lsi);
-int spapr_allocate_irq_block(int num, bool lsi, bool msi);
-
 /* ibm,set-eeh-option */
 #define RTAS_EEH_DISABLE                 0
 #define RTAS_EEH_ENABLE                  1
include/hw/ppc/spapr_vio.h +0 -4
index d4a1e2c..40d0e5f 100644
@@ -85,8 +85,6 @@ extern VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg);
 extern int spapr_populate_vdevice(VIOsPAPRBus *bus, void *fdt);
 extern int spapr_populate_chosen_stdout(void *fdt, VIOsPAPRBus *bus);
 
-extern int spapr_vio_signal(VIOsPAPRDevice *dev, target_ulong mode);
-
 static inline qemu_irq spapr_vio_qirq(VIOsPAPRDevice *dev)
 {
     sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
@@ -137,8 +135,6 @@ void spapr_vscsi_create(VIOsPAPRBus *bus);
 
 VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus);
 
-void spapr_vio_quiesce(void);
-
 extern const VMStateDescription vmstate_spapr_vio;
 
 #define VMSTATE_SPAPR_VIO(_f, _s) \
include/hw/scsi/scsi.h +0 -1
index 94d7868..9bad49e 100644
@@ -243,7 +243,6 @@ extern const struct SCSISense sense_code_SPACE_ALLOC_FAILED;
 uint32_t scsi_data_cdb_xfer(uint8_t *buf);
 uint32_t scsi_cdb_xfer(uint8_t *buf);
 int scsi_cdb_length(uint8_t *buf);
-int scsi_sense_valid(SCSISense sense);
 int scsi_build_sense(uint8_t *in_buf, int in_len,
                      uint8_t *buf, int len, bool fixed);
 
include/hw/virtio/virtio-bus.h +0 -3
index f3e5ef3..c98aa52 100644
@@ -111,9 +111,6 @@ void virtio_bus_device_unplugged(VirtIODevice *bus);
 uint16_t virtio_bus_get_vdev_id(VirtioBusState *bus);
 /* Get the config_len field of the plugged device. */
 size_t virtio_bus_get_vdev_config_len(VirtioBusState *bus);
-/* Get the features of the plugged device. */
-uint32_t virtio_bus_get_vdev_features(VirtioBusState *bus,
-                                    uint32_t requested_features);
 /* Get bad features of the plugged device. */
 uint32_t virtio_bus_get_vdev_bad_features(VirtioBusState *bus);
 /* Get config of the plugged device. */
include/migration/migration.h +0 -2
index 3c96623..d4acc72 100644
@@ -229,8 +229,6 @@ void migrate_fd_error(MigrationState *s, const Error *error);
 
 void migrate_fd_connect(MigrationState *s);
 
-int migrate_fd_close(MigrationState *s);
-
 void add_migration_state_change_notifier(Notifier *notify);
 void remove_migration_state_change_notifier(Notifier *notify);
 MigrationState *migrate_init(const MigrationParams *params);
include/net/net.h +0 -2
index e8d9e9e..99b28d5 100644
@@ -138,8 +138,6 @@ NetClientState *qemu_get_queue(NICState *nic);
 NICState *qemu_get_nic(NetClientState *nc);
 void *qemu_get_nic_opaque(NetClientState *nc);
 void qemu_del_net_client(NetClientState *nc);
-NetClientState *qemu_find_vlan_client_by_name(Monitor *mon, int vlan_id,
-                                              const char *client_str);
 typedef void (*qemu_nic_foreach)(NICState *nic, void *opaque);
 void qemu_foreach_nic(qemu_nic_foreach func, void *opaque);
 int qemu_can_send_packet(NetClientState *nc);
include/qemu/bitmap.h +0 -4
index ec5146f..7247f14 100644
@@ -75,10 +75,6 @@ int slow_bitmap_equal(const unsigned long *bitmap1,
                       const unsigned long *bitmap2, long bits);
 void slow_bitmap_complement(unsigned long *dst, const unsigned long *src,
                             long bits);
-void slow_bitmap_shift_right(unsigned long *dst,
-                             const unsigned long *src, int shift, long bits);
-void slow_bitmap_shift_left(unsigned long *dst,
-                            const unsigned long *src, int shift, long bits);
 int slow_bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
                     const unsigned long *bitmap2, long bits);
 void slow_bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
include/qemu/uri.h +0 -2
index de99b3b..d201c61 100644
@@ -102,8 +102,6 @@ typedef struct QueryParams {
 } QueryParams;
 
 struct QueryParams *query_params_new (int init_alloc);
-int query_param_append (QueryParams *ps, const char *name, const char *value);
-extern char *query_param_to_string (const QueryParams *ps);
 extern QueryParams *query_params_parse (const char *query);
 extern void query_params_free (QueryParams *ps);
 
include/sysemu/kvm.h +0 -2
index c9c2436..e6157d4 100644
@@ -327,8 +327,6 @@ MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run);
 
 int kvm_arch_handle_exit(CPUState *cpu, struct kvm_run *run);
 
-int kvm_arch_handle_ioapic_eoi(CPUState *cpu, struct kvm_run *run);
-
 int kvm_arch_process_async_events(CPUState *cpu);
 
 int kvm_arch_get_registers(CPUState *cpu);
include/ui/console.h +0 -2
index 2703a3a..d9c13d2 100644
@@ -394,9 +394,7 @@ QemuUIInfo *qemu_console_get_ui_info(QemuConsole *con);
 int qemu_console_get_width(QemuConsole *con, int fallback);
 int qemu_console_get_height(QemuConsole *con, int fallback);
 
-void text_consoles_set_display(DisplayState *ds);
 void console_select(unsigned int index);
-void console_color_init(DisplayState *ds);
 void qemu_console_resize(QemuConsole *con, int width, int height);
 void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
                        int dst_x, int dst_y, int w, int h);
include/ui/input.h +0 -2
index 102d8a3..d06a12d 100644
@@ -65,6 +65,4 @@ void qemu_input_check_mode_change(void);
 void qemu_add_mouse_mode_change_notifier(Notifier *notify);
 void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
 
-int input_linux_init(void *opaque, QemuOpts *opts, Error **errp);
-
 #endif /* INPUT_H */
include/ui/spice-display.h +0 -2
index 568b64a..42e0fdf 100644
@@ -144,8 +144,6 @@ void qemu_spice_destroy_update(SimpleSpiceDisplay *sdpy, SimpleSpiceUpdate *upda
 void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd);
 void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd);
 void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd);
-void qemu_spice_vm_change_state_handler(void *opaque, int running,
-                                        RunState state);
 void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd);
 
 void qemu_spice_display_update(SimpleSpiceDisplay *ssd,
target-alpha/cpu.h +0 -1
index ac5e801..dcdd041 100644
@@ -474,7 +474,6 @@ int cpu_alpha_signal_handler(int host_signum, void *pinfo,
                              void *puc);
 int alpha_cpu_handle_mmu_fault(CPUState *cpu, vaddr address, int rw,
                                int mmu_idx);
-void do_restore_state(CPUAlphaState *, uintptr_t retaddr);
 void QEMU_NORETURN dynamic_excp(CPUAlphaState *, uintptr_t, int, int);
 void QEMU_NORETURN arith_excp(CPUAlphaState *, uintptr_t, int, uint64_t);
 
target-m68k/cpu.h +0 -1
index b2faa6b..c2d40cb 100644
@@ -196,7 +196,6 @@ enum {
 #define MACSR_EV    0x001
 
 void m68k_set_irq_level(M68kCPU *cpu, int level, uint8_t vector);
-void m68k_set_macsr(CPUM68KState *env, uint32_t val);
 void m68k_switch_sp(CPUM68KState *env);
 
 #define M68K_FPCR_PREC (1 << 6)
target-ppc/cpu.h +0 -2
index 1e808c8..9617481 100644
@@ -1184,8 +1184,6 @@ void ppc_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
                         int flags);
 void ppc_cpu_dump_statistics(CPUState *cpu, FILE *f,
                              fprintf_function cpu_fprintf, int flags);
-int ppc_cpu_get_monitor_def(CPUState *cs, const char *name,
-                            uint64_t *pval);
 hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
 int ppc_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
 int ppc_cpu_gdb_read_register_apple(CPUState *cpu, uint8_t *buf, int reg);
target-ppc/mmu-hash64.h +0 -1
index db265e3..ab5d347 100644
@@ -4,7 +4,6 @@
 #ifndef CONFIG_USER_ONLY
 
 #ifdef TARGET_PPC64
-void ppc_hash64_check_page_sizes(PowerPCCPU *cpu, Error **errp);
 void dump_slb(FILE *f, fprintf_function cpu_fprintf, PowerPCCPU *cpu);
 int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot,
                   target_ulong esid, target_ulong vsid);
target-s390x/cpu.h +0 -2
index ac75360..5645e06 100644
@@ -624,8 +624,6 @@ static inline unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)
     return 0;
 }
 #endif
-void cpu_lock(void);
-void cpu_unlock(void);
 
 extern void subsystem_reset(void);
 
tcg/tcg.h +0 -2
index 1bcabca..9bf31bb 100644
@@ -723,7 +723,6 @@ static inline bool tcg_op_buf_full(void)
 
 void *tcg_malloc_internal(TCGContext *s, int size);
 void tcg_pool_reset(TCGContext *s);
-void tcg_pool_delete(TCGContext *s);
 
 void tb_lock(void);
 void tb_unlock(void);
@@ -907,7 +906,6 @@ void tcg_optimize(TCGContext *s);
 /* only used for debugging purposes */
 void tcg_dump_ops(TCGContext *s);
 
-void dump_ops(const uint16_t *opc_buf, const TCGArg *opparam_buf);
 TCGv_i32 tcg_const_i32(int32_t val);
 TCGv_i64 tcg_const_i64(int64_t val);
 TCGv_i32 tcg_const_local_i32(int32_t val);
Signature · 1 line
2.1.4
#27 lore raw

[Qemu-devel] [PULL 24/27] sheepdog: remove useless casts

In reply to Michael Tokarev

From: Laurent Vivier <[email protected]>

This patch is the result of coccinelle script
scripts/coccinelle/typecast.cocci

---
 block/sheepdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/sheepdog.c +2 -2
index 66e1cb2..ccbf7e1 100644
@@ -1049,7 +1049,7 @@ static int parse_vdiname(BDRVSheepdogState *s, const char *filename,
     const char *host_spec, *vdi_spec;
     int nr_sep, ret;
 
-    strstart(filename, "sheepdog:", (const char **)&filename);
+    strstart(filename, "sheepdog:", &filename);
     p = q = g_strdup(filename);
 
     /* count the number of separators */
@@ -2652,7 +2652,7 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
     req.opcode = SD_OP_READ_VDIS;
     req.data_length = max;
 
-    ret = do_req(fd, s->aio_context, (SheepdogReq *)&req,
+    ret = do_req(fd, s->aio_context, &req,
                  vdi_inuse, &wlen, &rlen);
 
     closesocket(fd);
Signature · 1 line
2.1.4
#28 lore raw
In reply to Michael Tokarev
Your series seems to have some coding style problems. See output below for more information:

Hi,

Your series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PULL 00/27] Trivial patches for 2016-09-14

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3b5f65f mptsas: change .realize function name
9fc4a5e linux-user/qemu.h: change malloc to g_malloc, free to g_free f5721a5 win32: don't run subprocess tests on Mingw32 platform cf0f0f1 sheepdog: remove useless casts
df1254b fw_cfg: remove useless casts
076a4d5 tricore: remove useless cast
c3dc4e3 s390x: remove useless cast
6f4ecbe linux-user,s390x: remove useless cast
3c49ba8 coccinelle: add a script to remove useless casts 7df53c0 curl: Operate on zero-length file
b55d5ea Remove unused function declarations
a4ca535 cpus: update comments
d358c0b cpus: rename local variable to meaningful one 4c1a79b timer: update comments
f9d3c36 ivshmem: Delete duplicate debug message
5e9e4c5 help: Update help to remove misleading display information 5af5845 sh4: fix broken link to documentation
129bf8c MAINTAINERS: Fix up F: entry bit rot
16a49b4 MAINTAINERS: Add some header files to the PC chipset section cb48c25 MAINTAINERS: Fix wildcard for scsi headers
2cf6e9f MAINTAINERS: Add include/sysemu/cpus.h
5041e4f MAINTAINERS: Add include/hw/sh4/ to SH4 section 88f9770 MAINTAINERS: Add include/hw/tricore/ to TriCore section 0b93c13 MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section c5598e3 ui/console: Fix non-working backspace key in monitor of gtk UI 1ace262 tcg: Remove duplicate header includes
f33bd93 Remove remainders of HPPA backend

=== OUTPUT BEGIN ===
Checking PATCH 1/27: Remove remainders of HPPA backend...
Checking PATCH 2/27: tcg: Remove duplicate header includes...
Checking PATCH 3/27: ui/console: Fix non-working backspace key in monitor of gtk UI... Checking PATCH 4/27: MAINTAINERS: Add include/hw/unicore32/ to UniCore32 section... Checking PATCH 5/27: MAINTAINERS: Add include/hw/tricore/ to TriCore section... Checking PATCH 6/27: MAINTAINERS: Add include/hw/sh4/ to SH4 section... Checking PATCH 7/27: MAINTAINERS: Add include/sysemu/cpus.h...
Checking PATCH 8/27: MAINTAINERS: Fix wildcard for scsi headers... Checking PATCH 9/27: MAINTAINERS: Add some header files to the PC chipset section... Checking PATCH 10/27: MAINTAINERS: Fix up F: entry bit rot...
Checking PATCH 11/27: sh4: fix broken link to documentation...
WARNING: line over 80 characters
#25: FILE: hw/sh4/shix.c:26:
+ https://web.archive.org/web/20070917001736/perso.enst.fr/~polti/realisations/shix20

total: 0 errors, 1 warnings, 16 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 12/27: help: Update help to remove misleading display information... Checking PATCH 13/27: ivshmem: Delete duplicate debug message... Checking PATCH 14/27: timer: update comments...
Checking PATCH 15/27: cpus: rename local variable to meaningful one... Checking PATCH 16/27: cpus: update comments...
Checking PATCH 17/27: Remove unused function declarations...
Checking PATCH 18/27: curl: Operate on zero-length file...
Checking PATCH 19/27: coccinelle: add a script to remove useless casts... Checking PATCH 20/27: linux-user,s390x: remove useless cast... Checking PATCH 21/27: s390x: remove useless cast...
Checking PATCH 22/27: tricore: remove useless cast...
Checking PATCH 23/27: fw_cfg: remove useless casts...
ERROR: consider using qemu_strtol in preference to strtol
#24: FILE: hw/nvram/fw_cfg.c:183:
+ boot_splash_time = strtol(p, &p, 10);

ERROR: consider using qemu_strtol in preference to strtol #33: FILE: hw/nvram/fw_cfg.c:243:
+ reboot_timeout = strtol(p, &p, 10);

total: 2 errors, 0 warnings, 16 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 24/27: sheepdog: remove useless casts...
Checking PATCH 25/27: win32: don't run subprocess tests on Mingw32 platform... Checking PATCH 26/27: linux-user/qemu.h: change malloc to g_malloc, free to g_free... Checking PATCH 27/27: mptsas: change .realize function name...
=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]