qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11
@ 2016-01-11  8:41 Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline Michael Tokarev
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev

This is the first trivial-patches pull request for 2016 year, and
the first one for qemu 2.6 series.  With some old stuff in there,
collecting missing patches since Nov-2015.

There's nothing exciting in there, except of a possible fun patch
enabling sigaltstack syscall.

Please consider applying/pulling.

Thanks,

/mjt

The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +0000)

are available in the git repository at:

  git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2016-01-11

for you to fetch changes up to fe02fc5209d497d011b2b4b09395e2503d9dedc6:

  hw/s390x: Remove superfluous return statements (2016-01-11 11:39:28 +0300)

----------------------------------------------------------------
trivial patches for 2016-01-11

----------------------------------------------------------------
Cao jin (5):
      xen/Makefile.objs: simplify
      hw/misc/edu: Convert to realize()
      gt64120: convert to realize()
      SH PCI Host: convert to realize()
      PCI Bonito: QOMify and cleanup

Eric Blake (1):
      crypto: Fix typo in example

Johan Ouwerkerk (1):
      Add missing syscall nrs. according to more recent Linux kernels

Marc-André Lureau (1):
      configure: fix trace backend check

Michael Tokarev (2):
      unicore32: convert get_sp_from_cpustate from macro to inline
      linux-user: enable sigaltstack for all architectures

Paolo Bonzini (1):
      net: convert qemu_log to error_report, fix message

Peter Maydell (2):
      scripts/checkpatch.pl: Don't allow special cases of unspaced operators
      osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h

Thomas Huth (5):
      MAINTAINERS: Add the correct device_tree.h file
      hw/ide: Remove superfluous return statements
      hw/acpi: Remove superfluous return statement
      hw/core/qdev: Remove superfluous return statement
      hw/s390x: Remove superfluous return statements

Zhu Lingshan (1):
      iscsi: fix readcapacity error message

 MAINTAINERS                          |  3 ++-
 block/iscsi.c                        |  2 +-
 configure                            |  2 +-
 hw/acpi/memory_hotplug.c             |  1 -
 hw/core/qdev.c                       |  1 -
 hw/ide/atapi.c                       |  1 -
 hw/ide/macio.c                       |  2 --
 hw/mips/gt64xxx_pci.c                |  6 ++----
 hw/misc/edu.c                        |  6 ++----
 hw/pci-host/bonito.c                 | 23 ++++++++++++-----------
 hw/s390x/css.c                       |  1 -
 hw/s390x/s390-pci-bus.c              |  4 ----
 hw/sh4/sh_pci.c                      |  5 ++---
 hw/xen/Makefile.objs                 |  3 +--
 include/crypto/tlssession.h          |  2 +-
 include/qemu-common.h                |  1 -
 include/qemu/osdep.h                 |  2 ++
 linux-user/aarch64/syscall_nr.h      | 13 +++++++++++++
 linux-user/arm/syscall_nr.h          | 12 ++++++++++++
 linux-user/mips/syscall_nr.h         | 12 ++++++++++++
 linux-user/syscall.c                 |  6 ------
 linux-user/unicore32/target_signal.h |  6 +++++-
 net/dump.c                           |  2 +-
 scripts/checkpatch.pl                | 13 -------------
 24 files changed, 69 insertions(+), 60 deletions(-)

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

* [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 02/19] linux-user: enable sigaltstack for all architectures Michael Tokarev
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev

All other architectures define get_sp_from_cpustate as an inline function,
only unicore32 uses a #define.  With this, some usages are impossible, for
example, enabling sigaltstack in linux-user/syscall.c results in

linux-user/syscall.c: In function ‘do_syscall’:
linux-user/syscall.c:8299:39: error: dereferencing ‘void *’ pointer [-Werror]
  get_sp_from_cpustate(arg1, arg2, get_sp_from_cpustate((CPUArchState *)cpu_env));
                                       ^
