From nobody Mon Feb 9 22:38:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@gnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506731506284781.9222972879726; Fri, 29 Sep 2017 17:31:46 -0700 (PDT) Received: from localhost ([::1]:37540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy5gx-0005tx-AK for importer@patchew.org; Fri, 29 Sep 2017 20:31:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy5VZ-0004Er-La for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:19:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dy5VW-00057R-Dj for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:19:53 -0400 Received: from mail-sn1nam02on0063.outbound.protection.outlook.com ([104.47.36.63]:23734 helo=NAM02-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 1dy5VW-00053q-3g for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:19:50 -0400 Received: from SN4PR0201CA0036.namprd02.prod.outlook.com (10.162.76.22) by BY1PR02MB1129.namprd02.prod.outlook.com (10.162.108.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sat, 30 Sep 2017 00:19:47 +0000 Received: from CY1NAM02FT061.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::200) by SN4PR0201CA0036.outlook.office365.com (2603:10b6:803:2e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Sat, 30 Sep 2017 00:19:47 +0000 Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT061.mail.protection.outlook.com (10.152.75.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Sat, 30 Sep 2017 00:19:46 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:41297 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dy5VS-0000E7-2I; Fri, 29 Sep 2017 17:19:46 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dy5VR-00079M-Ua; Fri, 29 Sep 2017 17:19:45 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v8U0Jdo1000586; Fri, 29 Sep 2017 17:19:39 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dy5VL-00075D-1U; Fri, 29 Sep 2017 17:19:39 -0700 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=61NVEcBt5v5saP4pEZRGuOj07e/qLJkkQiy1GpSF9UE=; b=Nhl1eWO0rqC6DSRoH3+20QCHvlK08i36rqm6kOL/K/ws6U3OJoNrBDvP4H+xKAcoLD8kKNv1ozau9N/V31F2ES8mt8xieXmOSrLEeyUQqQwoxrWRejisdvidt4k/MBx8I3DNdrTt9tYCSDV/s2mXIiG7Z2/Nx2E9b597R5Eehqg= Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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 (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@gnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; From: Alistair Francis To: Date: Fri, 29 Sep 2017 17:15:52 -0700 Message-ID: <4cfb4103300d333ec3e262dfb1b5873db1b6352e.1506730372.git.alistair.francis@xilinx.com> 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-23358.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.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(2980300002)(438002)(199003)(189002)(106466001)(4326008)(478600001)(36756003)(36386004)(77096006)(39060400002)(2351001)(575784001)(6666003)(9786002)(305945005)(5660300001)(81166006)(5003940100001)(81156014)(76176999)(63266004)(8676002)(50986999)(2906002)(356003)(48376002)(50466002)(189998001)(2950100002)(54906003)(316002)(33646002)(6916009)(47776003)(8936002)(50226002)(118296001)(106002)(16586007)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR02MB1129; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT061; 1:RSixbi8lPejr+aiRAx3mvITNHYlN9/SVKawRSueLMa4gL7qln+TMSy1w8kfgdlLqypkVfQ7rfTAwg0P4Fog1zXHKwIdraqqRSnIua/1yDo5NMRAiycm2GUygN3TABXV5 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9fe9f9a4-a2dd-4ba1-7bbc-08d50798f518 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(8251501002)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BY1PR02MB1129; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1129; 3:OIXw6Ftq4X0C+0s7UXfxxEQqylRfdskb6z+LhpMrKEKMIYxHKZ/HAQjQhqaflPT5z0jScFI460FzRWUFVNKKUx+FpjGh3LO+Z4V2gFpN3AJYr2eNCoiViyuOjqRQcoclHjCBNUUnJ2tj5MaxdzzSl3Oermrl4sYEZwRhRniC5916yEUnDhirHpVcXPLd1h9SrWpIrobkCconw8b5+vfp/S4WIZZsqJb3hgfMplDL3jpJS3kFxQ3NklRlZFjD2vr69WvsUnpCWtiduT6ZCx/EMT+aT2sheEH3prdB2vfX5uZXUBrz0TMGaDujftFocX4cf9S1U/6/msEG47hZ94MFZBqYXai3bpDKJ6r/VV8C4X8=; 25:4eORubw10hlXez/CXJfGvcLlrko4nYFQLRpx37tXMuowGE3pQ/RGXEEMZQQ4FCQec3cCLnl7bZwC8ynvZJlu0fi6mDPTJFBDtEvkDPbA8UqDzAIlpBmNvZwH09uYbEYi9QFVkbYnD+7aCzDDWkLZwZAwV3n0xW1SeWWtsFW6/EPq8CGmWE1/Jm8Zh85xYDysz+jDQQZRG7839+OnsVoABpopCNub2ocayPgEbNN5U2jMqFqzrwPBO6Vuq7jfXnDkiiNJVuoxHqTelT6qH8z8XUMD5s3GclhWBTN7JlA3xgvikC+lfShvQz8EVXgDATKQrbd8JR+1hTxgBBZWelRhFw== X-MS-TrafficTypeDiagnostic: BY1PR02MB1129: X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1129; 31:EB2iAg8pB2WOUehCobWu68rtqrETrUsyXJt0GtJNRJxrdcIVQhMsiyA1glqakAZK4aZrA0cMO+bn6zvQQWJAvSLuFnsspqBnN83/rgxQBVxTSLxGp4IQY2uFCvThtRAS/vfSn6iPdCDEkgSlEZi91iLPAs0Q3hdo9nZmaoGM4cxEup4ITvxVdkU6OINK3UeDkQrQJcCAPr0Wui56AVz79sEtV08dZlEzPMH/08ezdjs=; 20:wtA/STIr0GfdRNLthQidlajM3JFyTAumx8DYeQXNjHOBdbYlVh/cdviEwCfug7fbTNFvydJ2f+yfNiKiY7Tke93FL9mYc0PSWBb1zOMOogQpaIFRxwlxV7arvuyKooZ359/s+lYIe7IzU8bpgfKyj3dAa4mVFs6b665yIjm75QMXRWCbhX/o39w8Z/51p11ccXjJqgeMyP52U7q1xSYz/gJwoRMf4gh3nTUpayTjCJD46V9IFi+mFGq0iHzwnhmagfWsw8f1/atazM2Akt4s0elByxqOqo2Hz9ocdzi0+Eegp72Dp+LZm7eCYL8/tmJHJufV6o5eiHELpkFNZMc4sjD5YJZYsOSJDKKKNWZUhqmeuHn1Hnj7wZK7LmRUGelewnc+7NOuZN/PKUmV2pCx3eWTSBLSA8pifX802ooizQcDMcme3cTjDiXJGKVA4k0kQhMJkDD3PQwhwVt8e0w0y6twOBwS1o0Pg+8p04LZK+d/FIa4aKhgFT52ukOU6wul X-Exchange-Antispam-Report-Test: UriScan:(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)(3002001)(10201501046)(93006095)(93004095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR02MB1129; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR02MB1129; X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1129; 4:N+1k946s95fuH4Sn4rWV5FH7RALXUFvhjak8pmCqdQAbV3lqp3DZWOY05mC9rhmy7MhNZMkHC/wXvjczOQ2R5GBXyQmn7ZgkjpLqoPJXfUbOEv3YJ/VYSY9peUNA/AScfuAFesLqcUgaTrW/2/QSvikSD8ksWe6jtuI5vdcrjh6OyfvMR5ScDOGblGfFQxWB+ZMuW/P88v2d7GWr9hqxKyZtjDrzCwF/lgMYIyLSSsK2VrHMLrmAdGxlKWf55zDUCP3Z/S1RJJA7OqNMf9tmaz6FyQNYcbYK6xHQwJluAcuE4qPJIDAWiilZY9KPrKWhoH8ozG+gFBfUaZv3YgK/wg== X-Forefront-PRVS: 0446F0FCE1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR02MB1129; 23:hzC+tjYa5qE1Ix4BuJz90I3WACbgVsZRsKVfW29yV?= =?us-ascii?Q?iESExfOZyJ0ASmQn2FnKZaJUZ2VgeMD1UuuHPU7oo8ubwgoGhytczrzqLe41?= =?us-ascii?Q?NL90MvF/a9u3DrK60YIjXLZkDgoXT56l9kZSF61+5HE7xv6VOfFKr13j0rX9?= =?us-ascii?Q?k8gZQf25m8ENbuZqB65L7KOFIcQq6CbpStIRSNBOLjReyQWkak3rLmLj6wAr?= =?us-ascii?Q?bITP5QYJaC7ISZnNBrcsIvm1hCawfrVhnkQqv/aCBsGQpxT8w1xN4qiQ7ouw?= =?us-ascii?Q?IlaPz9N2G2l85hOzWZU8EZiqqGx5NyDvYdGsCW0iXSwN+wwMj91StI0Bt4ml?= =?us-ascii?Q?GkDJDfs6TtAdLl9/5pHLQpYe9hBCY6t9w/085Rivhxvuulfu3rAmy9vnA6iM?= =?us-ascii?Q?iqZZ9jqvWwPXD0iS5crWOd7n3m/Ky8wgYuSTeERy8FM73SXj8eMUXGzS2jIm?= =?us-ascii?Q?zLRmN/Dlz9JOER3MiT96W1B9B9MszV2b5ejCmCuvOW7G1dyhdVWuvasF05w/?= =?us-ascii?Q?PGlKMBIJRrt1APeFAnWkLhJu5QZrBRFl6CnCxPXAVe5C60RLWur9OQN6Kbo+?= =?us-ascii?Q?Urqpzt5S10vHrGLXa3H/7vH2hQ0Rj5BkYAOILnZs8f8BLvUKcCn+izwDPzTH?= =?us-ascii?Q?8evyS+qijo04tv9OvheaAeNx+dv7R1NHCyV/FqB5UbqdS3QzRbNP3m9uacf9?= =?us-ascii?Q?53uS7eyKbMFLJM1vdoN6uaYiy9yRMS7WPvvtnbIXV8d3aMgS7KRmiYsJqLqB?= =?us-ascii?Q?qeDw4hOKEFnKfjxea9qBDgbvKo+eN8JVZf9F3j3LPtWf3SqOg3Af5G7oO4d8?= =?us-ascii?Q?xXMZiXPW4HE5d3pCUSy5qafU24LO6SrIrWDCNcOky9r442wceX0EHCxUvqZ8?= =?us-ascii?Q?cx7wTDlczDDAkvINidZcndZvoLTK95UCX/am2yFZ5TAKKTwjA4U/XHUiJ4dE?= =?us-ascii?Q?mQPH9vnEjHjgIpqHQy4ozN4ei+3ft19MegB+vhcK/QW4bKJDNpWEs4SQtdMv?= =?us-ascii?Q?RC5/Bj4/pGyzHVn/nVK92J3b6fYv/XyM88hUiglxGsw7FAfZMHKsqrTLepbc?= =?us-ascii?Q?/8rpHhbaeOYn0FRZaANFQXjCFBdyXf1NeiLHzrHfVz2Jz5Jnw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR02MB1129; 6:jB0pwP8qAzMxSF8al8S7v5zODNY62ik/Im3Aj3JvXLk667d2QCFs1txBOYvg6f2+ZatmKDIVBxnWgRD1bsIstFhXhVydiuCp3OYYqv39gW9pEYXyvvZs9GNvwFeRszAxg97u9bAeONfx91VhjGqTkUln8rXonkjcFo+HJLUTQ9xiBbOjLHjoYdfvZsPPxx1qiTEJKkqmGoIukQvb9IFOqtBhQGXtwYplAsTyYF8U1xsU4uXpStUn4fzsJ1cZgfmHnuDl8QRWLHfKzOF4sjpQ05rMBGENqxklAQ/XwD+eRXrYs/clNFxzCsQnIBEfG2pDm+T4x40R2cDehNuOKnWmYw==; 5:eeuqYPqYDPA/2p+AebQpGQ+MzqF1j1hGJkpobBaSKWrve3AvdD2Df1WWVJ/xEiAZl6MLzEQeZwAEw534ewLueKX8HDZ2u6OST9EKYOOjuERelyk56sHs8U/i1PbZNbA8JBj8rcdE9xQvVp9SJEVQjuGHGqHbGkKiGsP9rgTqVWs=; 24:OeYYqVPuN3UDE9oqdDZSKdwgNyuRxpYrEAQmbXyG6jRebsqAynicyOR1RyszsgrGRQHki275TLQPbEZEBCBp2tDHwyPFl7BSkXTt/N+Wi2s=; 7:zxyQevN9Uf5jrJzKh067vQTCS1cZVXU5kiXNlsVX72xEo2oAKQYvpQHCZYvrGGyTOutKXT6JFgCISXZgJwuxiqxtw/MNPFmZJbR1+zdMUirSLiLxDfm4b7/BShkjItHC4wznNqxgWD7ywutuMvmaO3rw+ZAtPwo9Or/v3tykkw/1xG5AQK0EqZ1fEnDHwj0vh4bnYu4RGEqNb5pv/YRklrRBo6lD8Bqd9FZMeRqA2Oc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2017 00:19:46.5770 (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.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1129 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.63 Subject: [Qemu-devel] [PATCH v2 17/47] hw/input: Replace fprintf(stderr, "*\n" with error_report() X-BeenThere: qemu-devel@gnu.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, "Michael S. Tsirkin" , Gerd Hoffmann , armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+importer=patchew.org@gnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_re= port("\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: "Michael S. Tsirkin" Cc: Gerd Hoffmann --- V2: - Split hw patch into individual directories hw/input/lm832x.c | 6 ++-- hw/input/pckbd.c | 3 +- hw/input/pxa2xx_keypad.c | 2 +- hw/input/tsc2005.c | 17 +++++------ hw/input/tsc210x.c | 72 ++++++++++++++++++++++-------------------= ---- hw/input/virtio-input-hid.c | 14 ++++----- hw/input/virtio-input.c | 5 ++-- 7 files changed, 60 insertions(+), 59 deletions(-) diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c index d39953126b..caeeda47f2 100644 --- a/hw/input/lm832x.c +++ b/hw/input/lm832x.c @@ -239,7 +239,7 @@ static uint8_t lm_kbd_read(LM823KbdState *s, int reg, i= nt byte) =20 default: lm_kbd_error(s, ERR_CMDUNK); - fprintf(stderr, "%s: unknown command %02x\n", __func__, reg); + error_report("%s: unknown command %02x", __func__, reg); return 0x00; } =20 @@ -330,7 +330,7 @@ static void lm_kbd_write(LM823KbdState *s, int reg, int= byte, uint8_t value) s->reg =3D LM832x_GENERAL_ERROR; if ((value & 3) && (value & 3) !=3D 3) { lm_kbd_error(s, ERR_BADPAR); - fprintf(stderr, "%s: invalid clock setting in RCPWM\n", + error_report("%s: invalid clock setting in RCPWM", __func__); } /* TODO: Validate that the command is only issued once */ @@ -378,7 +378,7 @@ static void lm_kbd_write(LM823KbdState *s, int reg, int= byte, uint8_t value) break; default: lm_kbd_error(s, ERR_CMDUNK); - fprintf(stderr, "%s: unknown command %02x\n", __func__, reg); + error_report("%s: unknown command %02x", __func__, reg); break; } } diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index c479f827b6..ff4f03e4c3 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" @@ -307,7 +308,7 @@ static void kbd_write_command(void *opaque, hwaddr addr, /* ignore that */ break; default: - fprintf(stderr, "qemu: unsupported keyboard cmd=3D0x%02x\n", (int)= val); + error_report("qemu: unsupported keyboard cmd=3D0x%02x", (int)val); break; } } diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c index 93db9ed25b..0a594c30fc 100644 --- a/hw/input/pxa2xx_keypad.c +++ b/hw/input/pxa2xx_keypad.c @@ -326,7 +326,7 @@ void pxa27x_register_keypad(PXA2xxKeyPadState *kp, const struct keymap *map, int size) { if(!map || size < 0x80) { - fprintf(stderr, "%s - No PXA keypad map defined\n", __func__); + error_report("%s - No PXA keypad map defined", __func__); exit(-1); } =20 diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c index 7990954b6c..f5057e8eeb 100644 --- a/hw/input/tsc2005.c +++ b/hw/input/tsc2005.c @@ -200,17 +200,17 @@ static void tsc2005_write(TSC2005State *s, int reg, u= int16_t data) s->host_mode =3D (data >> 15) !=3D 0; if (s->enabled !=3D !(data & 0x4000)) { s->enabled =3D !(data & 0x4000); - fprintf(stderr, "%s: touchscreen sense %sabled\n", - __func__, s->enabled ? "en" : "dis"); + error_report("%s: touchscreen sense %sabled", + __func__, s->enabled ? "en" : "dis"); if (s->busy && !s->enabled) timer_del(s->timer); s->busy =3D s->busy && s->enabled; } s->nextprecision =3D (data >> 13) & 1; s->timing[0] =3D data & 0x1fff; - if ((s->timing[0] >> 11) =3D=3D 3) - fprintf(stderr, "%s: illegal conversion clock setting\n", - __func__); + if ((s->timing[0] >> 11) =3D=3D 3) { + error_report("%s: illegal conversion clock setting", __func__); + } break; case 0xd: /* CFR1 */ s->timing[1] =3D data & 0xf07; @@ -221,8 +221,7 @@ static void tsc2005_write(TSC2005State *s, int reg, uin= t16_t data) break; =20 default: - fprintf(stderr, "%s: write into read-only register %x\n", - __func__, reg); + error_report("%s: write into read-only register %x", __func__, reg= ); } } =20 @@ -337,8 +336,8 @@ static uint8_t tsc2005_txrx_word(void *opaque, uint8_t = value) s->nextprecision =3D (value >> 2) & 1; if (s->enabled !=3D !(value & 1)) { s->enabled =3D !(value & 1); - fprintf(stderr, "%s: touchscreen sense %sabled\n", - __func__, s->enabled ? "en" : "dis"); + error_report("%s: touchscreen sense %sabled", + __func__, s->enabled ? "en" : "dis"); if (s->busy && !s->enabled) timer_del(s->timer); s->busy =3D s->busy && s->enabled; diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c index 1cad57f644..65c7569723 100644 --- a/hw/input/tsc210x.c +++ b/hw/input/tsc210x.c @@ -396,8 +396,8 @@ static uint16_t tsc2102_data_register_read(TSC210xState= *s, int reg) =20 default: #ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_data_register_read: " - "no such register: 0x%02x\n", reg); + error_report("tsc2102_data_register_read: " + "no such register: 0x%02x", reg); #endif return 0xffff; } @@ -447,8 +447,8 @@ static uint16_t tsc2102_control_register_read( default: bad_reg: #ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_control_register_read: " - "no such register: 0x%02x\n", reg); + error_report("tsc2102_control_register_read: " + "no such register: 0x%02x", reg); #endif return 0xffff; } @@ -528,8 +528,8 @@ static uint16_t tsc2102_audio_register_read(TSC210xStat= e *s, int reg) =20 default: #ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_audio_register_read: " - "no such register: 0x%02x\n", reg); + error_report("tsc2102_audio_register_read: " + "no such register: 0x%02x", reg); #endif return 0xffff; } @@ -553,8 +553,8 @@ static void tsc2102_data_register_write( =20 default: #ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_data_register_write: " - "no such register: 0x%02x\n", reg); + error_report("tsc2102_data_register_write: " + "no such register: 0x%02x", reg); #endif } } @@ -606,8 +606,8 @@ static void tsc2102_control_register_write( tsc210x_reset(s); #ifdef TSC_VERBOSE } else { - fprintf(stderr, "tsc2102_control_register_write: " - "wrong value written into RESET\n"); + error_report("tsc2102_control_register_write: " + "wrong value written into RESET"); #endif } return; @@ -616,8 +616,8 @@ static void tsc2102_control_register_write( s->timing =3D value & 0x3f; #ifdef TSC_VERBOSE if (value & ~0x3f) - fprintf(stderr, "tsc2102_control_register_write: " - "wrong value written into CONFIG\n"); + error_report("tsc2102_control_register_write: " + "wrong value written into CONFIG"); #endif return; =20 @@ -637,8 +637,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); + error_report("tsc2102_control_register_write: " + "no such register: 0x%02x", reg); #endif } } @@ -651,8 +651,8 @@ static void tsc2102_audio_register_write( s->audio_ctrl1 =3D value & 0x0f3f; #ifdef TSC_VERBOSE if ((value & ~0x0f3f) || ((value & 7) !=3D ((value >> 3) & 7))) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into Audio 1\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into Audio 1"); #endif tsc2102_audio_rate_update(s); tsc2102_audio_output_update(s); @@ -661,8 +661,8 @@ static void tsc2102_audio_register_write( case 0x01: #ifdef TSC_VERBOSE if (value !=3D 0xff00) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into reg 0x01\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into reg 0x01"); #endif return; =20 @@ -674,8 +674,8 @@ static void tsc2102_audio_register_write( case 0x03: #ifdef TSC_VERBOSE if (value !=3D 0x8b00) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into reg 0x03\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into reg 0x03"); #endif return; =20 @@ -683,8 +683,8 @@ static void tsc2102_audio_register_write( s->audio_ctrl2 =3D value & 0xf7f2; #ifdef TSC_VERBOSE if (value & ~0xf7fd) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into Audio 2\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into Audio 2"); #endif return; =20 @@ -695,8 +695,8 @@ static void tsc2102_audio_register_write( s->dac_power =3D value & 0x9543; #ifdef TSC_VERBOSE if ((value & ~0x9543) !=3D 0x2aa0) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into Power\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into Power"); #endif tsc2102_audio_rate_update(s); tsc2102_audio_output_update(s); @@ -707,8 +707,8 @@ static void tsc2102_audio_register_write( s->audio_ctrl3 |=3D value & 0xf800; #ifdef TSC_VERBOSE if (value & ~0xf8c7) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into Audio 3\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into Audio 3"); #endif tsc2102_audio_output_update(s); return; @@ -740,8 +740,8 @@ static void tsc2102_audio_register_write( s->pll[0] =3D value & 0xfffc; #ifdef TSC_VERBOSE if (value & ~0xfffc) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into PLL 1\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into PLL 1"); #endif return; =20 @@ -749,8 +749,8 @@ static void tsc2102_audio_register_write( s->pll[1] =3D value & 0xfffc; #ifdef TSC_VERBOSE if (value & ~0xfffc) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into PLL 2\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into PLL 2"); #endif return; =20 @@ -758,15 +758,15 @@ static void tsc2102_audio_register_write( s->softstep =3D !(value & 0x4000); #ifdef TSC_VERBOSE if (value & ~0x4000) - fprintf(stderr, "tsc2102_audio_register_write: " - "wrong value written into Audio 4\n"); + error_report("tsc2102_audio_register_write: " + "wrong value written into Audio 4"); #endif return; =20 default: #ifdef TSC_VERBOSE - fprintf(stderr, "tsc2102_audio_register_write: " - "no such register: 0x%02x\n", reg); + error_report("tsc2102_audio_register_write: " + "no such register: 0x%02x", reg); #endif } } @@ -847,7 +847,7 @@ static uint16_t tsc210x_read(TSC210xState *s) uint16_t ret =3D 0x0000; =20 if (!s->command) - fprintf(stderr, "tsc210x_read: SPI underrun!\n"); + error_report("tsc210x_read: SPI underrun!"); =20 switch (s->page) { case TSC_DATA_REGISTERS_PAGE: @@ -886,7 +886,7 @@ static void tsc210x_write(TSC210xState *s, uint16_t val= ue) s->state =3D true; } else { if (s->command) - fprintf(stderr, "tsc210x_write: SPI overrun!\n"); + error_report("tsc210x_write: SPI overrun!"); else switch (s->page) { case TSC_DATA_REGISTERS_PAGE: diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 4d3afc1b14..bf1ed7b18e 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -208,8 +208,8 @@ static void virtio_input_handle_event(DeviceState *dev,= QemuConsole *src, virtio_input_send(vinput, &event); } else { if (key->down) { - fprintf(stderr, "%s: unmapped key: %d [%s]\n", __func__, - qcode, QKeyCode_str(qcode)); + error_report("%s: unmapped key: %d [%s]", __func__, + qcode, QKeyCode_str(qcode)); } } break; @@ -222,9 +222,9 @@ static void virtio_input_handle_event(DeviceState *dev,= QemuConsole *src, virtio_input_send(vinput, &event); } else { if (btn->down) { - fprintf(stderr, "%s: unmapped button: %d [%s]\n", __func__, - btn->button, - InputButton_str(btn->button)); + error_report("%s: unmapped button: %d [%s]", __func__, + btn->button, + InputButton_str(btn->button)); } } break; @@ -310,8 +310,8 @@ static void virtio_input_hid_handle_status(VirtIOInput = *vinput, kbd_put_ledstate(vhid->ledstate); break; default: - fprintf(stderr, "%s: unknown type %d\n", __func__, - le16_to_cpu(event->type)); + error_report("%s: unknown type %d", __func__, + le16_to_cpu(event->type)); break; } } diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c index 0e42f0d02c..fb5fa0a280 100644 --- a/hw/input/virtio-input.c +++ b/hw/input/virtio-input.c @@ -5,6 +5,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qapi/error.h" #include "qemu/iov.h" #include "trace.h" @@ -121,8 +122,8 @@ void virtio_input_add_config(VirtIOInput *vinput, =20 if (virtio_input_find_config(vinput, config->select, config->subsel)) { /* should not happen */ - fprintf(stderr, "%s: duplicate config: %d/%d\n", - __func__, config->select, config->subsel); + error_report("%s: duplicate config: %d/%d", + __func__, config->select, config->subsel); abort(); } =20 --=20 2.11.0