Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/985267/?format=api
{ "id": 985267, "url": "http://patchwork.ozlabs.org/api/patches/985267/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20181017082702.5581-5-armbru@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20181017082702.5581-5-armbru@redhat.com>", "list_archive_url": null, "date": "2018-10-17T08:26:28", "name": "[v4,04/38] cpus hw target: Use warn_report() & friends to report warnings", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "00d3c53f195638465b1dfabe0fd64bcf657f4a6f", "submitter": { "id": 2645, "url": "http://patchwork.ozlabs.org/api/people/2645/?format=api", "name": "Markus Armbruster", "email": "armbru@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20181017082702.5581-5-armbru@redhat.com/mbox/", "series": [ { "id": 71196, "url": "http://patchwork.ozlabs.org/api/series/71196/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=71196", "date": "2018-10-17T08:26:36", "name": "Replace some unwise uses of error_report() & friends", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/71196/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/985267/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/985267/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=redhat.com" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 42ZmGr4zNJz9s55\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 17 Oct 2018 19:55:32 +1100 (AEDT)", "from localhost ([::1]:34639 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1gChc1-0006Xd-Jg\n\tfor incoming@patchwork.ozlabs.org; Wed, 17 Oct 2018 04:55:29 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:51479)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1gChB5-0000L6-2K\n\tfor qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:27:40 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1gChB3-000218-64\n\tfor qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:27:38 -0400", "from mx1.redhat.com ([209.132.183.28]:52726)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1gChB2-0001hi-Ll\n\tfor qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:27:36 -0400", "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id C3E0430E4EB3;\n\tWed, 17 Oct 2018 08:27:27 +0000 (UTC)", "from blackfin.pond.sub.org (ovpn-116-50.ams2.redhat.com\n\t[10.36.116.50])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id DD27D19E17;\n\tWed, 17 Oct 2018 08:27:03 +0000 (UTC)", "by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 241541132D83; Wed, 17 Oct 2018 10:27:02 +0200 (CEST)" ], "From": "Markus Armbruster <armbru@redhat.com>", "To": "qemu-devel@nongnu.org", "Date": "Wed, 17 Oct 2018 10:26:28 +0200", "Message-Id": "<20181017082702.5581-5-armbru@redhat.com>", "In-Reply-To": "<20181017082702.5581-1-armbru@redhat.com>", "References": "<20181017082702.5581-1-armbru@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.43]);\n\tWed, 17 Oct 2018 08:27:27 +0000 (UTC)", "Content-Transfer-Encoding": "quoted-printable", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]", "X-Received-From": "209.132.183.28", "Subject": "[Qemu-devel] [PATCH v4 04/38] cpus hw target: Use warn_report() &\n\tfriends to report warnings", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "Wei Huang <wei@redhat.com>, Fam Zheng <famz@redhat.com>, Mark Cave-Ayland\n\t<mark.cave-ayland@ilande.co.uk>, Alex Williamson\n\t<alex.williamson@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?=\n\t<alex.bennee@linaro.org>, \tDavid Gibson <david@gibson.dropbear.id.au>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Calling error_report() in a function that takes an Error ** argument\nis suspicious. Convert a few that are actually warnings to\nwarn_report().\n\nWhile there, split a warning consisting of multiple sentences to\nconform to conventions spelled out in warn_report()'s contract.\n\nCc: Alex Bennée <alex.bennee@linaro.org>\nCc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\nCc: Alex Williamson <alex.williamson@redhat.com>\nCc: Fam Zheng <famz@redhat.com>\nCc: Wei Huang <wei@redhat.com>\nCc: David Gibson <david@gibson.dropbear.id.au>\nSigned-off-by: Markus Armbruster <armbru@redhat.com>\nAcked-by: David Gibson <david@gibson.dropbear.id.au>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\n---\n cpus.c | 8 ++++----\n hw/display/cg3.c | 2 +-\n hw/display/tcx.c | 2 +-\n hw/misc/ivshmem.c | 4 ++--\n hw/net/virtio-net.c | 8 ++++----\n hw/virtio/virtio-pci.c | 4 ++--\n target/i386/cpu.c | 17 +++++++++--------\n target/ppc/translate_init.inc.c | 4 ++--\n 8 files changed, 25 insertions(+), 24 deletions(-)", "diff": "diff --git a/cpus.c b/cpus.c\nindex 361678e459..7804071872 100644\n--- a/cpus.c\n+++ b/cpus.c\n@@ -211,12 +211,12 @@ void qemu_tcg_configure(QemuOpts *opts, Error **errp)\n error_setg(errp, \"No MTTCG when icount is enabled\");\n } else {\n #ifndef TARGET_SUPPORTS_MTTCG\n- error_report(\"Guest not yet converted to MTTCG - \"\n- \"you may get unexpected results\");\n+ warn_report(\"Guest not yet converted to MTTCG - \"\n+ \"you may get unexpected results\");\n #endif\n if (!check_tcg_memory_orders_compatible()) {\n- error_report(\"Guest expects a stronger memory ordering \"\n- \"than the host provides\");\n+ warn_report(\"Guest expects a stronger memory ordering \"\n+ \"than the host provides\");\n error_printf(\"This may cause strange/hard to debug errors\\n\");\n }\n mttcg_enabled = true;\ndiff --git a/hw/display/cg3.c b/hw/display/cg3.c\nindex 1c199ab369..e50d97e48c 100644\n--- a/hw/display/cg3.c\n+++ b/hw/display/cg3.c\n@@ -307,7 +307,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp)\n ret = load_image_mr(fcode_filename, &s->rom);\n g_free(fcode_filename);\n if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {\n- error_report(\"cg3: could not load prom '%s'\", CG3_ROM_FILE);\n+ warn_report(\"cg3: could not load prom '%s'\", CG3_ROM_FILE);\n }\n }\n \ndiff --git a/hw/display/tcx.c b/hw/display/tcx.c\nindex b2786ee8d0..66f2459226 100644\n--- a/hw/display/tcx.c\n+++ b/hw/display/tcx.c\n@@ -823,7 +823,7 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)\n ret = load_image_mr(fcode_filename, &s->rom);\n g_free(fcode_filename);\n if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {\n- error_report(\"tcx: could not load prom '%s'\", TCX_ROM_FILE);\n+ warn_report(\"tcx: could not load prom '%s'\", TCX_ROM_FILE);\n }\n }\n \ndiff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c\nindex 8cb17b9dd4..f88910e55c 100644\n--- a/hw/misc/ivshmem.c\n+++ b/hw/misc/ivshmem.c\n@@ -1288,8 +1288,8 @@ static void ivshmem_realize(PCIDevice *dev, Error **errp)\n IVShmemState *s = IVSHMEM_COMMON(dev);\n \n if (!qtest_enabled()) {\n- error_report(\"ivshmem is deprecated, please use ivshmem-plain\"\n- \" or ivshmem-doorbell instead\");\n+ warn_report(\"ivshmem is deprecated, please use ivshmem-plain\"\n+ \" or ivshmem-doorbell instead\");\n }\n \n if (qemu_chr_fe_backend_connected(&s->server_chr) + !!s->shmobj != 1) {\ndiff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c\nindex 4bdd5b8532..385b1a03e9 100644\n--- a/hw/net/virtio-net.c\n+++ b/hw/net/virtio-net.c\n@@ -2020,10 +2020,10 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp)\n \n if (n->net_conf.tx && strcmp(n->net_conf.tx, \"timer\")\n && strcmp(n->net_conf.tx, \"bh\")) {\n- error_report(\"virtio-net: \"\n- \"Unknown option tx=%s, valid options: \\\"timer\\\" \\\"bh\\\"\",\n- n->net_conf.tx);\n- error_report(\"Defaulting to \\\"bh\\\"\");\n+ warn_report(\"virtio-net: \"\n+ \"Unknown option tx=%s, valid options: \\\"timer\\\" \\\"bh\\\"\",\n+ n->net_conf.tx);\n+ error_printf(\"Defaulting to \\\"bh\\\"\");\n }\n \n n->net_conf.tx_queue_size = MIN(virtio_net_max_tx_queue_size(n),\ndiff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c\nindex 3a01fe90f0..a954799267 100644\n--- a/hw/virtio/virtio-pci.c\n+++ b/hw/virtio/virtio-pci.c\n@@ -1683,8 +1683,8 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)\n if (err) {\n /* Notice when a system that supports MSIx can't initialize it */\n if (err != -ENOTSUP) {\n- error_report(\"unable to init msix vectors to %\" PRIu32,\n- proxy->nvectors);\n+ warn_report(\"unable to init msix vectors to %\" PRIu32,\n+ proxy->nvectors);\n }\n proxy->nvectors = 0;\n }\ndiff --git a/target/i386/cpu.c b/target/i386/cpu.c\nindex c88876dfe3..9d4217afba 100644\n--- a/target/i386/cpu.c\n+++ b/target/i386/cpu.c\n@@ -5123,14 +5123,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)\n * NOTE: the following code has to follow qemu_init_vcpu(). Otherwise\n * cs->nr_threads hasn't be populated yet and the checking is incorrect.\n */\n- if (IS_AMD_CPU(env) &&\n- !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) &&\n- cs->nr_threads > 1 && !ht_warned) {\n- error_report(\"This family of AMD CPU doesn't support \"\n- \"hyperthreading(%d). Please configure -smp \"\n- \"options properly or try enabling topoext feature.\",\n- cs->nr_threads);\n- ht_warned = true;\n+ if (IS_AMD_CPU(env) &&\n+ !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) &&\n+ cs->nr_threads > 1 && !ht_warned) {\n+ warn_report(\"This family of AMD CPU doesn't support \"\n+ \"hyperthreading(%d)\",\n+ cs->nr_threads);\n+ error_printf(\"Please configure -smp options properly\"\n+ \" or try enabling topoext feature.\\n\");\n+ ht_warned = true;\n }\n \n x86_cpu_apic_realize(cpu, &local_err);\ndiff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c\nindex 263e63cb03..ee9432eb15 100644\n--- a/target/ppc/translate_init.inc.c\n+++ b/target/ppc/translate_init.inc.c\n@@ -8381,8 +8381,8 @@ static void getset_compat_deprecated(Object *obj, Visitor *v, const char *name,\n QNull *null = NULL;\n \n if (!qtest_enabled()) {\n- error_report(\"CPU 'compat' property is deprecated and has no effect; \"\n- \"use max-cpu-compat machine property instead\");\n+ warn_report(\"CPU 'compat' property is deprecated and has no effect; \"\n+ \"use max-cpu-compat machine property instead\");\n }\n visit_type_null(v, name, &null, NULL);\n qobject_unref(null);\n", "prefixes": [ "v4", "04/38" ] }