linux-user/syscall.c:8299:39: error: request for member ‘regs’ in something not a structure or union

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/unicore32/target_signal.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/linux-user/unicore32/target_signal.h b/linux-user/unicore32/target_signal.h
index 8b255c4..7c44238 100644
--- a/linux-user/unicore32/target_signal.h
+++ b/linux-user/unicore32/target_signal.h
@@ -21,6 +21,10 @@ typedef struct target_sigaltstack {
 #define TARGET_SS_ONSTACK               1
 #define TARGET_SS_DISABLE               2
 
-#define get_sp_from_cpustate(cpustate)  (cpustate->regs[29])
+static inline abi_ulong get_sp_from_cpustate(CPUUniCore32State *state)
+{
+    return state->regs[29];
+}
+
 
 #endif /* TARGET_SIGNAL_H */
-- 
2.1.4

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

* [Qemu-devel] [PULL 02/19] linux-user: enable sigaltstack for all architectures
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 03/19] net: convert qemu_log to error_report, fix message Michael Tokarev
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev

There is no reason to limit sigaltstack syscall to just a few
architectures and pretend it is not implemented for others.

If some architecture is not ready for this, that architecture
should be fixed instead.

This fixes LP#1516408.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/syscall.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 6c64ba6..3ceb3e2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8292,14 +8292,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
     }
     case TARGET_NR_sigaltstack:
-#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_MIPS) || \
-    defined(TARGET_SPARC) || defined(TARGET_PPC) || defined(TARGET_ALPHA) || \
-    defined(TARGET_M68K) || defined(TARGET_S390X) || defined(TARGET_OPENRISC)
         ret = do_sigaltstack(arg1, arg2, get_sp_from_cpustate((CPUArchState *)cpu_env));
         break;
-#else
-        goto unimplemented;
-#endif
 
 #ifdef CONFIG_SENDFILE
     case TARGET_NR_sendfile:
-- 
2.1.4

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

* [Qemu-devel] [PULL 03/19] net: convert qemu_log to error_report, fix message
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 02/19] linux-user: enable sigaltstack for all architectures Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 04/19] iscsi: fix readcapacity error message Michael Tokarev
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Michael Tokarev

From: Paolo Bonzini <pbonzini@redhat.com>

Ensure that the error is printed with the proper timestamp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 net/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dump.c b/net/dump.c
index ce16a4b..1c05f78 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -84,7 +84,7 @@ static ssize_t dump_receive_iov(DumpState *s, const struct iovec *iov, int cnt)
     cnt = iov_copy(&dumpiov[1], cnt, iov, cnt, 0, caplen);
 
     if (writev(s->fd, dumpiov, cnt + 1) != sizeof(hdr) + caplen) {
-        qemu_log("-net dump write error - stop dump\n");
+        error_report("network dump write error - stopping dump");
         close(s->fd);
         s->fd = -1;
     }
-- 
2.1.4

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

* [Qemu-devel] [PULL 04/19] iscsi: fix readcapacity error message
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (2 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 03/19] net: convert qemu_log to error_report, fix message Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 05/19] MAINTAINERS: Add the correct device_tree.h file Michael Tokarev
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Zhu Lingshan

From: Zhu Lingshan <lszhu@suse.com>

fix:The error message for readcapacity 16 incorrectly mentioned
a readcapacity 10 failure, fixed the error message.

Signed-off-by: Zhu Lingshan <lszhu@suse.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 block/iscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index bd1f1bf..eb28ddc 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1270,7 +1270,7 @@ static void iscsi_readcapacity_sync(IscsiLun *iscsilun, Error **errp)
              && retries-- > 0);
 
     if (task == NULL || task->status != SCSI_STATUS_GOOD) {
-        error_setg(errp, "iSCSI: failed to send readcapacity10 command.");
+        error_setg(errp, "iSCSI: failed to send readcapacity10/16 command");
     } else if (!iscsilun->block_size ||
                iscsilun->block_size % BDRV_SECTOR_SIZE) {
         error_setg(errp, "iSCSI: the target returned an invalid "
-- 
2.1.4

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

* [Qemu-devel] [PULL 05/19] MAINTAINERS: Add the correct device_tree.h file
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (3 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 04/19] iscsi: fix readcapacity error message Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 06/19] crypto: Fix typo in example Michael Tokarev
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

device_tree.h is not in the main directory, but under
include/sysemu/ nowadays.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5a62ecd..de5439d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1036,7 +1036,8 @@ Device Tree
 M: Peter Crosthwaite <crosthwaite.peter@gmail.com>
 M: Alexander Graf <agraf@suse.de>
 S: Maintained
-F: device_tree.[ch]
+F: device_tree.c
+F: include/sysemu/device_tree.h
 
 Error reporting
 M: Markus Armbruster <armbru@redhat.com>
-- 
2.1.4

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

* [Qemu-devel] [PULL 06/19] crypto: Fix typo in example
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (4 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 05/19] MAINTAINERS: Add the correct device_tree.h file Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 07/19] xen/Makefile.objs: simplify Michael Tokarev
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev

