From patchwork Wed Nov 8 22:56:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 836039 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="DWef4vAM"; 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 3yXMMS4bHcz9s72 for ; Thu, 9 Nov 2017 10:05:08 +1100 (AEDT) Received: from localhost ([::1]:34319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCZP8-00020h-7K for incoming@patchwork.ozlabs.org; Wed, 08 Nov 2017 18:05:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCZLP-0007p6-Dw for qemu-devel@nongnu.org; Wed, 08 Nov 2017 18:01:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCZLM-000385-49 for qemu-devel@nongnu.org; Wed, 08 Nov 2017 18:01:15 -0500 Received: from mail-by2nam01on0080.outbound.protection.outlook.com ([104.47.34.80]:28357 helo=NAM01-BY2-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 1eCZLL-00036p-MO for qemu-devel@nongnu.org; Wed, 08 Nov 2017 18:01:12 -0500 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=WolAlXq0CQh5btnkqpCVCYbSoTZTzFX/pzWI91sSaes=; b=DWef4vAMsIR1usK6twNtfm4+nU8iFvmUJ+C9DAWgM3gjFsLihuDyIk+dKAEXIY+2Db4o8V8/D6fX4Ejb3SCjMjXuxKODiOCehBrgLtjr4B0XVMs1RUgV7FXlPGu7VrsUIN4JxEX6qkD5rR9oHjz28tKy+TrjmB8Dw0wYrgyucrw= Received: from MWHPR02CA0028.namprd02.prod.outlook.com (10.164.133.17) by BN6PR02MB3378.namprd02.prod.outlook.com (10.161.152.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Wed, 8 Nov 2017 23:01:05 +0000 Received: from BL2NAM02FT038.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by MWHPR02CA0028.outlook.office365.com (2603:10b6:301:60::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.218.12 via Frontend Transport; Wed, 8 Nov 2017 23:01:04 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=bestguesspass action=none header.from=xilinx.com; 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; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT038.mail.protection.outlook.com (10.152.77.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.197.9 via Frontend Transport; Wed, 8 Nov 2017 23:01:04 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:33295 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1eCZLD-0003xH-GK; Wed, 08 Nov 2017 15:01:03 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1eCZLD-0002XC-CU; Wed, 08 Nov 2017 15:01:03 -0800 Received: from [172.19.2.220] (helo=xsjalistai50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1eCZL7-0002R7-UD; Wed, 08 Nov 2017 15:00:57 -0800 From: Alistair Francis To: Date: Wed, 8 Nov 2017 14:56:59 -0800 Message-ID: <530b263ffcce137748560534ca5a802533ee1347.1510181732.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23450.000 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)(189002)(199003)(50986999)(118296001)(76176999)(36386004)(77096006)(356003)(16586007)(54906003)(33646002)(106466001)(316002)(2351001)(8676002)(81156014)(39060400002)(106002)(81166006)(8936002)(2906002)(189998001)(36756003)(305945005)(5660300001)(4326008)(47776003)(478600001)(50226002)(5003940100001)(63266004)(6916009)(575784001)(9786002)(48376002)(50466002)(2950100002)(107986001)(21314002)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB3378; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT038; 1:5QQwx8oRZiM5KoR0sX47+3Ys51zDV6LXvvZ+jECmp0ZUoCIoGCagmbIRovpCgRgRVqMk+gH5wvzr5M8m6VCKh4NcWSzasZl+svEAu+ouZIzI7iEkphojm2WWC8XG5x5B MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d583797-8af3-4fba-2b65-08d526fc96af X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:BN6PR02MB3378; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB3378; 3:PDo0L6EgiAwLp0yb983qrLfeOl6eS6DVGe0PHVc1RxOtpQ10wddTz8rxDQs0LP2yWZPUcyPDZjS++imukn2QYJD/2tNffdiRusBiGDdGvAlPFEipTC4Kbbm+J/E8oRDzA0ZPqge7QaYi0HhfkbWqntGcF0PIgMfl5LS/4zWcNMGGtPI/bEI5c3N2jVGxBf6nl93qMjIxRdnWKDIXPysDJn9QZco3H4G6iQizF2b7HAEHDLeEYBET9P8O0DR6Wjaw8GqJEv/L0ZGfRau2SXspekynAu9movbLO5GJKVZLQI8pNGDcgnB5tt1aQgUtwJApjujDUGNsry03qaUbVWZcbfjHVHp2e8UwIDCbTguqwRE=; 25:5BR00m5P+7CHq4gnVOBCkpvJ3LV6EqGb9sGfoIcAhi+mtR/QWGgf0u6UJ1fDnG1RveRnUF6SG6amCX6vSuSAGRB0jGg6Qug7TAggjgFuc1PWlGgthNfryhzyUjsJ+R2mkiK8et2XQZZnsKRDKrbDqKXJbUxrvHWJ36AZ2/WkRtFq6cjmUhTP8XiNJcvKF0FQHVBVA1OR0w/QMaKpBKQ/TmdWTrn/OAT+7bBpCgiOzkv91p86AeQlBU5w6VonEwHpS8yTLGubKVvvX1oFhOmj7DN8Jm8x2M7wv234ZH7vzYT2QbKAL4lJWKXocsUIUYo2fPEQhk/NuuiFCvdubtJ5xQ== X-MS-TrafficTypeDiagnostic: BN6PR02MB3378: X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB3378; 31:8w+NRxY6a2LQsD00bLKDBAZVMVlnVMB91/xD9CvPDYqFvO/X9jz4xPUQE72f8XuG2iCLXqzhLCZRLetgTEuDLdh1zY9EfY9uo4q2b9MeKkA6wptMEyTG5CCCk4YVaRKEh/zSaE1YzxZhYyLcEff4wSR9nAqh8po+lxtmYKyb/Zz6cCOaX89Zho2kHF19eIjwDVcjqZfqRh6qS5RYJLOPYO0Xu9zZ3X5ywhk5G6QGaJU=; 20:zDYvQWfZWxU44QpdphOPdMvBQsSVsqKS5Jkt0HERg+1LFKE1vp2W2Gf/Ls3iR4VvgIvRQHuGCnSxnq/g3wZeJ2/5pq6c7mMM8hCn5+iMCKge4vHALOo2LUmDNhsrPC9HEEhWEPTLrGHo2T+1udBs5HA7otg0jLa7Dac0ji6lFZx8QFYM6eDBfKqmZwleAq67rlAqKuwKnRmYL72l7/MswG+1yiyRQBQvG+1oTYqi1g+v3e9Jaj+0+dmXJMmepfdC+hCr9Yl/4el2l8zvtw6FVvrjGDNM7ncLplGrGWDF6g0C0G0KNvH3Zu/IILmZUwGdH1GBTj6UvArN1BHQ4LBtMiYS9uemm9xX2ivJEW9TQ74zN7baFP8dfZ2wRhtp4SsJE/3QVoW1PukFyqufF+PGtkZywbLMxu2sG2tDFp/FCASCs9gfXvG4VAWnhOG7U/VIq2WwOtbK7l0sM1gmKII1e6ev5BkdCJz0pxtQAPH5cj91D70aQI3aSrEpyOfCLrLS X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(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)(93006095)(93004095)(3002001)(3231021)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR02MB3378; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR02MB3378; X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB3378; 4:bu5oYTruVGTBSSvIsMgQ0Bjg60YZkce8+2tCcOwLYFOWOPPJuUVJA0k+mLUT1sgx6zgzzRFGMsArYXh9m7eF05IHs4ToN+ylJGWhZGfgIz+6AwJJHrG3dNQBkJWyxrt8H8DYhOs3H2e4+3uNQBD1s5oL8wFdb1LDOR7Lhh7Uy0s3Kjq8Y5JbfZn0PR0/suly5dXG2Y3F2V3liN0Fg+xB5cKxpEuf2QLSq6NMeiCwo7ZjLVgTV1xHcc2z7zfvW3m3a0iyGrTB9N5XUT5oHpNdkAsXhzvW4ctSP6i9LIrhBB1sVN9eh0wr7bGCCerWW6wJ97pbM3sdOSZeSJ72l+NX1M3tpQQ6Yp6bjSUIzfB+2l4RxX11Br+eM9zyqDDC2OCl X-Forefront-PRVS: 0485417665 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR02MB3378; 23:RLAhSfAv3mkL3lZVeHxV8A2GhBAQLuU9DeZTcUYv7?= e/wVmaunNKm1qquoSH/A0NNNV9xJR7hJ9MeyEtAShDoORFFAMje2U6lrB1MEwzIhe5Dn7W+tXfT5I9qcOErquP+gaCmsiq4D0v1X9KQvdwtaoYt3hzi4ceGmpa9JLGjbVZiK7rJizYGSQZzSV2V5tVYhG9GzoXR79n5oAYtIwJh29SSy2bLcfXvOGA5naISIGPcDX+ZDHc7uyh36ILKZFlPHPg2K7tI6Xn2pzu1EDYIET4QBkhK57dXRnULIlTK6vXWCzao3Cc1oeD0Vqs2UQqvXlG3uP/1nzFYIjWl8IVboAdq1WspewUg2yet8ewhPV0B7V4DI9ENy3Z3AynAU6DKnemyC9R+pXWdvZ1Ha2j34Wd6gFpEGyVOwcQpnT+c/y1iKmKAT2wpJ7gOnPuFH9rd858VVl7iMu/SGLqrbCIFPp4xFJ+ENjbqCxsVYLXNNBdMFQ7vG5/vKyg2dXydSf57Ey8QFl3DputaYLDe+t0nq5s50g9yGoVqc6uBY1e0dc7f5uUsM41ULucA8Ug2FSJCpFu0IjqPS57hXucz/8uz2Jr7meR0q/C/zfQ4akIoTEeGRXZs13LnWCSk5/g/1ZrYed7FXdA/Nv8WuByAAK088SupOT0BbwOc8wL/1IEdKbgnIT+5CrgUPx5XUAhYRgQhs5OjqVFd4hVnCqfYLxyCAnJWcQqmEmNeqKpJajO5GnKTYxs8TbiHLM+CBOdEioYOyviIEPba02qJOolQvUBPz/e56aYztOKzkQqbfC2Ifns9fs96TsWgaZM4GGPDgnmUFCzKhNdlVdBn2HIjkByN+QZhYVcbBCwu5DwOQ2ijo5zKeoYZYgm20whSz9kr33OqIw9DiwqOwDFaKjdGQLoEQUILf/+UuKNfWI+VteiKJqyZ4WW9c9RCUChxDHWKS4A64Zy3qbQLKkGFno/juX+wO+oLmbwylaA+LmNs+8etkJt+ZJJJxY1ShTlXAUR76b1Red3GOuaRlBPwDDoAkTAQj091HH6C9p6/Y/QRKvvn69BFfwjBb8A78Yv4Sd5mB9zKPMfnWaW91wl1qo+LujcIrf+BfDtlOATq9eAovFVJCAg= X-Microsoft-Exchange-Diagnostics: 1; BN6PR02MB3378; 6:TE+17DV6cfbU2Ad2cztc/KeApTn0z2si5t2T0Aa0AFvX7LQDMQENQ4t4CzTmgf1JBbh1XuiROt1vfwhgyn7nRIHlqaVCv6QL2Ab8QvUcJ2MwzyDJLmJ/ZhHa8O3QAQGdRd60B0rZ6KgTsBaVGp8Q6MdUgxA3TAbjgW3rWrRuUuNfonf5bvEijUAGqb9S4Y7G8YcTmv98V12pgqF+QD+DgPVxUQKmYnR+QwfT757rj4mf8uWBakv4L5DHvLf/6T9Vk3ADfyq5zSOM3KnV8bZDqbTgvEF1g8NyrGHEj7EbKIRwarlZYqoeZZLRyhFFIaVXe78E9RyQyREzemFnr95u5alfsQ+COomo3cMEGNwZWy4=; 5:u2V6ihEVmVg1YPtaECU622qxVxLjZRWV9I7j/Af3vA8vPh4eP9ZDSDMU+99owD93OzDfeVvOmwuJZxJ0Rdd4Bu7KKw62TNR7dfgsIvrPLmpuDgaXrrEGmv7f83n9ldVKBjidGOcS/ejwI174XCUgwyvurDOwtqapf64wWlQs/lY=; 24:NZIDrpSNiSbdaWiCOy6bxjVGby/4oEWgMImDVJrkynQ61TVT4eC4e+eiKwc1wubFpkotifey3fKckXLSk3pDoNEdCQwAJVu5T+qFZzYdB1c=; 7:fNhslkNRjYESbaUCUMPqAOnx+K7up0Pv0rNY2Ip0ftv7lek52gF4DQUpUWQYS0rU51DMdrEJoqvvsfNDygXgD56xRNN4e4PRrDUZ9hhCwrNzOtf3iVESVh9il5aOX8NSM1ze1X5JvhAe+AYI0rtMsjNlR6tK5GSgAFje91jIzmXNd6WBZ/puuUjB7xFMr/xPRaddWUQnsAPcE/N8QzdJz4CqUrVTaA4cFmvLA5EjX1pRpRv+/D9BUm+ir6l8rqq1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2017 23:01:04.0875 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d583797-8af3-4fba-2b65-08d526fc96af 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: BN6PR02MB3378 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.80 Subject: [Qemu-devel] [PATCH v4 11/45] hw/display: 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 --- V2: - Split hw patch into individual directories hw/display/blizzard.c | 20 ++++++++++---------- hw/display/omap_dss.c | 14 +++++++------- hw/display/pl110.c | 2 +- hw/display/pxa2xx_lcd.c | 2 +- hw/display/qxl-render.c | 7 +++---- hw/display/qxl.c | 10 +++++----- hw/display/tc6393xb.c | 36 ++++++++++++++++++++---------------- hw/display/virtio-gpu-3d.c | 4 ++-- hw/display/vmware_vga.c | 22 +++++++++++----------- 9 files changed, 60 insertions(+), 57 deletions(-) diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index 291abe6fca..0d12e078c4 100644 --- a/hw/display/blizzard.c +++ b/hw/display/blizzard.c @@ -474,7 +474,7 @@ static uint16_t blizzard_reg_read(void *opaque, uint8_t reg) return s->gpio_pdown; default: - fprintf(stderr, "%s: unknown register %02x\n", __func__, reg); + error_report("%s: unknown register %02x", __func__, reg); return 0; } } @@ -501,7 +501,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) case 0x0c: /* PLL Mode Control 0 */ s->pll_mode = value & 0x77; if ((value & 3) == 0 || (value & 3) == 3) - fprintf(stderr, "%s: wrong PLL Control bits (%i)\n", + error_report("%s: wrong PLL Control bits (%i)", __func__, value & 3); break; @@ -541,7 +541,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) case 0x28: /* LCD Panel Configuration */ s->lcd_config = value & 0xff; if (value & (1 << 7)) - fprintf(stderr, "%s: data swap not supported!\n", __func__); + error_report("%s: data swap not supported!", __func__); break; case 0x2a: /* LCD Horizontal Display Width */ @@ -585,7 +585,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) case 0x40: /* High-speed Serial Interface Tx Configuration Port 1 */ s->hssi_config[1] = value; if (((value >> 4) & 3) == 3) - fprintf(stderr, "%s: Illegal active-data-links value\n", + error_report("%s: Illegal active-data-links value", __func__); break; case 0x42: /* High-speed Serial Interface Tx Mode */ @@ -641,7 +641,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) s->enable = value & 1; s->blank = (value >> 1) & 1; if (value & (1 << 4)) - fprintf(stderr, "%s: Macrovision enable attempt!\n", __func__); + error_report("%s: Macrovision enable attempt!", __func__); break; case 0x6a: /* Special Effects */ @@ -717,7 +717,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) s->iformat = value & 0xf; s->bpp = blizzard_iformat_bpp[s->iformat]; if (!s->bpp) - fprintf(stderr, "%s: Illegal or unsupported input format %x\n", + error_report("%s: Illegal or unsupported input format %x", __func__, s->iformat); break; case 0x8e: /* Data Source Select */ @@ -729,7 +729,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) s->iy[1] != s->oy[1])) || !((s->ix[1] - s->ix[0]) & (s->iy[1] - s->iy[0]) & (s->ox[1] - s->ox[0]) & (s->oy[1] - s->oy[0]) & 1)) - fprintf(stderr, "%s: Illegal input/output window positions\n", + error_report("%s: Illegal input/output window positions", __func__); blizzard_transfer_setup(s); @@ -783,8 +783,8 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) case 0xe6: /* Power-save */ s->pm = value & 0x83; if (value & s->mode & 1) - fprintf(stderr, "%s: The display must be disabled before entering " - "Standby Mode\n", __func__); + error_report("%s: The display must be disabled before entering " + "Standby Mode", __func__); break; case 0xe8: /* Non-display Period Control / Status */ s->status = value & 0x1b; @@ -815,7 +815,7 @@ static void blizzard_reg_write(void *opaque, uint8_t reg, uint16_t value) break; default: - fprintf(stderr, "%s: unknown register %02x\n", __func__, reg); + error_report("%s: unknown register %02x", __func__, reg); break; } } diff --git a/hw/display/omap_dss.c b/hw/display/omap_dss.c index 601f178fdd..52d6e753d3 100644 --- a/hw/display/omap_dss.c +++ b/hw/display/omap_dss.c @@ -406,10 +406,10 @@ static void omap_disc_write(void *opaque, hwaddr addr, s->lcd.enable = (value >> 0) & 1; if (value & (1 << 12)) /* OVERLAY_OPTIMIZATION */ if (!((s->dispc.l[1].attr | s->dispc.l[2].attr) & 1)) { - fprintf(stderr, "%s: Overlay Optimization when no overlay " - "region effectively exists leads to " - "unpredictable behaviour!\n", __func__); - } + error_report("%s: Overlay Optimization when no overlay " + "region effectively exists leads to " + "unpredictable behaviour!", __func__); + } if (value & (1 << 6)) { /* GODIGITAL */ /* XXX: Shadowed fields are: * s->dispc.config @@ -525,8 +525,8 @@ static void omap_disc_write(void *opaque, hwaddr addr, case 0x0a0: /* DISPC_GFX_ATTRIBUTES */ s->dispc.l[0].attr = value & 0x7ff; if (value & (3 << 9)) - fprintf(stderr, "%s: Big-endian pixel format not supported\n", - __func__); + error_report("%s: Big-endian pixel format not supported", + __func__); s->dispc.l[0].enable = value & 1; s->dispc.l[0].bpp = (value >> 1) & 0xf; s->dispc.invalidate = 1; @@ -617,7 +617,7 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s) if (s->rfbi.control & (1 << 1)) { /* BYPASS */ /* TODO: in non-Bypass mode we probably need to just assert the * DRQ and wait for DMA to write the pixels. */ - fprintf(stderr, "%s: Bypass mode unimplemented\n", __func__); + error_report("%s: Bypass mode unimplemented", __func__); return; } diff --git a/hw/display/pl110.c b/hw/display/pl110.c index 8c7dcc6f0a..b8b7903d36 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -174,7 +174,7 @@ static void pl110_update_display(void *opaque) dest_width = 4; break; default: - fprintf(stderr, "pl110: Bad color depth\n"); + error_report("pl110: Bad color depth"); exit(1); } if (s->cr & PL110_CR_BGR) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index b83f80753a..ae3a365849 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -1050,7 +1050,7 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem, s->dest_width = 4; break; default: - fprintf(stderr, "%s: Bad color depth\n", __func__); + error_report("%s: Bad color depth", __func__); exit(1); } diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index e7ac4f8789..0cd07028a4 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -78,7 +78,7 @@ void qxl_render_resize(PCIQXLDevice *qxl) qxl->guest_primary.bits_pp = 32; break; default: - fprintf(stderr, "%s: unhandled format: %x\n", __func__, + error_report("%s: unhandled format: %x", __func__, qxl->guest_primary.surface.format); qxl->guest_primary.bytes_pp = 4; qxl->guest_primary.bits_pp = 32; @@ -247,7 +247,7 @@ static QEMUCursor *qxl_cursor(PCIQXLDevice *qxl, QXLCursor *cursor, } break; default: - fprintf(stderr, "%s: not implemented: type %d\n", + error_report("%s: not implemented: type %d", __func__, cursor->header.type); goto fail; } @@ -275,9 +275,8 @@ int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext) } if (qxl->debug > 1 && cmd->type != QXL_CURSOR_MOVE) { - fprintf(stderr, "%s", __func__); + error_report("%s", __func__); qxl_log_cmd_cursor(qxl, cmd, ext->group_id); - fprintf(stderr, "\n"); } switch (cmd->type) { case QXL_CURSOR_SET: diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 99365c3e8f..2e3ae5b90c 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -875,7 +875,7 @@ static void interface_notify_update(QXLInstance *sin, uint32_t update_id) * Probably was at some earlier version that is prior to git start (2009), * and is still guest trigerrable. */ - fprintf(stderr, "%s: deprecated\n", __func__); + error_report("%s: deprecated", __func__); } /* called from spice server thread context only */ @@ -905,7 +905,7 @@ static void interface_async_complete_io(PCIQXLDevice *qxl, QXLCookie *cookie) trace_qxl_interface_async_complete_io(qxl->id, current_async, cookie); if (!cookie) { - fprintf(stderr, "qxl: %s: error, cookie is NULL\n", __func__); + error_report("qxl: %s: error, cookie is NULL", __func__); return; } if (cookie && current_async != cookie->io) { @@ -930,7 +930,7 @@ static void interface_async_complete_io(PCIQXLDevice *qxl, QXLCookie *cookie) qxl_spice_destroy_surface_wait_complete(qxl, cookie->u.surface_id); break; default: - fprintf(stderr, "qxl: %s: unexpected current_async %d\n", __func__, + error_report("qxl: %s: unexpected current_async %d", __func__, current_async); } qxl_send_events(qxl, QXL_INTERRUPT_IO_CMD); @@ -998,7 +998,7 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token) case QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG: break; default: - fprintf(stderr, "qxl: %s: unexpected cookie type %d\n", + error_report("qxl: %s: unexpected cookie type %d", __func__, cookie->type); g_free(cookie); } @@ -1875,7 +1875,7 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events) trace_qxl_send_events(d->id, events); if (!qemu_spice_display_is_running(&d->ssd)) { /* spice-server tracks guest running state and should not do this */ - fprintf(stderr, "%s: spice-server bug: guest stopped, ignoring\n", + error_report("%s: spice-server bug: guest stopped, ignoring", __func__); trace_qxl_send_events_vm_stopped(d->id, events); return; diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index 79f161740a..8b708a858b 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -159,7 +159,7 @@ void tc6393xb_gpio_out_set(TC6393xbState *s, int line, qemu_irq handler) { if (line >= TC6393XB_GPIOS) { - fprintf(stderr, "TC6393xb: no GPIO pin %d\n", line); + error_report("TC6393xb: no GPIO pin %d", line); return; } @@ -190,7 +190,7 @@ static void tc6393xb_l3v(void *opaque, int line, int level) { TC6393xbState *s = opaque; s->blank = !level; - fprintf(stderr, "L3V: %d\n", level); + error_report("L3V: %d", level); } static void tc6393xb_sub_irq(void *opaque, int line, int level) { @@ -257,7 +257,7 @@ static uint32_t tc6393xb_scr_readb(TC6393xbState *s, hwaddr addr) SCR_REG_B(CONFIG); SCR_REG_B(DEBUG); } - fprintf(stderr, "tc6393xb_scr: unhandled read at %08x\n", (uint32_t) addr); + error_report("tc6393xb_scr: unhandled read at %08x", (uint32_t) addr); return 0; } #undef SCR_REG_B @@ -318,8 +318,8 @@ static void tc6393xb_scr_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) SCR_REG_B(CONFIG); SCR_REG_B(DEBUG); } - fprintf(stderr, "tc6393xb_scr: unhandled write at %08x: %02x\n", - (uint32_t) addr, value & 0xff); + error_report("tc6393xb_scr: unhandled write at %08x: %02x", + (uint32_t) addr, value & 0xff); } #undef SCR_REG_B #undef SCR_REG_W @@ -341,7 +341,7 @@ static uint32_t tc6393xb_nand_cfg_readb(TC6393xbState *s, hwaddr addr) { case NAND_CFG_BASE + 3: return s->nand_phys >> (addr - NAND_CFG_BASE); } - fprintf(stderr, "tc6393xb_nand_cfg: unhandled read at %08x\n", (uint32_t) addr); + error_report("tc6393xb_nand_cfg: unhandled read at %08x", (uint32_t) addr); return 0; } static void tc6393xb_nand_cfg_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) { @@ -357,7 +357,7 @@ static void tc6393xb_nand_cfg_writeb(TC6393xbState *s, hwaddr addr, uint32_t val s->nand_phys |= (value & 0xff) << ((addr - NAND_CFG_BASE) * 8); return; } - fprintf(stderr, "tc6393xb_nand_cfg: unhandled write at %08x: %02x\n", + error_report("tc6393xb_nand_cfg: unhandled write at %08x: %02x", (uint32_t) addr, value & 0xff); } @@ -377,12 +377,14 @@ static uint32_t tc6393xb_nand_readb(TC6393xbState *s, hwaddr addr) { case NAND_IMR: return s->nand.imr; } - fprintf(stderr, "tc6393xb_nand: unhandled read at %08x\n", (uint32_t) addr); + error_report("tc6393xb_nand: unhandled read at %08x", (uint32_t) addr); return 0; } -static void tc6393xb_nand_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) { -// fprintf(stderr, "tc6393xb_nand: write at %08x: %02x\n", -// (uint32_t) addr, value & 0xff); +static void tc6393xb_nand_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) +{ + /* error_report("tc6393xb_nand: write at %08x: %02x", + * (uint32_t) addr, value & 0xff); + */ switch (addr) { case NAND_DATA + 0: case NAND_DATA + 1: @@ -420,7 +422,7 @@ static void tc6393xb_nand_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) tc6393xb_nand_irq(s); return; } - fprintf(stderr, "tc6393xb_nand: unhandled write at %08x: %02x\n", + error_report("tc6393xb_nand: unhandled write at %08x: %02x", (uint32_t) addr, value & 0xff); } @@ -522,13 +524,15 @@ static uint64_t tc6393xb_readb(void *opaque, hwaddr addr, }; if ((addr &~0xff) == s->nand_phys && s->nand_enable) { -// return tc6393xb_nand_readb(s, addr & 0xff); + /* return tc6393xb_nand_readb(s, addr & 0xff); */ uint8_t d = tc6393xb_nand_readb(s, addr & 0xff); -// fprintf(stderr, "tc6393xb_nand: read at %08x: %02hhx\n", (uint32_t) addr, d); + /* error_report("tc6393xb_nand: read at %08x: %02hhx", + * (uint32_t) addr, d); + */ return d; } -// fprintf(stderr, "tc6393xb: unhandled read at %08x\n", (uint32_t) addr); + /* error_report("tc6393xb: unhandled read at %08x", (uint32_t) addr); */ return 0; } @@ -548,7 +552,7 @@ static void tc6393xb_writeb(void *opaque, hwaddr addr, if ((addr &~0xff) == s->nand_phys && s->nand_enable) tc6393xb_nand_writeb(s, addr & 0xff, value); else - fprintf(stderr, "tc6393xb: unhandled write at %08x: %02x\n", + error_report("tc6393xb: unhandled write at %08x: %02x", (uint32_t) addr, (int)value & 0xff); } diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index 8c106a662d..88bc1c84a6 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -473,7 +473,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, return; } if (cmd->error) { - fprintf(stderr, "%s: ctrl 0x%x, error 0x%x\n", __func__, + error_report("%s: ctrl 0x%x, error 0x%x", __func__, cmd->cmd_hdr.type, cmd->error); virtio_gpu_ctrl_response_nodata(g, cmd, cmd->error); return; @@ -556,7 +556,7 @@ static void virtio_gpu_print_stats(void *opaque) VirtIOGPU *g = opaque; if (g->stats.requests) { - fprintf(stderr, "stats: vq req %4d, %3d -- 3D %4d (%5d)\n", + error_report("stats: vq req %4d, %3d -- 3D %4d (%5d)", g->stats.requests, g->stats.max_inflight, g->stats.req_3d, diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index cdc3fed6ca..a8a2b470bc 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -293,45 +293,45 @@ static inline bool vmsvga_verify_rect(DisplaySurface *surface, int x, int y, int w, int h) { if (x < 0) { - fprintf(stderr, "%s: x was < 0 (%d)\n", name, x); + error_report("%s: x was < 0 (%d)", name, x); return false; } if (x > SVGA_MAX_WIDTH) { - fprintf(stderr, "%s: x was > %d (%d)\n", name, SVGA_MAX_WIDTH, x); + error_report("%s: x was > %d (%d)", name, SVGA_MAX_WIDTH, x); return false; } if (w < 0) { - fprintf(stderr, "%s: w was < 0 (%d)\n", name, w); + error_report("%s: w was < 0 (%d)", name, w); return false; } if (w > SVGA_MAX_WIDTH) { - fprintf(stderr, "%s: w was > %d (%d)\n", name, SVGA_MAX_WIDTH, w); + error_report("%s: w was > %d (%d)", name, SVGA_MAX_WIDTH, w); return false; } if (x + w > surface_width(surface)) { - fprintf(stderr, "%s: width was > %d (x: %d, w: %d)\n", + error_report("%s: width was > %d (x: %d, w: %d)", name, surface_width(surface), x, w); return false; } if (y < 0) { - fprintf(stderr, "%s: y was < 0 (%d)\n", name, y); + error_report("%s: y was < 0 (%d)", name, y); return false; } if (y > SVGA_MAX_HEIGHT) { - fprintf(stderr, "%s: y was > %d (%d)\n", name, SVGA_MAX_HEIGHT, y); + error_report("%s: y was > %d (%d)", name, SVGA_MAX_HEIGHT, y); return false; } if (h < 0) { - fprintf(stderr, "%s: h was < 0 (%d)\n", name, h); + error_report("%s: h was < 0 (%d)", name, h); return false; } if (h > SVGA_MAX_HEIGHT) { - fprintf(stderr, "%s: h was > %d (%d)\n", name, SVGA_MAX_HEIGHT, h); + error_report("%s: h was > %d (%d)", name, SVGA_MAX_HEIGHT, h); return false; } if (y + h > surface_height(surface)) { - fprintf(stderr, "%s: update height > %d (y: %d, h: %d)\n", + error_report("%s: update height > %d (y: %d, h: %d)", name, surface_height(surface), y, h); return false; } @@ -529,7 +529,7 @@ static inline void vmsvga_cursor_define(struct vmsvga_state_s *s, #endif break; default: - fprintf(stderr, "%s: unhandled bpp %d, using fallback cursor\n", + error_report("%s: unhandled bpp %d, using fallback cursor", __func__, c->bpp); cursor_put(qc); qc = cursor_builtin_left_ptr();