From patchwork Thu Oct 19 16:16:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 828199 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="4Xsweaid"; 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 3yHvRj4rn3z9t7p for ; Fri, 20 Oct 2017 03:25:36 +1100 (AEDT) Received: from localhost ([::1]:50085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DdX-0008Ef-3t for incoming@patchwork.ozlabs.org; Thu, 19 Oct 2017 12:25:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5DYs-0004mm-Gk for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5DYp-0001Re-8I for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:20:46 -0400 Received: from mail-bn3nam01on0049.outbound.protection.outlook.com ([104.47.33.49]:41728 helo=NAM01-BN3-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 1e5DYp-0001RE-0Y for qemu-devel@nongnu.org; Thu, 19 Oct 2017 12:20:43 -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=mhcBzN85Xaa7DdXHZ874JeJdhCaa90G+wMGmcl55W1E=; b=4XsweaidsV25Y1U81t3KYB6gf3Ss52J9USHHvyyx8PDNiPttFOO4Cix3bFzauKhXOFxzk1XNLfXUq91SvljHrySIOOl2GMRg1pV9VF/DeF2uHiZHE3hATQ6o7aqqfi9H1CCyBGFgYtY1nmpZe3NmCy8/KRnR9tVQntEFqRcbGA8= Received: from MWHPR02CA0001.namprd02.prod.outlook.com (10.168.209.139) by MWHPR02MB3389.namprd02.prod.outlook.com (10.164.187.166) 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:20:41 +0000 Received: from CY1NAM02FT031.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by MWHPR02CA0001.outlook.office365.com (2603:10b6:300:4b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Thu, 19 Oct 2017 16:20:41 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none;suse.de; 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 CY1NAM02FT031.mail.protection.outlook.com (10.152.75.180) 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:20:40 +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 1e5DYm-0008Vd-4x; Thu, 19 Oct 2017 09:20:40 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1e5DYm-0002zV-24; Thu, 19 Oct 2017 09:20:40 -0700 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v9JGKWsl017870; Thu, 19 Oct 2017 09:20:32 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1e5DYe-0002yc-6Z; Thu, 19 Oct 2017 09:20:32 -0700 From: Alistair Francis To: Date: Thu, 19 Oct 2017 09:16:39 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: 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)(376002)(39860400002)(2980300002)(438002)(189002)(199003)(118296001)(54906003)(9786002)(16586007)(106002)(36386004)(316002)(50986999)(5660300001)(5003940100001)(189998001)(76176999)(2906002)(36756003)(77096006)(2351001)(39060400002)(4326008)(47776003)(63266004)(6916009)(305945005)(356003)(478600001)(106466001)(48376002)(50226002)(33646002)(50466002)(8676002)(2950100002)(81156014)(8936002)(81166006)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB3389; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT031; 1:akegFpkied3ELdF2WDcd+4XKdKbjxXud2DsoZAn67F4DEFiL0QqUS2v01yue2QuDnmI/Ok6So+ujEDoZk/kHuDDoWR8v8O5eIlO+dZfczM/xfEJ7HlliANUDw5X70Eca MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1f1c51e-62e7-4c8d-51e0-08d5170d5781 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(8251501002)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR02MB3389; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3389; 3:ywOmNQZhhtlzxTKLIscDdF8KRuJVuPWy1KcqnUeyQQPQ55IOjljtM7a7PVM1M27vPJZBKL7WkkSMwrfZHGMW4RCY8b+I+dyYbkByx+8i05SU4JglDpKQGQxW5Ss/KJHS/4HijVGgdBTH27QrUHkAg59SByeYJB3m7nQX1TyAZHBeQgHdba59n31ZuJUQpX+UTzGi1C20+kiZ9sFlPbXU/99GNUhAtSJiQwF5MdmaDWCIxktp5IEsbCwd4gJfd/2U31+U5EJ3d5OpVACn2O54xEcUUI193a0BQTOH+P2AIOE4/VIhzJAA5dBg8nROrUz9YsnYdsA1eAB/+Z4kJt8B8st4vVRf4mUmJcW2P4Mbx4U=; 25:4JWgKmMfDbcVTzHn8pxtZcwepx5XOtNCZGwGcROgI4qY8N0g6W+0R6ebRrKhBKCrcDZrRarXBe+V0Yqya78i4W3ydl/gSD7Ss1457IpufwqXLfzlFCuiL74zBqSsFXhh+3ssibWJhj15rCe2RV0pNSaOBnDluuRhiGEgvshUkR4UcIWIrXGzwRt2i7JizNpiwSOW5KMuQNvrmGat3rbYSBmkVJTdPNlOwzsgZGAlkzwzsAKimkL7WduZvgAQQDytC/GPQUm3v33+3nwzgLohk2J8tcyaUwPX9pxX5Zife/cOJiWiVxRsd8BAgJOMBjz57ewuBVndvMAU2qNqmUds0g== X-MS-TrafficTypeDiagnostic: MWHPR02MB3389: X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3389; 31:uZM/kt0x8huH/LeMhAt/gEC3iN58Xrgyw6mOmmaC42tZji3UTwKTBJhA7tARwCX/FF31JwpekDEazOllViUQWRxDvMpjESOZ20BoKmWH1yhBQFHXa/ciScLE4DxLAaOG8fMFA8XT/6z022pOse3+oOuw7nmX9TlS/GUoeB5eM8AQEInSzFwhcrrbkt3n57G5eQ2Mr1D7e6NVjoX8pn8tskn11y5SEvat+bAMyLHomDk=; 20:QidXbvAOB5UERwVb39ynTab/1HqrZtaBbKUYaR9PkKdCKgTb43OmY0i2PYU/2KtIQcBJGfGodbOwq4Ium8RHLAv5C0LD9FUpBmupkW8iRsCyzYe6awLRLVQQSE48//Yuwg9tcWpBiKD4OOy13e31UwHzkDI9AkJGwo5sA7XpPxnZg09NLGQ+EJZj2FE4rr0dpHEYEwVwGptlzMWWKisuB3D2mh3w5VpqDv7qHRqVLHh9pe4j6tZ++CFG+h6tziahpLhyp6XAuGlltCiCfmBjU/XWrHXKdbkwjUdhT1kTUoABDhcsBr4INixvwBj/BGKxI0VHo4flSza8vRU7a7R0k8ss4gE5/rpxik/8YyAfSLV5eEZassnUD7r6F0AluI1i6jV6beudEbIljF1yiJha1W5v3g29DanIgpmp2CzEVCQCLIr9IZtFu7F8dj79apcbK4tf5xJHnnZimwuCErgDNJOxE14RY4IIerdro0LL3RyVCXQ1nU7zmhU3wCIr08U/ X-Exchange-Antispam-Report-Test: UriScan:(788757137089)(190383065149520)(192813158149592)(104084551191319); 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)(93006095)(93004095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR02MB3389; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR02MB3389; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3389; 4:VG5ZTbS/oFEIBeoEFp5owiwOLBnLJbEi9ygaPrrkT2kcG7GigecbtRB87kll7iVxsOKan2POpoH/JYo3l7XTYUcq9+t5ae/05uRj5cqeCjtgt2Oo+6BOdpkezt8ANDfn+urOhS9hL3Qgz7kaal//edr9Atk7A9VYCKg5z9mgkaqJQLuHNZflSRgkILu6r7R7IxBYuSQbW31TXiURj0iHkRWYXVGb3xf1W2uYvBpBKwS0IYAG+UBCHrj8lwbxYOScfCb5sapUkfcwGSobO2gAndMVhx7qoJcNhO3JmH1PgR+g3bCigoVyK0SciNa7h6qRTqcOIvRWuHNfZBNzndVoyuQB8EGz0+zxBiQwVhlv7c5JS8IyDmcG1857/YR9Zl1MNhCekMLtxmeVxlnvcn3Hsg== X-Forefront-PRVS: 0465429B7F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR02MB3389; 23:N9d7lxVOni9nCwfp/hVdPhklNIlbfQUcpCademwZR?= OfVF+Bk+e5EabsERwT70x6PHrWz3MhW6nRmaJWxQ7lMyODC28BxGMWrxAFq1h8SmC1wN9rgYzA76Iz+3V3MWtnqjkYlg1R04I5wDNxnewATdGCMm9QcLmRbQx+PfklgXENvNAxx3FsbR3d/tehtl9OLQzDq+H7Dn1iadkSVssv6jWKnDOZEnF71/QfvgpXC6K6/nhsc8eucNcfIM+/U6DI7qKbCI6H2lR7zX2q3zHMikoWdXJ5ZQy2mToep9zapXpzFwj/cc8Z+CKKybjP+HsSQrZ3r4Fr1J/TK52HuLr83wrQuXl4aN6BYClc3uwfnTAlLS7MQnIv2OdcDSSkbc0to6PjCtKn6apu+gwAip9x8oY1FnRDZWU+iDGGoGyYoxnu/UEj8UnHM1Ma0zS4YXQR0lfvsLjdn841YzTdsM8veyhtJOVrXVuUDM9vKY/8kywA0kSmCSpfXpPQ5S6geAtrKGwF4y6FrC/W+WqjHhEsKON49/XT+JZ51nw1s3w7xTvhkAYDQNCfhd/O0rHtozgpcP3ztaHlijost61ZBIRc23+cjZrbcsl15JOCAbcCMbiknVNLnDi4xZKsFO6basLyIJv87SHUfbF8qAwKuFvs+EuJNolqMgy6KzqJRB3askeyHYEFwLI/j71fUrkux8gMOZPjuuyT3QDjEvC0M0yyMhKLEYUtokHX6SO5Jn+HngTjj9N6A5PtBSA9PQnznHY0g2WhF0GzbUsPOpCudserjdZIS2GulTXs6zg0iWyliOGhMHxw03LpQTfC2YCng5FEesQA8EtWajpdcMLjeAfXxeXEYJdde3kkYdhs9XesU12CEwAoX9uxXqQ7uw/WThCOBTG85V8EtsD843tUwqFGzOSYvdaTLchmfA79kIa6G0GeqzoN0F+F8HNXcpauxq0QPrBWJY9P2EnIU/KSazrjunHTXvaDF2eYfjqVrvD5nGRYwiE33AS59PpFb1V2y5TJRjQmLQRWcRgLZ68vxLZ6WPA== X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB3389; 6:OM0QqvJ5ffb18ctAedE000rJUhDuavNl4x6RTyXdvnsFYShT+D29MrqjMN45IJ3csmZpcO4sn4cHUkAiXecOwCiKJvEdUOF8U5x3wjNljZ62qYRSR5+vsjeCYWBLIMdu9Uj8uXBytnmp88Zj/vyTIWZMjpV0uSgmSKpJsna8m9HdjEB9a4kyN9X8VGIKWiVJUICeS1z3qmgl8PfkvLDDSvvMMLXYJPFH+twwEuSCKRBavtTc5/k5eslDUlYzJcj19PlYbjZEk0ueTWPlnEoT0WUUV4oh/ischFLcSRgFvwfgEvE1oMYlHp/dPHJmHScFr8yyNttw+E5uS8j5kRKxnQ==; 5:E75RWrX592edvrZm9OpTwYpYtgkZ7CB0USRkcjt10MARIogK7EOlI8S0B8CJExTRYBshXGJQH7WHPnIsWE44Zh5G3ux4APt3DH6TgQ6Gve07e0u/xOTtKtMNoqaSKmySgjZA9dJvNUpsFTYvs9HbPA==; 24:LlAdoevMWkVq0/5Xli/TYvuP+Z8vl2zrjg1WHo0J8UA/QJ85kQ77CoY0wGOQPFLO8GqGchDzUcOgsiWSFzUV4ho0wPsafyBVqTZAF3b/Th4=; 7:cn4aKueqRBy5ChCgYEd8j0+2ANVwGlr1DwRZf0TGrJwl7ejcqdhCchsEiNUdgr9QQ7HRB0M22SQnL8ffH7DaE4fiPzACMEg7o4iepLCuKmWutCFjs1B2vqzThTCg6xw69co4rQMZTZ2CiIa3a+Edf2wrh7kb/MJM7X/ozLv1ZvA7dwBTqmsw/WmoNGvoJ8Jqj1S0/QUDTbBErwfY4hI/pr5Z/0RsxNC0G5XRQMEB+zw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2017 16:20:40.8055 (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: MWHPR02MB3389 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.49 Subject: [Qemu-devel] [PATCH v3 18/46] hw/intc: 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: Peter Maydell , Cornelia Huck , armbru@redhat.com, alistair.francis@xilinx.com, Christian Borntraeger , Alexander Graf , alistair23@gmail.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 Cc: Peter Maydell Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Alexander Graf Acked-by: Cornelia Huck (s390x part) --- V2: - Split hw patch into individual directories hw/intc/arm_gic_kvm.c | 12 ++++++------ hw/intc/omap_intc.c | 4 ++-- hw/intc/openpic.c | 7 ++++--- hw/intc/openpic_kvm.c | 8 ++++---- hw/intc/s390_flic_kvm.c | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index ae095d08a3..a5478d3e20 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -316,12 +316,12 @@ static void kvm_arm_gic_put(GICState *s) num_cpu = ((reg & 0xe0) >> 5) + 1; if (num_irq < s->num_irq) { - fprintf(stderr, "Restoring %u IRQs, but kernel supports max %d\n", - s->num_irq, num_irq); + error_report("Restoring %u IRQs, but kernel supports max %d", + s->num_irq, num_irq); abort(); } else if (num_cpu != s->num_cpu) { - fprintf(stderr, "Restoring %u CPU interfaces, kernel only has %d\n", - s->num_cpu, num_cpu); + error_report("Restoring %u CPU interfaces, kernel only has %d", + s->num_cpu, num_cpu); /* Did we not create the VCPUs in the kernel yet? */ abort(); } @@ -411,8 +411,8 @@ static void kvm_arm_gic_get(GICState *s) s->num_cpu = ((reg & 0xe0) >> 5) + 1; if (s->num_irq > GIC_MAXIRQ) { - fprintf(stderr, "Too many IRQs reported from the kernel: %d\n", - s->num_irq); + error_report("Too many IRQs reported from the kernel: %d", + s->num_irq); abort(); } diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c index 6844c1aa83..7fc239715a 100644 --- a/hw/intc/omap_intc.c +++ b/hw/intc/omap_intc.c @@ -539,8 +539,8 @@ static void omap2_inth_write(void *opaque, hwaddr addr, /* TODO: Make a bitmap (or sizeof(char)map) of access privileges * for every register, see Chapter 3 and 4 for privileged mode. */ if (value & 1) - fprintf(stderr, "%s: protection mode enable attempt\n", - __func__); + error_report("%s: protection mode enable attempt", + __func__); return; case 0x50: /* INTC_IDLE */ diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 10d6e871fb..7b1cafcc50 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -34,6 +34,7 @@ * */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/ppc/mac.h" #include "hw/pci/pci.h" @@ -173,7 +174,7 @@ static int inttgt_to_output(int inttgt) } } - fprintf(stderr, "%s: unsupported inttgt %d\n", __func__, inttgt); + error_report("%s: unsupported inttgt %d", __func__, inttgt); return OPENPIC_OUTPUT_INT; } @@ -547,7 +548,7 @@ static void openpic_set_irq(void *opaque, int n_IRQ, int level) IRQSource *src; if (n_IRQ >= OPENPIC_MAX_IRQ) { - fprintf(stderr, "%s: IRQ %d out of range\n", __func__, n_IRQ); + error_report("%s: IRQ %d out of range", __func__, n_IRQ); abort(); } @@ -1221,7 +1222,7 @@ static uint32_t openpic_iack(OpenPICState *opp, IRQDest *dst, int cpu) src = &opp->src[irq]; if (!(src->ivpr & IVPR_ACTIVITY_MASK) || !(IVPR_PRIORITY(src->ivpr) > dst->ctpr)) { - fprintf(stderr, "%s: bad raised IRQ %d ctpr %d ivpr 0x%08x\n", + error_report("%s: bad raised IRQ %d ctpr %d ivpr 0x%08x", __func__, irq, dst->ctpr, src->ivpr); openpic_update_irq(opp, irq); retval = opp->spve; diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index fa83420254..60c784ae86 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -150,8 +150,8 @@ static void kvm_openpic_region_add(MemoryListener *listener, ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr); if (ret < 0) { - fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__, - strerror(errno), reg_base); + error_report("%s: %s %" PRIx64 "", __func__, + strerror(errno), reg_base); } } @@ -184,8 +184,8 @@ static void kvm_openpic_region_del(MemoryListener *listener, ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr); if (ret < 0) { - fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__, - strerror(errno), reg_base); + error_report("%s: %s %" PRIx64 "", __func__, + strerror(errno), reg_base); } } diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index d208cb81c4..e710bfdcda 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -83,7 +83,7 @@ static void flic_enable_pfault(KVMS390FLICState *flic) rc = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr); if (rc) { - fprintf(stderr, "flic: couldn't enable pfault\n"); + error_report("flic: couldn't enable pfault"); } } @@ -97,7 +97,7 @@ static void flic_disable_wait_pfault(KVMS390FLICState *flic) rc = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr); if (rc) { - fprintf(stderr, "flic: couldn't disable pfault\n"); + error_report("flic: couldn't disable pfault"); } }