From: Eric Blake <eblake@redhat.com>

The example code wouldn't even compile, since it did not use
a consistent spelling for the Error ** parameter.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/crypto/tlssession.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/crypto/tlssession.h b/include/crypto/tlssession.h
index b38fe69..d356a8d 100644
--- a/include/crypto/tlssession.h
+++ b/include/crypto/tlssession.h
@@ -56,7 +56,7 @@
  *
  * static int mysock_run_tls(int sockfd,
  *                           QCryptoTLSCreds *creds,
- *                           Error *erp)
+ *                           Error *errp)
  * {
  *    QCryptoTLSSession *sess;
  *
-- 
2.1.4

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

* [Qemu-devel] [PULL 07/19] xen/Makefile.objs: simplify
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (5 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 06/19] crypto: Fix typo in example Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 08/19] configure: fix trace backend check Michael Tokarev
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Cao jin, Michael Tokarev

From: Cao jin <caoj.fnst@cn.fujitsu.com>

merge last two lines, keep alphabetic order.

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/xen/Makefile.objs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs
index a9ad7e7..d367094 100644
--- a/hw/xen/Makefile.objs
+++ b/hw/xen/Makefile.objs
@@ -2,5 +2,4 @@
 common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o
 
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o xen_pt_graphics.o
+obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o
-- 
2.1.4

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

* [Qemu-devel] [PULL 08/19] configure: fix trace backend check
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (6 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 07/19] xen/Makefile.objs: simplify Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 09/19] hw/misc/edu: Convert to realize() Michael Tokarev
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Marc-André Lureau, Michael Tokarev

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Found thanks to shellcheck!

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 83b40fc..44ac9ab 100755
--- a/configure
+++ b/configure
@@ -4817,7 +4817,7 @@ echo "libcap-ng support $cap_ng"
 echo "vhost-net support $vhost_net"
 echo "vhost-scsi support $vhost_scsi"
 echo "Trace backends    $trace_backends"
-if test "$trace_backend" = "simple"; then
+if have_backend "simple"; then
 echo "Trace output file $trace_file-<pid>"
 fi
 if test "$spice" = "yes"; then
-- 
2.1.4

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

* [Qemu-devel] [PULL 09/19] hw/misc/edu: Convert to realize()
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (7 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 08/19] configure: fix trace backend check Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 10/19] Add missing syscall nrs. according to more recent Linux kernels Michael Tokarev
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Cao jin, Michael Tokarev

From: Cao jin <caoj.fnst@cn.fujitsu.com>

for educational PCI device

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/misc/edu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index fe50b42..43d5b18 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -327,7 +327,7 @@ static void *edu_fact_thread(void *opaque)
     return NULL;
 }
 
-static int pci_edu_init(PCIDevice *pdev)
+static void pci_edu_realize(PCIDevice *pdev, Error **errp)
 {
     EduState *edu = DO_UPCAST(EduState, pdev, pdev);
     uint8_t *pci_conf = pdev->config;
@@ -344,8 +344,6 @@ static int pci_edu_init(PCIDevice *pdev)
     memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu,
                     "edu-mmio", 1 << 20);
     pci_register_bar(pdev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &edu->mmio);
-
-    return 0;
 }
 
 static void pci_edu_uninit(PCIDevice *pdev)
