From patchwork Tue Apr 12 12:53:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 8810381 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C758B9F39A for ; Tue, 12 Apr 2016 13:28:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C337820270 for ; Tue, 12 Apr 2016 13:28:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C0CD201F2 for ; Tue, 12 Apr 2016 13:28:35 +0000 (UTC) Received: from localhost ([::1]:49522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apyMs-0008ME-DP for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 09:28:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apyLi-00065N-42 for qemu-devel@nongnu.org; Tue, 12 Apr 2016 09:27:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apyLd-0005qk-Oh for qemu-devel@nongnu.org; Tue, 12 Apr 2016 09:27:22 -0400 Received: from mail-db3on0137.outbound.protection.outlook.com ([157.55.234.137]:39072 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apyLd-0005qW-2P for qemu-devel@nongnu.org; Tue, 12 Apr 2016 09:27:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Tusz9+DzkqaGASwnduprMQNvQsNT1Kj6yvaS9V+gsEU=; b=Odxwrq3TMyF+Q+EdcyzVBW3pfWC44M8gygSUGaJBzzMzBf8VsHog2gI9AAQDII6Ld/oJBeQTv2EVaWugFn0yLwsXltW44+G0Hub2t9pulRy04kBSdVtlHlPdRmw88khma70BjFxcijUlhPsolYyQT+fN7DI/KwyMexJN+1MpUZ4= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.10) by AM3PR08MB0215.eurprd08.prod.outlook.com (2a01:111:e400:8853::25) with Microsoft SMTP Server (TLS) id 15.1.453.26; Tue, 12 Apr 2016 12:55:13 +0000 From: Pavel Butsykin To: Date: Tue, 12 Apr 2016 15:53:14 +0300 Message-ID: <1460465594-15777-1-git-send-email-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <570C22D2.8060401@redhat.com> References: <570C22D2.8060401@redhat.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AM3PR03CA013.eurprd03.prod.outlook.com (2a01:111:e400:8829::13) To AM3PR08MB0215.eurprd08.prod.outlook.com (2a01:111:e400:8853::25) X-MS-Office365-Filtering-Correlation-Id: eecda37f-7985-4ab2-2105-08d362d1b07c X-Microsoft-Exchange-Diagnostics: 1; AM3PR08MB0215; 2:5jUFXaNRXIeWWoZdrLbNhDJ1EXsQqTvWuvLQ65yP0xFalsb7nTjyi+7SruqolvmPUvAf1ZwELi1P+Yh2bFngHDVrjCnyG1IrAmfQa/AQUhi5uisuKvHOpT9IAT1SmHrQaTJBNlyT9n7yI4gOrEw5t6VIoyWWYdBIivKkpUsgJPnPt3Fszb4N1fdVdo5ZLWb7; 3:ZJfOQKFKExixDYku69dggLv+K7sVKBW3i2MslIQa1ZkbcrtR4x9NEdAWGemvFyVs4t4QUxQt6iMAM781WUhQEft7p/wMPUaOpMxuORWekjikvUOP+wfOtkevHQtWdZM6; 25:E1ZopUKGvkTs5ny2Iri32dOxTIDjdFzQONOGi1QgkAPSqOJ0aeHEqeCJaCVoc0xz6z5Mofy+fcWYqKnWPf70Sez2w1MYnidPNhhUZHUBg4oJvsI2WZxRudXhT9AM06XDKRomENvE9/UEYgGJ+MJnge1jGFNdoSGe+ue1l/llWw4slB/p4fj6DBev7CxFNMiz7Ja0nVvzR6+yLfKLfyTghjdGR6leXPPro2lRHVwHo3hKy+JI2j9OGGLmS2gkGzsrZWGv3kuDai1THHfABL8IPVe/nRu5pU+1tk1dF7y82uTggmhWszrpUpxZWvgX2R5zAzLB47sRq29sSOKMQ6o8rw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR08MB0215; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040074)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041046)(6043046); SRVR:AM3PR08MB0215; BCL:0; PCL:0; RULEID:; SRVR:AM3PR08MB0215; X-Microsoft-Exchange-Diagnostics: 1; AM3PR08MB0215; 4:7cIt7NWrO+Rrz2BNSDY6QFJuxNZl24Ebw7dndJK1C/So4daj2AX4RQusm4TK+6YRK84E4l4HUq6MHNVRMnF+H3U14chpyBTs0SkFcE++e6ifg+J6Ea0S2UZJeBZIz9lLEwwfm6spRQ9a8aZKLVygXOkBHo/FxCSLyoLDNGzNHm2zvPd1p7dcgwyAjZn1tZOtkpSWyQ0u9KSvHB7PZytFwnMhnimof+pw5iQaVTdWl1aoYJHoMllM8n1Ru4ur9c36Ly3J9BiZb9mhQY3X6EozUlTlz2EIjtlUp5SrDBtNFXQE14lpN6JeiMiBWXQJ6C6ki0ZBbYvNFeJDduBPUNbzyTqBFLemlrolZmwPEMq/NX+gEdoghEiT0SlZVqM/cIfbzKc9BFamgGkiL+GwA/PcXYLqBZniNeuOUNeXVLGM71s= X-Forefront-PRVS: 0910AAF391 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(50986999)(76176999)(50226001)(5008740100001)(92566002)(110136002)(2351001)(4001430100002)(48376002)(5003940100001)(2950100001)(2906002)(229853001)(33646002)(50466002)(6116002)(42186005)(1096002)(66066001)(3846002)(81166005)(107886002)(53416004)(5004730100002)(19580405001)(19580395003)(4326007)(189998001)(36756003)(47776003)(586003)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM3PR08MB0215; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM3PR08MB0215; 23:9dSmimcqzd9KTdHkWPwVoIaerWCJo4LKoIuKe0USdE6+S0SJ0trweiAWvAY8WUGtNdxTZ9CSCfOab6+sqD7x+AQljlcrtME9Vfpe1DGFLsC2Jps7jL5m1vVQCbrzBdn9/7ZafAxsrdQgk/B3ND5FY2RS6DvJPpYD3i2UWM3jLGrl7usrK2ZQLwy9YkYzgKScVVnKyJALanxl47XkK1mi3ycTjkhtLtSH7Bru5XRRtTvNzBhF9q709NBuSsuarLDiJijODqH04mB0uuQQLq6iSwFPniP8J+lsDuJu2zpQsBY/+rDmhC0GfS7JeJnAtESmS0l7SqIB/Vjh3Ip7zxQKTfcKsGGRcndyV0aH+90PnT3CcURBVs2iU7YbseLK672Cazaf/qQgxHcr0aslGlQXt4dE7QDMOb2MdsNBrSUL1RHfDRBNEJyy+1ecNJpLKG402vIa2gATdQkr4CC8bQlSGk0iOVfcEHTfYnhc8coptLU8AjbpB3hJq8x0NquV3JsMS7FnTrWHm8b+vh1zRNrEvbZqkwhcYXxUltMkn3HFmUrNjctRJ54m0yCmWO7bwOVfVrrweyf7+PLKtV7nghDxRLqackZo1YhXClZRqgWNIVIlAIGdGdqeQOXSEqqlCxkjKxKeIfgZL1YxFy2TyLcjt4l5wrBTpGkqeUeUdGpb7nu98TR/0u/h678BnEGu3KQKS9aQ0Gj+S4ISnddumup0TiJ4eEK1VfdFjSmdmpCD6lZaLsnKPMkMJOgMaJ4ah1rlvmKyaVEp1TqiyfKsVClWCH/utdJso3yPtrjcNsblfOdco3/NUscmiL2nFt+0zhulewr8afbkeGNnprL5UTOjXJ3763mEsOQQrJTkexIRvz2K7ep58f6pFIhnTOj/maPfcAcV5OVKcFAt3EtmTA35RN3qKzJ9OlVSzQgBr0uM6EQl0aih9pxCdj3UFyyKDhC9 X-Microsoft-Exchange-Diagnostics: 1; AM3PR08MB0215; 5:E+AnQ6lquyfTV8yqKrCmxtagSRonUOi8Tg99vYXufvZM92PzA7hmR4RqL/D3oeyKbv5iHrjOw9ActtV2bEdC+GBSCg2UqD4dMshSOA/uO6jSWX8HyLNagvvEo3N1xVgaLkBvu49Jr4G2dRB3AvZvzw==; 24:fdS9jKyRXkYlwwPx1VCngH8yD9RMMMo/WC1+WPCib81C7OR4bQHfWZrgRRIUMiOlk1kB+k1xfbQS1EADaYC8E+cqVFpLKW/NvZs1k5f75cM=; 20:ZR/9YP+wssVehQ/fazIf1ROBSWwxBnr01gGs8aIBeuZCClkHmaIPFfJ09l2cvqoefKq38q+MUuckzUTsVlthWp9n6BL669kaY+kLSHUdGVZ/VsA7EubncYY7EfRds6VizTXrbhB3X6ETB0YpuSP0BI5eDFgoqE0aj/IaekxZ0As= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2016 12:55:13.4546 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0215 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 157.55.234.137 Subject: [Qemu-devel] [PATCH] ide: coding style fix 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: den@openvz.org, qemu-devel@nongnu.org, Pavel Butsykin Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pavel Butsykin --- hw/ide/internal.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ide/internal.h b/hw/ide/internal.h index eb006c2..d2c458f 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -338,7 +338,7 @@ enum ide_dma_cmd { IDE_DMA_READ, IDE_DMA_WRITE, IDE_DMA_TRIM, - IDE_DMA_ATAPI + IDE_DMA_ATAPI, }; #define ide_cmd_is_read(s) \ @@ -507,6 +507,7 @@ struct IDEDevice { }; /* These are used for the error_status field of IDEBus */ +#define IDE_RETRY_MASK 0xf8 #define IDE_RETRY_DMA 0x08 #define IDE_RETRY_PIO 0x10 #define IDE_RETRY_ATAPI 0x20 /* reused IDE_RETRY_READ bit */ @@ -526,9 +527,7 @@ struct IDEDevice { * impossible bit combination as a new status value. */ #define IS_IDE_RETRY_ATAPI(_status) \ - (((_status) & IDE_RETRY_ATAPI) && \ - !IS_IDE_RETRY_DMA(_status) && \ - !IS_IDE_RETRY_PIO(_status)) + (((_status) & IDE_RETRY_MASK) == IDE_RETRY_ATAPI) static inline uint8_t ide_dma_cmd_to_retry(uint8_t dma_cmd) {