From patchwork Thu Oct 19 16:18:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 828237 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=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="oHuxFmlV"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yHvwX2rbHz9s72 for ; Fri, 20 Oct 2017 03:47:08 +1100 (AEDT) Received: from localhost ([::1]:50198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DyM-0001KV-Dp for incoming@patchwork.ozlabs.org; Thu, 19 Oct 2017 12:47:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DaJ-00060V-KY for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5DaG-00029n-BH for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:22:15 -0400 Received: from mail-sn1nam01on0045.outbound.protection.outlook.com ([104.47.32.45]:5920 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e5DaG-00029D-0j for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:22:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8l+q5OJM722BgtdBFojxquDjjLY/IxiWEAKWKbMXB1U=; b=oHuxFmlVrTmpiEAGbIaYiSxsNCdxBkQDgsO2sIYiyJZhTC8V9tmrjm3wEcFcYNEf7cr9tA95A03zgKEpyWW4ZUJbHVqIxwyaruQ+nJbX4Iu9sla4qidbkdpsrkjm4F2HWJ0u/zWJbxOlOCZLx0jkmFp6GPd1pgVkO2YwXp3EvTQ= Received: from BN6PR02CA0041.namprd02.prod.outlook.com (10.173.146.155) by BY2PR02MB1330.namprd02.prod.outlook.com (10.162.79.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 19 Oct 2017 16:22:06 +0000 Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by BN6PR02CA0041.outlook.office365.com (2603:10b6:404:5f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Thu, 19 Oct 2017 16:22:06 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT048.mail.protection.outlook.com (10.152.76.109) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 19 Oct 2017 16:22:05 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1e5Da9-00005X-03; Thu, 19 Oct 2017 09:22:05 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1e5Da8-0003FY-SX; Thu, 19 Oct 2017 09:22:04 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v9JGLwDo018168; Thu, 19 Oct 2017 09:21:58 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1e5Da2-0003Bq-BR; Thu, 19 Oct 2017 09:21:58 -0700 From: Alistair Francis To: Date: Thu, 19 Oct 2017 09:18:05 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23404.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(2980300002)(438002)(189002)(199003)(2950100002)(189998001)(5660300001)(81166006)(54906003)(8676002)(6916009)(8936002)(33646002)(118296001)(50226002)(478600001)(77096006)(106002)(81156014)(23676002)(356003)(5820100001)(36386004)(6306002)(2906002)(2351001)(305945005)(4326008)(316002)(63266004)(2870700001)(36756003)(50466002)(9786002)(76176999)(6666003)(47776003)(39060400002)(50986999)(106466001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1330; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT048; 1:Ka9lSH9VUQ4ZrBJl+gNd8Y77WqOV8UXtt8S+O9/+qroAPEKGLhTZUSysCJ3Re9iUxf7J8DkaubP+SkfP8/Qhl7vcCvbCAhZ8bdNSkzIsxsl2VvfSYUC9zcNi7fflSUnD X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c855fe75-950a-4462-c6ca-08d5170d89fb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(8251501002)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR02MB1330; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1330; 3:Myn9l049KDAAIrhRGcWvN0+9DwMe44pX/aKpTvh3usin1T4gbBF3rSEnXTg5lnjhP0HrK6+Do0AF0KlJw1zSEfYFwR9506hdSN/9wDXy9O9tKbr5fKgO4dfhumUNrUE8KSlKhfrP5V34QkqwZH1xWH69laLX5M/JrG46Onuz5y58PqMG8E7pSKO9Ob7bCPiXBdrvFqdPGtZUdX1ok2jx4i168my6r8ICwYOq1Qgk/2rVOBuzdfyOGnxyr5PrtvAhcsNbFNVQmgiZBhKiEDJkzk0jcCHgFveQ2Bl5kflTTiEQzJ7b9D5OMjRY+uXob/asmyoAKgDlda7TSs6uuzD0VD25scjbY8DcJvL+G0BcjVI=; 25:IABOttHjl74QcCfcPBfKeMVycIDUgRNkwW8Rz8Atmu+QC6/3pGaFojTz9TJkhgGqR3gg03zydWTKZ4O8eudc+vp6tzGCxckC/xLIWyWbqZH7OgDaoqGaubA51EMWlKLeyXIHN0JQ/hyYdh4+1u7al9DT4CiTqVRq4dGaRsJe3UI14qO2+otMVO1FayjQgfX3rIgA2uBGxO4KpEnVnER4LS/WIBTJOs4sRmOyQn2bf6HNo/yMOJzWtfoR2JgN1cfX7fVC65ITOnHydOrKCuAsIlEsSmpcBZQwwaYiF4f/VIS6m7mWjg6DgR122PIR0hDWmc4IvOsDSYqSUxUyP89Ahw== X-MS-TrafficTypeDiagnostic: BY2PR02MB1330: X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1330; 31:Fa8guYtBuOEjJJy305mx1oqCyjKKcYL930UxzZEu5uJhvX7RsOo5OCRIOgkqAaY6bUYxG0ooeOTXFaxidG+Fya07vmq2JM1UtOXyHsRbLqZWHOMGREQQ8WxKdNVNKhqMCi+EQNIAd1QCKCFEFGJquoVrUVxBVZJoKAd3i6Kv0naZBFUX3bOmBSi7f4SqVSGOmak3eTS3kaLRjlIDOQmtVge65Az6wsyE6MNsgYy/T+s=; 20:7PhaNL2qopIUzWLMKqa4tVREIQeoaUQRMHqahoevUgUdhVpXjEwUYMMgq72eCoW29E8tf3Toq0IEGZoST/w5h2CCPcZ+zPHOkCvWpx6SHOfoYnehpX8GKGXgUTK5MQGDy3zfElHQsTZtwtdjAe/ebXYK6ti8SM6Pjd6F9UyUrWn20FM0Mn02Ec2q8CfGmYXErCh/OtscCqGaM58jgBFAp4YWXzyaX+xotSGJU1PCcxUpPIw5XNy4Vd4HO0KfzTo9L4CCLdwulSbxtZYlH4nlFoutLFyz5jlQYcDWIw0GZpQkC4TcPBU7xf574WIt2TPOhonij3xVPIEeUV3F9Q7QrkcqjS9eMnlIeTNNLXQ9s9Ua3pMfYN6wQJcbFPFs7yPT8Ejt+QXPQNezmRiJV2glVMQtA8Xzr+l+bacRKAw96X2bZGQN471/dnId1dhDm2CkGmgnOW951Dh2AhFBcNJJKm9jOOEids40KV/lvV3NOX0tSe8+7gH4d+nQgodmPCgM X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(788757137089)(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93004095)(6055026)(6041248)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR02MB1330; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR02MB1330; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1330; 4:KpkPcUl94Qxz5au//vtFBXvC/0lBMiSzgsYA+SJ8Pw5hctyodG94C85Ni6qUdCA/V2VSlrehCnRoyvj8yhXb+6pk1LsCotoqmpzirxoYG6gdYr+rqeXYklUrGfx6qaKD8Zh7Bx37LlvVjQVYSw00JQRpk+TONUteCgNixAp+R72rhBCPzxJY01Da2whwFxiszUZD9GNqB4SPFNGznHuOXxXzpwQGmoW+t6ZZeHm3+ZAkM1UzKzFItkQ7Jt0DMXfM+cmbiFwQdp4NkNT8r+yjTgM0Gdc7BH1mCnWzC6jzbIabH8rgRBA4MCu+mOfSc58LqwNiN7I5fsPvVOzgrSI2UEZPvYcd7WUu0JKnLftf6RSeD24ZQcwspNxQsZEs8iBzC44xSjouCTfkLLboyupkpQ== X-Forefront-PRVS: 0465429B7F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB1330; 23:RyZV/YoYf37iprAKilngyKEboKAoF6Bs24dUHHxrQ?= C8w1BirSJtZPahmzv2iNG4xqvWgBuyMtBND3eimYGxs03VgHBFKdbM3or6N+hv/uzhLzuUOowm0wNfLEGwapObFzEgLKWE/Lhd0dRT374XBrfpDz9p6g1FpRQejqnCZRg7CE6psUozQs38zqbAWco5ao89Z3zdx4QX3vcHYPx/8r1DFC8wWwQIPU95TXkHo/c4jKvCDD/IXFk+wfcKsr+sdiXph8HlnFpK8o/pktRxV5CyJJYkRs4lK1kCwQ83hODryB7Zg64WS6iE0PiEfCcnDNWq0n6eD3RU/nN+z8sVVsPVRtn01+ckjU5ifA+0ZAibOgixKQpAiok8zLEYlweWhukE7QANn6X3yb65ZwV3sYCveZ0asjkSwvZ6VWJP7SlA6tw4qxoype9EiGVfChIMb1mV1omCX3jL+cUJUMfvF3rEK63i/Sk1bJNzcRsRuXex7YkJg6oRsMsK6NK1oLVLk6j6qJrh3dIXBjniUm0n72eZWcU+/j6/saqh0Pxb8tiIj4jYDzsoEWZmVGLRXRoKf5alkRUfr5kSo+mTOvqxcxs7SuNriSbZUSzTVeA278tpSFE9kxdoy1kizvDyGoLQ2u+i6CNHfOFpR6MHuyT/XnsJVvuBNWtJ+D7BwleS7bXVKboS1ABvEY1a5IFtFg18IQy7mCGQCyCu4DIzRVvuCaHe66FrW+W0g4ncM6dAlwrk/hNzGq2UQns+CxRWW0gLoEQjbJeYiQxP9PfLy2fNu5vU58AjnnIg6skBgjhfX7nRkP10eqdUmE5DKiCgdaEVBA/4y4DTUq4XObOvX7B7Hds0PnMTnFPMIgu3C9JBr9t3ue1wqBofj/DsogM2OzqVwQd2fHLxCykEFE5pjBjNuLAaRtrvtDVOGBO66PKELePo+D3yENv9VeJ792IK8zlLVr0CIl51SwF5GQViP/ksdpcgr0/2bfdfk2mNTwEEmWMpPaeu2MJwn/A/Rp9tfKpbWqxGefnkdMUNE+HHruUKOWWiVCODu43jb+8rFSnQo77Dr6Z+clmD+9fbc5fmjDHYp X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1330; 6:XoVbdrQPBk32G0YjPXV1VA6z1/TIMN3ciMDByAbHNfqlipzaC5wr30tLcZP3Arn/Zik9p0QNNNiwoV8i7jJIowAWvaM3z4lIDcS3ETx3wmS5cCgnCafLPsCqYinpFoRoXwOFC/ETBCARb4UsfruEdZhRaHnEsRu026ONYJvEMHXiApRCv8YM2B8MD/dSaAR95jhfIe44pFA2GRJ5W0iVCgBKZ0zPWm8bNQejhb6gDoWXsUTyZ/YyG+XlLaV7K+mppueWJzI3NXJRquPVOitxDwy+d1fPsXWOLEsxRdE1ZjLPw2hYbKgv4+mkCBvC7Z9fsdWtbWL/npMGw6lUqhkW7w==; 5:TV42g3elvaVRoJtE14G9aH5y6sCXPp1j/Q0GSO+BU0ZqKCe92dLJatx5h7L6S2Nv4VpklpiW8jCbfNYqBg2iN5PFCDf/mObyrdwf0F2FWe4qoB6GPB/9AqQJL6efZclUELTBxNDYe/HvyAQN5O02AA==; 24:d979dnlNa2ISnldsAe89DCG3HjaRmX0yvrZJhDH3V167djs8LsU1odVn6RjELSogcVmFTsTjEqdJEM6skwDBU+4tyNhvQnfX6PSSsUO4nvo=; 7:TtvHZs06F4+SR+SeIAJpdKVuLI8OiuuNGL69zsoB8n4AepGvSXU0yuDIA4+H2EJ8HKH0Ckf2hUUiuHAksbEUFfqfoOfBfYX80EYtX5dHIT04GUNuPMvPll9tBW2i75tMPIefSF+gw5M08uD7UazkcuxQ8xCjlUxYpZBPzTxuEtSTqpua24d7rfb2xrTD9JI1nGYSJ/CdQ2gAL+VYVYWPZpZIN2y371ijBo/YhkZqc/M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2017 16:22:05.7285 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB1330 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.32.45 Subject: [Qemu-devel] [PATCH v3 38/46] hw/timer: Replace fprintf(stderr, "*\n" with error_report() 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: alistair23@gmail.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + Some lines where then manually tweaked to pass checkpatch. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- V2: - Split hw patch into individual directories hw/timer/omap_gptimer.c | 11 ++++++----- hw/timer/twl92230.c | 2 +- hw/timer/xilinx_timer.c | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/timer/omap_gptimer.c b/hw/timer/omap_gptimer.c index ae2dc99832..0f064241d3 100644 --- a/hw/timer/omap_gptimer.c +++ b/hw/timer/omap_gptimer.c @@ -18,6 +18,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "qemu/timer.h" #include "hw/arm/omap.h" @@ -356,7 +357,7 @@ static void omap_gp_timer_write(void *opaque, hwaddr addr, case 0x10: /* TIOCP_CFG */ s->config = value & 0x33d; if (((value >> 3) & 3) == 3) /* IDLEMODE */ - fprintf(stderr, "%s: illegal IDLEMODE value in TIOCP_CFG\n", + error_report("%s: illegal IDLEMODE value in TIOCP_CFG", __func__); if (value & 2) /* SOFTRESET */ omap_gp_timer_reset(s); @@ -394,11 +395,11 @@ static void omap_gp_timer_write(void *opaque, hwaddr addr, s->ar = (value >> 1) & 1; s->st = (value >> 0) & 1; if (s->inout && s->trigger != gpt_trigger_none) - fprintf(stderr, "%s: GP timer pin must be an output " - "for this trigger mode\n", __func__); + error_report("%s: GP timer pin must be an output " + "for this trigger mode", __func__); if (!s->inout && s->capture != gpt_capture_none) - fprintf(stderr, "%s: GP timer pin must be an input " - "for this capture mode\n", __func__); + error_report("%s: GP timer pin must be an input " + "for this capture mode", __func__); if (s->trigger == gpt_trigger_none) omap_gp_timer_out(s, s->scpwm); /* TODO: make sure this doesn't overflow 32-bits */ diff --git a/hw/timer/twl92230.c b/hw/timer/twl92230.c index ef116c636c..18880884c6 100644 --- a/hw/timer/twl92230.c +++ b/hw/timer/twl92230.c @@ -614,7 +614,7 @@ static void menelaus_write(void *opaque, uint8_t addr, uint8_t value) break; rtc_badness: default: - fprintf(stderr, "%s: bad RTC_UPDATE value %02x\n", + error_report("%s: bad RTC_UPDATE value %02x", __func__, value); s->status |= 1 << 10; /* RTCERR */ menelaus_update(s); diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 59439c05be..a80bba846b 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -127,7 +127,7 @@ timer_read(void *opaque, hwaddr addr, unsigned int size) break; } - D(fprintf(stderr, "%s timer=%d %x=%x\n", __func__, timer, addr * 4, r)); + D(error_report("%s timer=%d %x=%x", __func__, timer, addr * 4, r)); return r; } @@ -135,7 +135,7 @@ static void timer_enable(struct xlx_timer *xt) { uint64_t count; - D(fprintf(stderr, "%s timer=%d down=%d\n", __func__, + D(error_report("%s timer=%d down=%d", __func__, xt->nr, xt->regs[R_TCSR] & TCSR_UDT)); ptimer_stop(xt->ptimer); @@ -160,7 +160,7 @@ timer_write(void *opaque, hwaddr addr, addr >>= 2; timer = timer_from_addr(addr); xt = &t->timers[timer]; - D(fprintf(stderr, "%s addr=%x val=%x (timer=%d off=%d)\n", + D(error_report("%s addr=%x val=%x (timer=%d off=%d)", __func__, addr * 4, value, timer, addr & 3)); /* Further decoding to address a specific timers reg. */ addr &= 3; @@ -197,7 +197,7 @@ static void timer_hit(void *opaque) { struct xlx_timer *xt = opaque; struct timerblock *t = xt->parent; - D(fprintf(stderr, "%s %d\n", __func__, xt->nr)); + D(error_report("%s %d", __func__, xt->nr)); xt->regs[R_TCSR] |= TCSR_TINT; if (xt->regs[R_TCSR] & TCSR_ARHT)