@@ -385,7 +383,7 @@ static void edu_class_init(ObjectClass *class, void *data)
 {
     PCIDeviceClass *k = PCI_DEVICE_CLASS(class);
 
-    k->init = pci_edu_init;
+    k->realize = pci_edu_realize;
     k->exit = pci_edu_uninit;
     k->vendor_id = PCI_VENDOR_ID_QEMU;
     k->device_id = 0x11e8;
-- 
2.1.4

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

* [Qemu-devel] [PULL 10/19] Add missing syscall nrs. according to more recent Linux kernels
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (8 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 09/19] hw/misc/edu: Convert to realize() Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 11/19] gt64120: convert to realize() Michael Tokarev
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Johan Ouwerkerk, Michael Tokarev

From: Johan Ouwerkerk <jm.ouwerkerk@gmail.com>

This change covers arm, aarch64, mips. Others to follow?

The change was prompted by QEMU warning about a syscall 384 (get_random())
with Debian armhf binaries (ARMv7).

Signed-off-by: Johan Ouwerkerk <jm.ouwerkerk@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 linux-user/aarch64/syscall_nr.h | 13 +++++++++++++
 linux-user/arm/syscall_nr.h     | 12 ++++++++++++
 linux-user/mips/syscall_nr.h    | 12 ++++++++++++
 3 files changed, 37 insertions(+)

diff --git a/linux-user/aarch64/syscall_nr.h b/linux-user/aarch64/syscall_nr.h
index 743255d..74f4275 100644
--- a/linux-user/aarch64/syscall_nr.h
+++ b/linux-user/aarch64/syscall_nr.h
@@ -262,6 +262,19 @@
 #define TARGET_NR_process_vm_writev 271
 #define TARGET_NR_kcmp 272
 #define TARGET_NR_finit_module 273
+
+#define TARGET_NR_sched_setattr 274
+#define TARGET_NR_sched_getattr 275
+#define TARGET_NR_renameat2 276
+#define TARGET_NR_seccomp 277
+#define TARGET_NR_getrandom 278
+#define TARGET_NR_memfd_create 279
+#define TARGET_NR_bpf 280
+#define TARGET_NR_execveat 281
+#define TARGET_NR_userfaultfd 282
+#define TARGET_NR_membarrier 283
+#define TARGET_NR_mlock2 284
+
 #define TARGET_NR_open 1024
 #define TARGET_NR_link 1025
 #define TARGET_NR_unlink 1026
diff --git a/linux-user/arm/syscall_nr.h b/linux-user/arm/syscall_nr.h
index 53552be..cc9089c 100644
--- a/linux-user/arm/syscall_nr.h
+++ b/linux-user/arm/syscall_nr.h
@@ -384,3 +384,15 @@
 #define TARGET_NR_process_vm_writev            (377)
 #define TARGET_NR_kcmp                         (378)
 #define TARGET_NR_finit_module                 (379)
+
+#define TARGET_NR_sched_setattr                (380)
+#define TARGET_NR_sched_getattr                (381)
+#define TARGET_NR_renameat2                    (382)
+#define TARGET_NR_seccomp                      (383)
+#define TARGET_NR_getrandom                    (384)
+#define TARGET_NR_memfd_create                 (385)
+#define TARGET_NR_bpf                          (386)
+#define TARGET_NR_execveat                     (387)
+#define TARGET_NR_userfaultfd                  (388)
+#define TARGET_NR_membarrier                   (389)
+#define TARGET_NR_mlock2                       (390)
diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h
index 2d1a13e..6819f86 100644
--- a/linux-user/mips/syscall_nr.h
+++ b/linux-user/mips/syscall_nr.h
@@ -351,3 +351,15 @@
 #define TARGET_NR_process_vm_writev     (TARGET_NR_Linux + 346)
 #define TARGET_NR_kcmp                  (TARGET_NR_Linux + 347)
 #define TARGET_NR_finit_module          (TARGET_NR_Linux + 348)
