summaryrefslogtreecommitdiffstats
path: root/hw/bt/hci-csr.c
diff options
context:
space:
mode:
authorPeter Maydell2018-01-23 11:15:09 +0100
committerPeter Maydell2018-01-23 11:15:09 +0100
commit52483b067cce4a88ffbf8fbeea26de7549d2ad23 (patch)
treec8f9427d96d10d0c123866ce2e2ea943660e9a1d /hw/bt/hci-csr.c
parentmigration: Revert postcopy-blocktime commit set (diff)
parenthw/isa: Replace fprintf(stderr, "*\n" with error_report() (diff)
downloadqemu-52483b067cce4a88ffbf8fbeea26de7549d2ad23.tar.gz
qemu-52483b067cce4a88ffbf8fbeea26de7549d2ad23.tar.xz
qemu-52483b067cce4a88ffbf8fbeea26de7549d2ad23.zip
Merge remote-tracking branch 'remotes/huth/tags/pull-request-2018-01-22' into staging
Pull request for various patches that have been reviewed and laying on the mailing list for a while, but apparently no maintainer feels really responsible for picking up. # gpg: Signature made Mon 22 Jan 2018 11:10:16 GMT # gpg: using RSA key 0x2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth/tags/pull-request-2018-01-22: hw/isa: Replace fprintf(stderr, "*\n" with error_report() hw/ipmi: Replace fprintf(stderr, "*\n" with error_report() hw/bt: Replace fprintf(stderr, "*\n" with error_report() Fixes after renaming __FUNCTION__ to __func__ Replace all occurances of __FUNCTION__ with __func__ tests/cpu-plug-test: Test CPU hot-plugging on s390x tests/cpu-plug-test: Check CPU hot-plugging on ppc64, too tests/cpu-plug-test: Check the CPU hot-plugging with device_add, too tests: Rename pc-cpu-test.c to cpu-plug-test.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/bt/hci-csr.c')
-rw-r--r--hw/bt/hci-csr.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c
index d13192b9b5..0341ded50c 100644
--- a/hw/bt/hci-csr.c
+++ b/hw/bt/hci-csr.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu-common.h"
#include "chardev/char-serial.h"
#include "qemu/timer.h"
@@ -111,14 +112,14 @@ static uint8_t *csrhci_out_packet(struct csrhci_s *s, int len)
if (off < FIFO_LEN) {
if (off + len > FIFO_LEN && (s->out_size = off + len) > FIFO_LEN * 2) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ error_report("%s: can't alloc %i bytes", __func__, len);
exit(-1);
}
return s->outfifo + off;
}
if (s->out_len > s->out_size) {
- fprintf(stderr, "%s: can't alloc %i bytes\n", __FUNCTION__, len);
+ error_report("%s: can't alloc %i bytes", __func__, len);
exit(-1);
}
@@ -168,10 +169,10 @@ static void csrhci_in_packet_vendor(struct csrhci_s *s, int ocf,
s->bd_addr.b[5] = data[offset + 2];
s->hci->bdaddr_set(s->hci, s->bd_addr.b);
- fprintf(stderr, "%s: bd_address loaded from firmware: "
- "%02x:%02x:%02x:%02x:%02x:%02x\n", __FUNCTION__,
- s->bd_addr.b[0], s->bd_addr.b[1], s->bd_addr.b[2],
- s->bd_addr.b[3], s->bd_addr.b[4], s->bd_addr.b[5]);
+ error_report("%s: bd_address loaded from firmware: "
+ "%02x:%02x:%02x:%02x:%02x:%02x", __func__,
+ s->bd_addr.b[0], s->bd_addr.b[1], s->bd_addr.b[2],
+ s->bd_addr.b[3], s->bd_addr.b[4], s->bd_addr.b[5]);
}
rpkt = csrhci_out_packet_event(s, EVT_VENDOR, 11);
@@ -181,7 +182,7 @@ static void csrhci_in_packet_vendor(struct csrhci_s *s, int ocf,
break;
default:
- fprintf(stderr, "%s: got a bad CMD packet\n", __FUNCTION__);
+ error_report("%s: got a bad CMD packet", __func__);
return;
}
@@ -226,7 +227,7 @@ static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
case H4_NEG_PKT:
if (s->in_hdr != sizeof(csrhci_neg_packet) ||
memcmp(pkt - 1, csrhci_neg_packet, s->in_hdr)) {
- fprintf(stderr, "%s: got a bad NEG packet\n", __FUNCTION__);
+ error_report("%s: got a bad NEG packet", __func__);
return;
}
pkt += 2;
@@ -241,7 +242,7 @@ static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
case H4_ALIVE_PKT:
if (s->in_hdr != 4 || pkt[1] != 0x55 || pkt[2] != 0x00) {
- fprintf(stderr, "%s: got a bad ALIVE packet\n", __FUNCTION__);
+ error_report("%s: got a bad ALIVE packet", __func__);
return;
}
@@ -254,7 +255,7 @@ static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
default:
bad_pkt:
/* TODO: error out */
- fprintf(stderr, "%s: got a bad packet\n", __FUNCTION__);
+ error_report("%s: got a bad packet", __func__);
break;
}