From nobody Mon Feb 9 19:37:15 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) 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 1506732573507358.18126285076926; Fri, 29 Sep 2017 17:49:33 -0700 (PDT) Received: from localhost ([::1]:37624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy5xx-0003ZS-M3 for importer@patchew.org; Fri, 29 Sep 2017 20:49:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy5WQ-00051x-N5 for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:20:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dy5WN-0006RW-F5 for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:20:46 -0400 Received: from mail-bl2nam02on0045.outbound.protection.outlook.com ([104.47.38.45]:59712 helo=NAM02-BL2-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 1dy5WN-0006RA-7U for qemu-devel@nongnu.org; Fri, 29 Sep 2017 20:20:43 -0400 Received: from BLUPR0201CA0020.namprd02.prod.outlook.com (10.163.116.30) by CY4PR02MB2695.namprd02.prod.outlook.com (10.175.59.17) 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:20:40 +0000 Received: from SN1NAM02FT004.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::201) by BLUPR0201CA0020.outlook.office365.com (2a01:111:e400:52e7::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Sat, 30 Sep 2017 00:20:39 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT004.mail.protection.outlook.com (10.152.72.175) 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:20:38 +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 1dy5WI-00083k-E6; Fri, 29 Sep 2017 17:20:38 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dy5WI-0007W9-9e; Fri, 29 Sep 2017 17:20:38 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v8U0KUv8001001; Fri, 29 Sep 2017 17:20:30 -0700 Received: from [172.19.2.220] (helo=localhost.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dy5WA-0007UM-8R; Fri, 29 Sep 2017 17:20:30 -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=+4fARWjJXIu/EWwQrQF5KnBjb8zgcpWY6r3Brnqi6qA=; b=GrZdjVhAAjqchqxtHi3FN2zCHk7zs2KruaUB0y3RkcSXaT6KrRY15ZhGl0dVJJ/HuBiBjtJwNwSayOgndcEfebIebGvJnZBCIMs3TaECcR3fwsxRtpnC4ihFO97oeqHTqzblFjNFsEj/9x7GvVwWXYj2T/ApuJeIi/3pZBOkZlw= 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: temperror (zoho.com: Error in retrieving data from DNS) 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.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; From: Alistair Francis To: Date: Fri, 29 Sep 2017 17:16:43 -0700 Message-ID: <594ec8f7361da0cc99525fadd97a9e61558162f5.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.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(2980300002)(438002)(199003)(189002)(189998001)(6916009)(6666003)(2950100002)(2351001)(33646002)(8936002)(5660300001)(48376002)(36386004)(47776003)(81166006)(106466001)(478600001)(106002)(8676002)(118296001)(9786002)(54906003)(63266004)(16586007)(77096006)(81156014)(36756003)(305945005)(356003)(316002)(50226002)(76176999)(5003940100001)(39060400002)(50986999)(4326008)(50466002)(2906002)(107986001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB2695; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT004; 1:4+DPRB/Opf8CZdHTcovtiQUDhMk7geHipTOXpHKIQeAz+7HY1J+EWnSzfq30nAeU7dAT0qg5fpvwEHsSHKrrdy6lC2yaBHp6sKwODuJneXOznd0bzT9KnVRLg8PKBSL8 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bfff75ce-62ad-41f3-3cfe-08d507991429 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(8251501002)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR02MB2695; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2695; 3:J+N3KvK00JREvkLDOFbFaBu08wjNvYlc6ylbWdIG44p5dFUIVtXvMh/sb7sHDr0IF6BsVdbA8Hmh3KPZOAVX7DeESgX3yFcDjQaNG5w9nddqhShpPvJLdfyB/XuKM6bTBWlg0a2XvzixKIyP2QIleo62RUefd29e16AhvqTC7bbG0CWUxXfKAIKNFCINu3Ups/M7i3eH0rsv9p+9KdAZQRGnEIb7QoXxPaFrDwVslm2bHNdTM/vhLkeCzK/+CaeIwhIAXZlTFt9bZOwb92of+i/243q1oc9aBJ6zqD76+0OrrJib6amKtucUb/thvjdWAgbowdRuayC5f2pUIGTSPz4yD1Ssk3tbxkZPFjuCYJU=; 25:bLDA/amSnVmsgmjy3Q+FxjPvyGYWwG/Ch3Mx4qoro+KBLIp/XLznqEaZQzjo9lghzDtP/rr1RpJc/acanstpKVy2TrsVY65nluvLdK9Uab9P3XHRw6uk4zxrJcANs4p0C4WaVutIi9aVlJ0+A+6hxnLRTFuOGnMdhcOfxkQdlIcjRaB1Iv++lxVfjCD2MwcSt2U7A/ved1ezuBQdk36z3rbS8cGclDaEVpe9GGSvMqnjcE1PzO8scQtjc4+FuL1VBEXSq1GWvWcSu1AHUbq9FTOG41SFcEzdTFk0k5ZuYXznvAoGl/n4uq3sZH5L1yF9RgFraVweCaxKvPWHA0vRiw== X-MS-TrafficTypeDiagnostic: CY4PR02MB2695: X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2695; 31:p/n4pZnjpR0/utgoY+fw4fya3MfXLLEMgk5Rce1oOEuvwdNKmNr9ZDHchpxl1vUVkrgjU50mEUjlCZcKAzKQzlWj/KEe44kdqbqyWlo9KkhPx7Qo79ngwbvwtc6skd3yOZ+yPdIaIoscVBJnjCMZ5nz0TAvjh2zuRHP/UZ3BpifJVBtZoiOWI0M8rPHzD0+0tSghg/GvMKyKjoeBtI3aGjJDlH2cXGM6JiUasbLI3bc=; 20:nbk2wIuRiRGkNLqav/wDC7Iwkm8uXbbSA+9gZIs57s7VPOnOtpP5P3A5FuqrPz2du7oaezudSOCaa914ckU3/xQYrIwJuOia0khfMTExpuCHVJJtn5ZcYp1SM9rKkSefbwTDI0NtyE2ZU2aWLE4Znn2C4OsNTw9MfH4Hw4p88x7HCjPQYcPzUgpenl2QE+zAANd3jmIoIYtHdBSgngESAToVQpokL2uHcNc24rH/v8OrK1xNvozJleqeZph3MM0vkpiFIBx7rkenHIoEPc8+ghVdqXus7xYFArWwiHDcoxq54M1wBBjbLISrVvLmUnlxY0Jw/AM1YFQhOKZCEPqE6VwSQwASfdSINWUEewohu2SK00yfw1LmXOJdG4PV+sXja0NVyrflK6RXEjds6vv1xHhrsA22OiJD+d77rBoKsUKtSGxwxDM72cYnjTsH/i2o3o6SbIs37P0JWZfIVpb7Bd63w9CLbRjLIPU4f76nQOMSGVEgbMm426zG1zuNYqIt 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)(8121501046)(5005006)(93006095)(93004095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR02MB2695; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR02MB2695; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2695; 4:QrNwwr9bmqNMiOw01RspIDPgOCzTGMMYn2jK+A7mXzoFzed1jqBQhmT1R7x+bgIJldVgS4igsXBZ57q9G8jvfpETonGD0M4n4XplPD8F8DnG2ROM9sLggmkQotb4UUhd/1n/7kL6m4sCJJXVS3ryDQMrEUFKMvb9gGRkGqvFW6bC1ifQh1nUaMc4RqEzeN7acujKp1Ofv7lWHCw55AJkGycSXBXA0Oq0u8p9l6lNyFehGehaWIv+ReesMF6+cTXi7Oduaxg/W8bPPzq04Q0RgfRc9OsprZonoAUbrE4Tsotx7qLbG+O/PCqT8s8QdbwMVXRCg3ytaUokKvXs+lN9LA== X-Forefront-PRVS: 0446F0FCE1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR02MB2695; 23:GWrEBL0npWHLanX5MAsyzmt4M2OaOCgSjiGNEAwmx?= =?us-ascii?Q?Lov0Aa5USWucOuNm0eBd9vZ6nIJFzK48RPJExqIzaIdjof8SCTQ4l1MR7frv?= =?us-ascii?Q?32M8Kpwxz7ajvVGBylC2o1Fa0gC3PXIrZZlzi+pOXXsGmq6K1Icj71hR3vCQ?= =?us-ascii?Q?Zc9vlgCXG4XObwbQwpndDcMs+VW0B2DXIc5AZ1UiSEW1z1fxptw4pP0GxkQ2?= =?us-ascii?Q?fIfIp9rq/rqVD5JFhqxnosyzA1SyKQfcPLPlGjnixWetRFxHtgmiVnjPG/2U?= =?us-ascii?Q?ocRaREdtkE91luz+ZUZqmKe9ORvLMTzbCvo5JKlC0wJFI9WLyWgCtTjKYQQJ?= =?us-ascii?Q?/Xw14tBylXabPQvdrk9Spe1t870UW9/SI/T06t6bSuo5NImUnyxpj1OdDRzi?= =?us-ascii?Q?SXoawfnCs1T5wFFLGrppQAIlpNjwOETBNfGrDpP1trJUvcQQQhRu4HrPvrnl?= =?us-ascii?Q?E1l8u73/utzyg3oCxq4aLqsvK0j05zQ889cEoee53Qdxv+oZGGXhSMCzlcY/?= =?us-ascii?Q?BpDetwzGxoX2hdMSqRBVHwHqWreNEBZzElC7wt5PS/eh22FnaijwVUeLp99B?= =?us-ascii?Q?KvCdhduL8LgTW5eSNhY2McGPHUqdwyOQbUqpegtRPLwi5F+74xseIqc6ioni?= =?us-ascii?Q?NioSPKRP5Nli9U0Y51gHONpBabj/jKhRcusqKuZfU+GpPX+e4b/6NaSnOPcE?= =?us-ascii?Q?yJhkIp1FjXOkfNKB9WX9SObDqyGdbPeg2i6o4Vb4TtdbMwqmwlngRrrcPMo/?= =?us-ascii?Q?69iRBgUFu3358M2unZqs3IoM989ChT78xCg/0dBXyoYtfZXQ0ke95IDWUSYB?= =?us-ascii?Q?Lb3c/zeLovvYxonfUj9cLGKE57+MCg9EKo3mWJPod/w37d84NMoA+Tadcv6N?= =?us-ascii?Q?KwmT43+Rl9fYSVrw+alfVracaqv/Wven/KQjv4np6WuDLmPWyGp/h8FujvNx?= =?us-ascii?Q?qTrycFK9nucvW0HRGdhh004udknInMMD57B5ibGmMUOiQv0zt1/EyXL3U5V7?= =?us-ascii?Q?JJ98wEy/fRYCs0k46SCgfBJId7j0OII/c1uQLKwS1IBnuqeH3bo7318x1dGP?= =?us-ascii?Q?lJA3DpeN70dA7MzoEr751PIS4Zc?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2695; 6:lEu4m78YxDVgL/78JmlWzGMfIi7tE4DktfnJ2yz7njRE6kb15U/DjeH3NsuUEE79fyEHUAqL1lIsSmHVvF1z2vLQ5IQCXw/RJpZjk11F40TjoAZ8WiVWYrx/FGxhqfLe8wvH6YNA5f/6U6T+qh02acZ9BB657ar6WcDMZhgVbv2CAiLf1IrhNLgCCYokQ2UDTQQ3hFanIHqwxL5AaNLaeOAk1d1XftJUWBRQPUsVER9svqUy0TC+RQ5pyBJ182HGMoK16JAsQit+TkQee15PtZblgkdELQiwT1chEIQsNMiyNsaHqOm0TYLLWd8ZbpFmEkr5z1PpDyZNRGkYnsWpMA==; 5:kLtlJFhhN2PKm/Tv42B8tZWgJpsSHpKlEqTenY1NarkqAtnP/vZZmQxXRKPr8Aewh6XkLDjpQ04+xbZQiBhwTOjtwxVObCXpgxXGbMEKhpvdNWnEA2iBjf0Ee+xlqvAC/LFBhEbRHJaYW3Co/pbu8OqHwMjveTiqWn8W57BZ28A=; 24:P6uz5/3JEqYMiUbQReXo8jgfJl7fELZakJHr/qx5azsS58hQEWhZuQ8EH8MJKhFc4dZD71gKaLuKdLGDjGRKkkIJI0AO75hsaaORKSyE0Z4=; 7:XOSy14RYfZOTmrl7l6xUi3llwFNTFqLGEJNK/ZoCG6Di/gsu/RF6/yfDPEr/YSyoDSd2YCifbtVs2S/HHxCDxmn/jbg/4Vx+j7zGtuk9tzzSMFjWA9bjfOFRaWBZThc1FIapeET+gnuDEPGUVzkAnpDu7XYy1kfJbWvpX3WICuZnm9Z6MSlM4w87Fjr+9suHujktiURUy08SFrJV1JJw7pNGp4S7W96lpwl/xmANFrk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2017 00:20:38.8993 (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: CY4PR02MB2695 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.38.45 Subject: [Qemu-devel] [PATCH v2 34/47] hw/scsi: 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: Alexander Graf , armbru@redhat.com, Paolo Bonzini , alistair23@gmail.com, alistair.francis@xilinx.com, David Gibson 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_6 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: Paolo Bonzini Cc: David Gibson Cc: Alexander Graf --- V2: - Split hw patch into individual directories hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/spapr_vscsi.c | 49 +++++++++++++++++++++----------------= ---- hw/scsi/virtio-scsi-dataplane.c | 6 ++--- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index a67ee074d9..925cebb134 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -14,7 +14,7 @@ */ =20 #include "qemu/osdep.h" - +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/pci/pci.h" #include "hw/scsi/scsi.h" @@ -1501,7 +1501,7 @@ again: This is apparently sufficient to beat the drivers into submissi= on. */ if (!(s->sien0 & LSI_SIST0_UDC)) - fprintf(stderr, "inf. loop with UDC masked\n"); + error_report("inf. loop with UDC masked"); lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0); lsi_disconnect(s); } else if (s->istat1 & LSI_ISTAT1_SRUN && !s->waiting) { diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index 360db53ac8..8c4eabcf3d 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -32,6 +32,7 @@ * - Maybe do autosense (PAPR seems to mandate it, linux doesn't care) */ #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qemu-common.h" #include "cpu.h" #include "hw/hw.h" @@ -179,7 +180,7 @@ static int vscsi_send_iu(VSCSIState *s, vscsi_req *req, rc =3D spapr_vio_dma_write(&s->vdev, req->crq.s.IU_data_ptr, &req->iu, length); if (rc) { - fprintf(stderr, "vscsi_send_iu: DMA write failure !\n"); + error_report("vscsi_send_iu: DMA write failure !"); } =20 req->crq.s.valid =3D 0x80; @@ -197,7 +198,7 @@ static int vscsi_send_iu(VSCSIState *s, vscsi_req *req, =20 rc1 =3D spapr_vio_send_crq(&s->vdev, req->crq.raw); if (rc1) { - fprintf(stderr, "vscsi_send_iu: Error sending response\n"); + error_report("vscsi_send_iu: Error sending response"); return rc1; } =20 @@ -330,7 +331,7 @@ static int vscsi_fetch_desc(VSCSIState *s, struct vscsi= _req *req, break; } default: - fprintf(stderr, "VSCSI: Unknown format %x\n", req->dma_fmt); + error_report("VSCSI: Unknown format %x", req->dma_fmt); return -1; } =20 @@ -518,7 +519,7 @@ static void vscsi_transfer_data(SCSIRequest *sreq, uint= 32_t len) =20 trace_spapr_vscsi_transfer_data(sreq->tag, len, req); if (req =3D=3D NULL) { - fprintf(stderr, "VSCSI: Can't find request for tag 0x%x\n", sreq->= tag); + error_report("VSCSI: Can't find request for tag 0x%x", sreq->tag); return; } =20 @@ -527,7 +528,7 @@ static void vscsi_transfer_data(SCSIRequest *sreq, uint= 32_t len) rc =3D vscsi_srp_transfer_data(s, req, req->writing, buf, len); } if (rc < 0) { - fprintf(stderr, "VSCSI: RDMA error rc=3D%d!\n", rc); + error_report("VSCSI: RDMA error rc=3D%d!", rc); req->dma_error =3D true; scsi_req_cancel(req->sreq); return; @@ -547,7 +548,7 @@ static void vscsi_command_complete(SCSIRequest *sreq, u= int32_t status, size_t re =20 trace_spapr_vscsi_command_complete(sreq->tag, status, req); if (req =3D=3D NULL) { - fprintf(stderr, "VSCSI: Can't find request for tag 0x%x\n", sreq->= tag); + error_report("VSCSI: Can't find request for tag 0x%x", sreq->tag); return; } =20 @@ -639,7 +640,7 @@ static void *vscsi_load_request(QEMUFile *f, SCSIReques= t *sreq) memset(req, 0, sizeof(*req)); rc =3D vmstate_load_state(f, &vmstate_spapr_vscsi_req, req, 1); if (rc) { - fprintf(stderr, "VSCSI: failed loading request tag#%u\n", sreq->ta= g); + error_report("VSCSI: failed loading request tag#%u", sreq->tag); return NULL; } assert(req->active); @@ -827,7 +828,7 @@ static int vscsi_process_tsk_mgmt(VSCSIState *s, vscsi_= req *req) uint64_t tag =3D iu->srp.rsp.tag; uint8_t sol_not =3D iu->srp.cmd.sol_not; =20 - fprintf(stderr, "vscsi_process_tsk_mgmt %02x\n", + error_report("vscsi_process_tsk_mgmt %02x", iu->srp.tsk_mgmt.tsk_mgmt_func); =20 d =3D vscsi_device_find(&s->bus, be64_to_cpu(req->iu.srp.tsk_mgmt.lun)= , &lun); @@ -932,10 +933,10 @@ static int vscsi_handle_srp_req(VSCSIState *s, vscsi_= req *req) case SRP_CRED_RSP: case SRP_AER_REQ: case SRP_AER_RSP: - fprintf(stderr, "VSCSI: Unsupported opcode %02x\n", opcode); + error_report("VSCSI: Unsupported opcode %02x", opcode); break; default: - fprintf(stderr, "VSCSI: Unknown type %02x\n", opcode); + error_report("VSCSI: Unknown type %02x", opcode); } =20 return done; @@ -953,7 +954,7 @@ static int vscsi_send_adapter_info(VSCSIState *s, vscsi= _req *req) rc =3D spapr_vio_dma_read(&s->vdev, be64_to_cpu(sinfo->buffer), &info, be16_to_cpu(sinfo->common.length)); if (rc) { - fprintf(stderr, "vscsi_send_adapter_info: DMA read failure !\n"); + error_report("vscsi_send_adapter_info: DMA read failure !"); } #endif memset(&info, 0, sizeof(info)); @@ -967,7 +968,7 @@ static int vscsi_send_adapter_info(VSCSIState *s, vscsi= _req *req) rc =3D spapr_vio_dma_write(&s->vdev, be64_to_cpu(sinfo->buffer), &info, be16_to_cpu(sinfo->common.length)); if (rc) { - fprintf(stderr, "vscsi_send_adapter_info: DMA write failure !\n"); + error_report("vscsi_send_adapter_info: DMA write failure !"); } =20 sinfo->common.status =3D rc ? cpu_to_be32(1) : 0; @@ -987,7 +988,7 @@ static int vscsi_send_capabilities(VSCSIState *s, vscsi= _req *req) req_len =3D len =3D be16_to_cpu(vcap->common.length); buffer =3D be64_to_cpu(vcap->buffer); if (len > sizeof(cap)) { - fprintf(stderr, "vscsi_send_capabilities: capabilities size mismat= ch !\n"); + error_report("vscsi_send_capabilities: capabilities size mismatch = !"); =20 /* * Just read and populate the structure that is known. @@ -997,7 +998,7 @@ static int vscsi_send_capabilities(VSCSIState *s, vscsi= _req *req) } rc =3D spapr_vio_dma_read(&s->vdev, buffer, &cap, len); if (rc) { - fprintf(stderr, "vscsi_send_capabilities: DMA read failure !\n"); + error_report("vscsi_send_capabilities: DMA read failure !"); } =20 /* @@ -1013,7 +1014,7 @@ static int vscsi_send_capabilities(VSCSIState *s, vsc= si_req *req) =20 rc =3D spapr_vio_dma_write(&s->vdev, buffer, &cap, len); if (rc) { - fprintf(stderr, "vscsi_send_capabilities: DMA write failure !\n"); + error_report("vscsi_send_capabilities: DMA write failure !"); } if (req_len > len) { /* @@ -1034,11 +1035,11 @@ static int vscsi_handle_mad_req(VSCSIState *s, vscs= i_req *req) =20 switch (be32_to_cpu(mad->empty_iu.common.type)) { case VIOSRP_EMPTY_IU_TYPE: - fprintf(stderr, "Unsupported EMPTY MAD IU\n"); + error_report("Unsupported EMPTY MAD IU"); retlen =3D sizeof(mad->empty_iu); break; case VIOSRP_ERROR_LOG_TYPE: - fprintf(stderr, "Unsupported ERROR LOG MAD IU\n"); + error_report("Unsupported ERROR LOG MAD IU"); retlen =3D sizeof(mad->error_log); break; case VIOSRP_ADAPTER_INFO_TYPE: @@ -1053,7 +1054,7 @@ static int vscsi_handle_mad_req(VSCSIState *s, vscsi_= req *req) request_handled =3D true; break; default: - fprintf(stderr, "VSCSI: Unknown MAD type %02x\n", + error_report("VSCSI: Unknown MAD type %02x", be32_to_cpu(mad->empty_iu.common.type)); /* * PAPR+ says that "The length field is set to the length @@ -1078,7 +1079,7 @@ static void vscsi_got_payload(VSCSIState *s, vscsi_cr= q *crq) =20 req =3D vscsi_get_req(s); if (req =3D=3D NULL) { - fprintf(stderr, "VSCSI: Failed to get a request !\n"); + error_report("VSCSI: Failed to get a request !"); return; } =20 @@ -1088,7 +1089,7 @@ static void vscsi_got_payload(VSCSIState *s, vscsi_cr= q *crq) * of the structure. */ if (crq->s.IU_length > sizeof(union viosrp_iu)) { - fprintf(stderr, "VSCSI: SRP IU too long (%d bytes) !\n", + error_report("VSCSI: SRP IU too long (%d bytes) !", crq->s.IU_length); vscsi_put_req(req); return; @@ -1097,7 +1098,7 @@ static void vscsi_got_payload(VSCSIState *s, vscsi_cr= q *crq) /* XXX Handle failure differently ? */ if (spapr_vio_dma_read(&s->vdev, crq->s.IU_data_ptr, &req->iu, crq->s.IU_length)) { - fprintf(stderr, "vscsi_got_payload: DMA read failure !\n"); + error_report("vscsi_got_payload: DMA read failure !"); vscsi_put_req(req); return; } @@ -1158,16 +1159,16 @@ static int vscsi_do_crq(struct VIOsPAPRDevice *dev,= uint8_t *crq_data) case VIOSRP_AIX_FORMAT: case VIOSRP_LINUX_FORMAT: case VIOSRP_INLINE_FORMAT: - fprintf(stderr, "vscsi_do_srq: Unsupported payload format %02x= \n", + error_report("vscsi_do_srq: Unsupported payload format %02x", crq.s.format); break; default: - fprintf(stderr, "vscsi_do_srq: Unknown payload format %02x\n", + error_report("vscsi_do_srq: Unknown payload format %02x", crq.s.format); } break; default: - fprintf(stderr, "vscsi_do_crq: unknown CRQ %02x %02x ...\n", + error_report("vscsi_do_crq: unknown CRQ %02x %02x ...", crq.raw[0], crq.raw[1]); }; =20 diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplan= e.c index add4b3f4a4..e047361310 100644 --- a/hw/scsi/virtio-scsi-dataplane.c +++ b/hw/scsi/virtio-scsi-dataplane.c @@ -97,7 +97,7 @@ static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueu= e *vq, int n, /* Set up virtqueue notify */ rc =3D virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), n, true); if (rc !=3D 0) { - fprintf(stderr, "virtio-scsi: Failed to set host notifier (%d)\n", + error_report("virtio-scsi: Failed to set host notifier (%d)", rc); s->dataplane_fenced =3D true; return rc; @@ -141,8 +141,8 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) /* Set up guest notifier (irq) */ rc =3D k->set_guest_notifiers(qbus->parent, vs->conf.num_queues + 2, t= rue); if (rc !=3D 0) { - fprintf(stderr, "virtio-scsi: Failed to set guest notifiers (%d), " - "ensure -enable-kvm is set\n", rc); + error_report("virtio-scsi: Failed to set guest notifiers (%d), " + "ensure -enable-kvm is set", rc); goto fail_guest_notifiers; } =20 --=20 2.11.0