+
+#define TARGET_NR_sched_setattr         (TARGET_NR_Linux + 349)
+#define TARGET_NR_sched_getattr         (TARGET_NR_Linux + 350)
+#define TARGET_NR_renameat2             (TARGET_NR_Linux + 351)
+#define TARGET_NR_seccomp               (TARGET_NR_Linux + 352)
+#define TARGET_NR_getrandom             (TARGET_NR_Linux + 353)
+#define TARGET_NR_memfd_create          (TARGET_NR_Linux + 354)
+#define TARGET_NR_bpf                   (TARGET_NR_Linux + 355)
+#define TARGET_NR_execveat              (TARGET_NR_Linux + 356)
+#define TARGET_NR_userfaultfd           (TARGET_NR_Linux + 357)
+#define TARGET_NR_membarrier            (TARGET_NR_Linux + 358)
+#define TARGET_NR_mlock2                (TARGET_NR_Linux + 359)
-- 
2.1.4

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

* [Qemu-devel] [PULL 11/19] gt64120: convert to realize()
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (9 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 10/19] Add missing syscall nrs. according to more recent Linux kernels Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 12/19] SH PCI Host: " Michael Tokarev
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Cao jin, Michael Tokarev

From: Cao jin <caoj.fnst@cn.fujitsu.com>

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/mips/gt64xxx_pci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index f76a9fd..c1f3c9c 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -1193,7 +1193,7 @@ static int gt64120_init(SysBusDevice *dev)
     return 0;
 }
 
-static int gt64120_pci_init(PCIDevice *d)
+static void gt64120_pci_realize(PCIDevice *d, Error **errp)
 {
     /* FIXME: Malta specific hw assumptions ahead */
     pci_set_word(d->config + PCI_COMMAND, 0);
@@ -1207,8 +1207,6 @@ static int gt64120_pci_init(PCIDevice *d)
     pci_set_long(d->config + PCI_BASE_ADDRESS_4, 0x14000000);
     pci_set_long(d->config + PCI_BASE_ADDRESS_5, 0x14000001);
     pci_set_byte(d->config + 0x3d, 0x01);
-
-    return 0;
 }
 
 static void gt64120_pci_class_init(ObjectClass *klass, void *data)
@@ -1216,7 +1214,7 @@ static void gt64120_pci_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    k->init = gt64120_pci_init;
+    k->realize = gt64120_pci_realize;
     k->vendor_id = PCI_VENDOR_ID_MARVELL;
     k->device_id = PCI_DEVICE_ID_MARVELL_GT6412X;
     k->revision = 0x10;
-- 
2.1.4

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

* [Qemu-devel] [PULL 12/19] SH PCI Host: convert to realize()
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (10 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 11/19] gt64120: convert to realize() Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 13/19] PCI Bonito: QOMify and cleanup Michael Tokarev
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Cao jin, Michael Tokarev

From: Cao jin <caoj.fnst@cn.fujitsu.com>

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/sh4/sh_pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c
index a2f6d9e..4509053 100644
--- a/hw/sh4/sh_pci.c
+++ b/hw/sh4/sh_pci.c
@@ -151,12 +151,11 @@ static int sh_pci_device_init(SysBusDevice *dev)
     return 0;
 }
 
-static int sh_pci_host_init(PCIDevice *d)
+static void sh_pci_host_realize(PCIDevice *d, Error **errp)
 {
     pci_set_word(d->config + PCI_COMMAND, PCI_COMMAND_WAIT);
     pci_set_word(d->config + PCI_STATUS, PCI_STATUS_CAP_LIST |
                  PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM);
-    return 0;
 }
 
 static void sh_pci_host_class_init(ObjectClass *klass, void *data)
@@ -164,7 +163,7 @@ static void sh_pci_host_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
     DeviceClass *dc = DEVICE_CLASS(klass);
 
