From patchwork Wed Feb 6 15:28:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1037604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vlq961qTz9s7T for ; Thu, 7 Feb 2019 02:34:13 +1100 (AEDT) Received: from localhost ([127.0.0.1]:52697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grPDH-0003eD-Qo for incoming@patchwork.ozlabs.org; Wed, 06 Feb 2019 10:34:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grP87-0000Dx-Le for qemu-devel@nongnu.org; Wed, 06 Feb 2019 10:28:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grP84-0004SP-0a for qemu-devel@nongnu.org; Wed, 06 Feb 2019 10:28:49 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:54505) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grP7y-0004MF-7T; Wed, 06 Feb 2019 10:28:43 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdvyo-1hR0rH2Ah4-00b6Hi; Wed, 06 Feb 2019 16:28:25 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 16:28:07 +0100 Message-Id: <20190206152807.31896-8-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206152807.31896-1-laurent@vivier.eu> References: <20190206152807.31896-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:phOavywWNVsBXnFLU/hFHxIScoTktw3Qh/cVYO372smu4BBlmfV XUNo2yZVTe/BsPKV/y/aH3A1JX7WQsx93NvEXfuTAokUN9QkxOjXSMiHwTivcYWdExj9NNL QhLIH23R1KLOyamY7xPolasgu52p2sSMZli94sXl6a2e3giG6pxSGx+GOoy2zkfXF6L/HIA oMKqUfAGcp9J5XK+7WS4g== X-UI-Out-Filterresults: notjunk:1; V03:K0:sdjldisaT/0=:X/4oGKqGeTTdlov8fhN/Ke IQoqbwXHMiJ6v1ywy/NiLpo7nc9u3+DF730xIpzqcMgWQMAfn2GGpcW96t/c5UHbSMcK+8R/i omziyUBz7sCmpGnjOnOIEeMW7Xtx3uZBlP4zzlhxq0QBfFFMRI0I1T5ua97bNThgR8h4O+wMY SKB/8WQyqkyflj5/B25SUt/1NVSRuKD1CoA3ioL6m8tL33hnajgTtvA/mys1UdUb2CCZ/GZLD u1OqevcVVcSbloRxh7nYX/3a8+zTT3fBiDe1dhxtA3FhNFhA8gE4VaeAtIwQGrNxuDI4XH69M LqVyawOZZy522PClRruNp7JF8Hf+69WpcUNIgdieDdNmaHVi/YuzZeaR/kwTiLmpkF5eNNh81 W7tclnk0kySxybCXxK29zQTLuyWaV6BNgPy6z2Pt5Nz+2vzCpLCjU4IFgjBeOmcmJ2nS3v6BD tzNC+Ph8DHifE/A55TYFuOneYBNmjoDrBOpC86q/wel5OMfzP9qmG7y9gB9RfQVt1gu7kmC65 vWmwMmQIey4W0PxgyKzWAkyTeW5An4bs9ri7gKXQSBjw1DqUY9UL4Rw3a0hNzJWvUc/SmFTbw nlOBKXrUuQSwr0H+yWtR5qhj0Lyvt2RVVmDEVDpzkIMyimyRMhucwQSPZNjSiFBMTMHUeBonQ 8K3gsFc8ACZqTPhK1lFbxM28uLnxOJWZllnYkhL9zKj1jV9g5qd+DH5zWPcU6YBhN+wwlE0DM 9sJwB9o+sFQZopacDLDAhmj6OXrvfRHnEVr3e4ellcRCBAxAyJQmSvYPYj4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Eduardo Habkost , qemu-trivial@nongnu.org, Mark Cave-Ayland , Anthony Green , Michael Tokarev , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Guan Xuetao , Artyom Tarasenko , Stefano Garzarella Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé When building with TSC_VERBOSE not defined, we get: CC arm-softmmu/hw/input/tsc210x.o hw/input/tsc210x.c: In function ‘tsc2102_data_register_write’: hw/input/tsc210x.c:554:5: error: label at end of compound statement default: ^~~~~~~ hw/input/tsc210x.c: In function ‘tsc2102_control_register_write’: hw/input/tsc210x.c:638:5: error: label at end of compound statement bad_reg: ^~~~~~~ hw/input/tsc210x.c: In function ‘tsc2102_audio_register_write’: hw/input/tsc210x.c:766:5: error: label at end of compound statement default: ^~~~~~~ make[1]: *** [rules.mak:69: hw/input/tsc210x.o] Error 1 Fix this by replacing the culprit fprintf(stderr) calls by a more recent API: qemu_log_mask(LOG_GUEST_ERROR). Other fprintf() calls are left untouched. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Stefano Garzarella Message-Id: <20190204204517.23698-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- hw/input/tsc210x.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c index ded0db9351..2eb3cb9518 100644 --- a/hw/input/tsc210x.c +++ b/hw/input/tsc210x.c @@ -552,10 +552,8 @@ static void tsc2102_data_register_write( return; default: -#ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_data_register_write: " - "no such register: 0x%02x\n", reg); -#endif + qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_data_register_write: " + "no such register: 0x%02x\n", reg); } } @@ -636,10 +634,8 @@ static void tsc2102_control_register_write( default: bad_reg: -#ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_control_register_write: " - "no such register: 0x%02x\n", reg); -#endif + qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_control_register_write: " + "no such register: 0x%02x\n", reg); } } @@ -764,10 +760,8 @@ static void tsc2102_audio_register_write( return; default: -#ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_audio_register_write: " - "no such register: 0x%02x\n", reg); -#endif + qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_audio_register_write: " + "no such register: 0x%02x\n", reg); } }