-    k->init = sh_pci_host_init;
+    k->realize = sh_pci_host_realize;
     k->vendor_id = PCI_VENDOR_ID_HITACHI;
     k->device_id = PCI_DEVICE_ID_HITACHI_SH7751R;
     /*
-- 
2.1.4

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

* [Qemu-devel] [PULL 13/19] PCI Bonito: QOMify and cleanup
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (11 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 12/19] SH PCI Host: " Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators Michael Tokarev
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Cao jin, Michael Tokarev

From: Cao jin <caoj.fnst@cn.fujitsu.com>

Also clear the code

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/pci-host/bonito.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 4139a2c..b477679 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -180,8 +180,6 @@
 #define PCI_ADDR(busno,devno,funno,regno)  \
     ((((busno)<<16)&0xff0000) + (((devno)<<11)&0xf800) + (((funno)<<8)&0x700) + (regno))
 
-#define TYPE_BONITO_PCI_HOST_BRIDGE "Bonito-pcihost"
-
 typedef struct BonitoState BonitoState;
 
 typedef struct PCIBonitoState
@@ -215,17 +213,20 @@ typedef struct PCIBonitoState
 
 } PCIBonitoState;
 
-#define BONITO_PCI_HOST_BRIDGE(obj) \
-    OBJECT_CHECK(BonitoState, (obj), TYPE_BONITO_PCI_HOST_BRIDGE)
-
 struct BonitoState {
     PCIHostState parent_obj;
-
     qemu_irq *pic;
-
     PCIBonitoState *pci_dev;
 };
 
+#define TYPE_BONITO_PCI_HOST_BRIDGE "Bonito-pcihost"
+#define BONITO_PCI_HOST_BRIDGE(obj) \
+    OBJECT_CHECK(BonitoState, (obj), TYPE_BONITO_PCI_HOST_BRIDGE)
+
+#define TYPE_PCI_BONITO "Bonito"
+#define PCI_BONITO(obj) \
+    OBJECT_CHECK(PCIBonitoState, (obj), TYPE_PCI_BONITO)
+
 static void bonito_writel(void *opaque, hwaddr addr,
                           uint64_t val, unsigned size)
 {
@@ -723,7 +724,7 @@ static int bonito_pcihost_initfn(SysBusDevice *dev)
 
 static void bonito_realize(PCIDevice *dev, Error **errp)
 {
-    PCIBonitoState *s = DO_UPCAST(PCIBonitoState, dev, dev);
+    PCIBonitoState *s = PCI_BONITO(dev);
     SysBusDevice *sysbus = SYS_BUS_DEVICE(s->pcihost);
     PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
 
@@ -799,8 +800,8 @@ PCIBus *bonito_init(qemu_irq *pic)
     qdev_init_nofail(dev);
 
     /* set the pcihost pointer before bonito_initfn is called */
-    d = pci_create(phb->bus, PCI_DEVFN(0, 0), "Bonito");
-    s = DO_UPCAST(PCIBonitoState, dev, d);
+    d = pci_create(phb->bus, PCI_DEVFN(0, 0), TYPE_PCI_BONITO);
+    s = PCI_BONITO(d);
     s->pcihost = pcihost;
     pcihost->pci_dev = s;
     qdev_init_nofail(DEVICE(d));
@@ -828,7 +829,7 @@ static void bonito_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo bonito_info = {
-    .name          = "Bonito",
+    .name          = TYPE_PCI_BONITO,
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIBonitoState),
     .class_init    = bonito_class_init,
-- 
2.1.4

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

* [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (12 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 13/19] PCI Bonito: QOMify and cleanup Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 15/19] osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h Michael Tokarev
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Peter Maydell, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

The checkpatch.pl script has a special case to permit the following
operators to have no spaces around them:
 <<  >>  &  ^  |  +  -  *  /  %

QEMU style prefers all operators to consistently have spacing around
them, so remove this special case handling. This avoids reviewers
having to manually note it during code review.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 scripts/checkpatch.pl | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0f6e11..efca817 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1890,19 +1890,6 @@ sub process {
 						ERROR("space prohibited after that '$op' $at\n" . $hereptr);
 					}
 
-
-				# << and >> may either have or not have spaces both sides
-				} elsif ($op eq '<<' or $op eq '>>' or
-					 $op eq '&' or $op eq '^' or $op eq '|' or
-					 $op eq '+' or $op eq '-' or
-					 $op eq '*' or $op eq '/' or
-					 $op eq '%')
-				{
-					if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
-						ERROR("need consistent spacing around '$op' $at\n" .
-							$hereptr);
-					}
-
 				# A colon needs no spaces before when it is
 				# terminating a case value or a label.
 				} elsif ($opv eq ':C' || $opv eq ':L') {
-- 
2.1.4

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

* [Qemu-devel] [PULL 15/19] osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (13 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 16/19] hw/ide: Remove superfluous return statements Michael Tokarev
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Peter Maydell, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

Our use of glib is now pervasive across QEMU. Move the include of glib-compat.h
from qemu-common.h to osdep.h so that it is more widely accessible and doesn't
get forgotten by accident. (Failure to include it will result in build failure
on old versions of glib which is likely to be unnoticed by most developers.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/qemu-common.h | 1 -
 include/qemu/osdep.h  | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/qemu-common.h b/include/qemu-common.h
index 405364f..22b010c 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -22,7 +22,6 @@
 
 #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
 
-#include "glib-compat.h"
 #include "qemu/option.h"
 #include "qemu/host-utils.h"
 
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 84e84ac..59a7f8d 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -69,6 +69,8 @@
 #include "sysemu/os-posix.h"
 #endif
 
+#include "glib-compat.h"
+
 #include "qapi/error.h"
 
 #if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10
-- 
2.1.4

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

* [Qemu-devel] [PULL 16/19] hw/ide: Remove superfluous return statements
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (14 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 15/19] osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 17/19] hw/acpi: Remove superfluous return statement Michael Tokarev
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Michael Tokarev, qemu-block

From: Thomas Huth <thuth@redhat.com>

The "return;" statements at the end of functions do not make
much sense, so let's remove them.

Cc: qemu-block@nongnu.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/ide/atapi.c | 1 -
 hw/ide/macio.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 65f8dd4..272ab90 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -824,7 +824,6 @@ static void cmd_inquiry(IDEState *s, uint8_t *buf)
  out:
     buf[size_idx] = idx - preamble_len;
     ide_atapi_cmd_reply(s, idx, max_len);
-    return;
 }
 
 static void cmd_get_configuration(IDEState *s, uint8_t *buf)
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 3ee962f..9771261 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -292,8 +292,6 @@ done:
         block_acct_done(blk_get_stats(s->blk), &s->acct);
     }
     io->dma_end(opaque);
-
-    return;
 }
 
 static void pmac_ide_transfer_cb(void *opaque, int ret)
-- 
2.1.4

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

* [Qemu-devel] [PULL 17/19] hw/acpi: Remove superfluous return statement
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (15 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 16/19] hw/ide: Remove superfluous return statements Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 18/19] hw/core/qdev: " Michael Tokarev
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Igor Mammedov, Thomas Huth, Michael Tokarev,
	Michael S. Tsirkin

From: Thomas Huth <thuth@redhat.com>

The "return;" statement at the end of acpi_memory_plug_cb()
does not make much sense, so let's remove it.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/acpi/memory_hotplug.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 298e868..65cbc80 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -250,7 +250,6 @@ void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st,
         /* do ACPI magic */
         acpi_send_gpe_event(ar, irq, ACPI_MEMORY_HOTPLUG_STATUS);
     }
-    return;
 }
 
 void acpi_memory_unplug_request_cb(ACPIREGS *ar, qemu_irq irq,
-- 
2.1.4

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

* [Qemu-devel] [PULL 18/19] hw/core/qdev: Remove superfluous return statement
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (16 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 17/19] hw/acpi: Remove superfluous return statement Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11  8:41 ` [Qemu-devel] [PULL 19/19] hw/s390x: Remove superfluous return statements Michael Tokarev
  2016-01-11 14:21 ` [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The "return;" statement at the end of device_set_realized()
does not make much sense, so let's remove it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/core/qdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index b3ad467..4e3173d 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -1134,7 +1134,6 @@ post_realize_fail:
 
 fail:
     error_propagate(errp, local_err);
-    return;
 }
 
 static bool device_get_hotpluggable(Object *obj, Error **errp)
-- 
2.1.4

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

* [Qemu-devel] [PULL 19/19] hw/s390x: Remove superfluous return statements
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (17 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 18/19] hw/core/qdev: " Michael Tokarev
@ 2016-01-11  8:41 ` Michael Tokarev
  2016-01-11 14:21 ` [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Michael Tokarev @ 2016-01-11  8:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-trivial, Michael Tokarev, Alexander Graf,
	Christian Borntraeger, Cornelia Huck, Richard Henderson

From: Thomas Huth <thuth@redhat.com>

The "return;" statements at the end of functions do not make
much sense, so let's remove them.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/s390x/css.c          | 1 -
 hw/s390x/s390-pci-bus.c | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 19851ce..343c352 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1430,7 +1430,6 @@ void subch_device_save(SubchDev *s, QEMUFile *f)
     }
     qemu_put_byte(f, s->ccw_fmt_1);
     qemu_put_byte(f, s->ccw_no_data_cnt);
-    return;
 }
 
 int subch_device_load(SubchDev *s, QEMUFile *f)
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 98c726c..8de35ff 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -123,7 +123,6 @@ void s390_pci_sclp_configure(int configure, SCCB *sccb)
     }
 
     psccb->header.response_code = cpu_to_be16(rc);
-    return;
 }
 
 static uint32_t s390_pci_get_pfid(PCIDevice *pdev)
@@ -439,8 +438,6 @@ static void s390_msi_ctrl_write(void *opaque, hwaddr addr, uint64_t data,
         io_int_word = (pbdev->isc << 27) | IO_INT_WORD_AI;
         s390_io_interrupt(0, 0, 0, io_int_word);
     }
-
-    return;
 }
 
 static uint64_t s390_msi_ctrl_read(void *opaque, hwaddr addr, unsigned size)
@@ -561,7 +558,6 @@ static void s390_pcihost_hot_plug(HotplugHandler *hotplug_dev,
         s390_pci_generate_plug_event(HP_EVENT_TO_CONFIGURED,
                                      pbdev->fh, pbdev->fid);
     }
-    return;
 }
 
 static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
-- 
2.1.4

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

* Re: [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11
  2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
                   ` (18 preceding siblings ...)
  2016-01-11  8:41 ` [Qemu-devel] [PULL 19/19] hw/s390x: Remove superfluous return statements Michael Tokarev
@ 2016-01-11 14:21 ` Peter Maydell
  19 siblings, 0 replies; 21+ messages in thread
From: Peter Maydell @ 2016-01-11 14:21 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: QEMU Trivial, QEMU Developers

On 11 January 2016 at 08:41, Michael Tokarev <mjt@tls.msk.ru> wrote:
> This is the first trivial-patches pull request for 2016 year, and
> the first one for qemu 2.6 series.  With some old stuff in there,
> collecting missing patches since Nov-2015.
>
> There's nothing exciting in there, except of a possible fun patch
> enabling sigaltstack syscall.
>
> Please consider applying/pulling.
>
> Thanks,
>
> /mjt
>
> The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +0000)
>
> are available in the git repository at:
>
>   git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2016-01-11
>
> for you to fetch changes up to fe02fc5209d497d011b2b4b09395e2503d9dedc6:
>
>   hw/s390x: Remove superfluous return statements (2016-01-11 11:39:28 +0300)
>
> ----------------------------------------------------------------
> trivial patches for 2016-01-11
>

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2016-01-11 14:22 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11  8:41 [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 01/19] unicore32: convert get_sp_from_cpustate from macro to inline Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 02/19] linux-user: enable sigaltstack for all architectures Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 03/19] net: convert qemu_log to error_report, fix message Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 04/19] iscsi: fix readcapacity error message Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 05/19] MAINTAINERS: Add the correct device_tree.h file Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 06/19] crypto: Fix typo in example Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 07/19] xen/Makefile.objs: simplify Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 08/19] configure: fix trace backend check Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 09/19] hw/misc/edu: Convert to realize() Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 10/19] Add missing syscall nrs. according to more recent Linux kernels Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 11/19] gt64120: convert to realize() Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 12/19] SH PCI Host: " Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 13/19] PCI Bonito: QOMify and cleanup Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 15/19] osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 16/19] hw/ide: Remove superfluous return statements Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 17/19] hw/acpi: Remove superfluous return statement Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 18/19] hw/core/qdev: " Michael Tokarev
2016-01-11  8:41 ` [Qemu-devel] [PULL 19/19] hw/s390x: Remove superfluous return statements Michael Tokarev
2016-01-11 14:21 ` [Qemu-devel] [PULL 00/19] Trivial patches for 2016-01-11 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).