Received: by 10.223.185.116 with SMTP id b49csp1071243wrg; Sat, 3 Mar 2018 14:44:47 -0800 (PST) X-Google-Smtp-Source: AG47ELt+MglK1N8Vd2zYyTgN4zDxjVxKM685fSmKVFkjv9vKreBr48RMXx5bdchqqWZEGQO08wrn X-Received: by 10.99.114.24 with SMTP id n24mr7884019pgc.400.1520117087677; Sat, 03 Mar 2018 14:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520117087; cv=none; d=google.com; s=arc-20160816; b=OZhJuW6MggsBlXjIp4McB+zGTV1TtsgQzzbJEhWTf92GBqy7sZnHuqg54oYxR9f1QO SnVsmZlgEqYhK2O8hnzsthoPZ+T4UZXnQMdqcBakZFUDiqRQi6SQItapyNdrWTpRZm9B NPhNxXhR362aS6Bc0rgFZ/nMg6DL+KbavqUZBBIBVWtAmQyCJWHpSpIdTU+/9X9wMwHz XyVYTjGV40WBJ8Xg7S8Ogpkzi/z2pGKfwIb/K3DwBhuRgfyn8XUKANfHv6nKxmOhODQk bslI4O1v6BCae0g+o/oKaNE4fLEJtyv9WheBn+g5Xg7kqKQrix2ocZvOJ1mql2j7N1Dl f6TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=I2RYKTnFwqb8z+tWVjUhlS3Anlg1uh9/2kBvS0D0+UY=; b=XiFTs37vOPnS/pWj/cXuLT8pNmPlUvT6ScDrNtRczAdFq3CQvpX0tCa3eJPwiiZM9P s4XlmvuXFAB1TskIsfGPiZcHoqDYiQy4rs/wOWnx9iOMt+F+q/oa7J4Oh5Rtw2u/a3Y9 Tvieg2CAVCcYL2Vx0r9RAUH2RUIeOFKAa4ERUYXPU3Ru7VBhIPhv9vJRZxu76eMRz9gy UDt+ibEqZAb75I1nNwdK3O3kFk2tEGVo3j7+b+VmG316IlR8RLAnrFuM2RVfeps9KO/F jlLt/rbJKm5/1nb7CR6rWKqoikwUGIlOshRPTt5IdibUuPR6TVLtFomKUPkpSRqE/3xT 9L9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VJHKuC3+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22-v6si5943191pll.71.2018.03.03.14.44.33; Sat, 03 Mar 2018 14:44:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VJHKuC3+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935652AbeCCWmp (ORCPT + 99 others); Sat, 3 Mar 2018 17:42:45 -0500 Received: from mail-by2nam03on0124.outbound.protection.outlook.com ([104.47.42.124]:55195 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935609AbeCCWmk (ORCPT ); Sat, 3 Mar 2018 17:42:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=I2RYKTnFwqb8z+tWVjUhlS3Anlg1uh9/2kBvS0D0+UY=; b=VJHKuC3+wHj2p44mOtuJJ6UO2ZvQ0KnGCqSC0jXxxUPnZ7aOtlWLLXerYCAKgVTwPOL1iz4f/YYvyWXeYYEAMc7og4ku0K/Pd0P4OtCCgBToPgd7BlyFTIlittet3K+nIIPrRSDEFeyfCUKvpRwVjxC6+ZiKsqCYmsl0pg8O06c= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1018.namprd21.prod.outlook.com (52.132.146.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.7; Sat, 3 Mar 2018 22:42:38 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:42:38 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Dan Carpenter , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 61/63] ASoC: nuc900: Fix a loop timeout test Thread-Topic: [PATCH AUTOSEL for 3.18 61/63] ASoC: nuc900: Fix a loop timeout test Thread-Index: AQHTsz+zNsDUo+gz/0Krj4U9qVvdlQ== Date: Sat, 3 Mar 2018 22:33:49 +0000 Message-ID: <20180303223228.27323-61-alexander.levin@microsoft.com> References: <20180303223228.27323-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223228.27323-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB1018;7:4JgGwGDNYmpiCIVMSrx8597YQ9N1pm7iJ+qyWdS3HzJl8pu7EkJLdbYEWSacEnwcChy5Dnou9PRtejOZ4zFMVgNJ/MTKu3r9y3tYRZ66+muPL5zXHjBThYVc4Jtbc7njC1K1F53oMCBjFm3yL6dK4jaHhiZ6sBRhUhPy7+uokSXXcgvOewC8zNu55zRITQPrgQP3H6x95nagCOBMjIq6E+LqcIW30M8GKbLPGZRLcwbSgBA0UIymE/X4EBCgCMe6 x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0348623a-a6cd-49b2-9d65-08d58158112c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020);SRVR:MW2PR2101MB1018; x-ms-traffictypediagnostic: MW2PR2101MB1018: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB1018;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1018; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(39380400002)(39860400002)(376002)(396003)(199004)(189003)(478600001)(99286004)(6666003)(105586002)(1076002)(3660700001)(66066001)(14454004)(6116002)(3846002)(36756003)(8936002)(2501003)(68736007)(53936002)(22452003)(316002)(10090500001)(86612001)(2906002)(2900100001)(5250100002)(6346003)(81166006)(8676002)(5660300001)(2950100002)(6512007)(26005)(25786009)(3280700002)(81156014)(10290500003)(4326008)(107886003)(102836004)(86362001)(6486002)(54906003)(186003)(7736002)(6436002)(305945005)(97736004)(6506007)(106356001)(110136005)(72206003)(76176011)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1018;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: Gps9Sia97qD2UJx/epYBMWEyh05+adanvN8kinllhE8zIx+nW4+RHt55F5ENO8cPIoBzvuL3IRXxZaFdQR17j8PX+OywG8+cEmevRHC6PV7pfrxZNoRlJRt1SbtB9d5AoL5fYfAPe5nGscueAubhR36Ax1nVBzQy2cneI80N+hs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0348623a-a6cd-49b2-9d65-08d58158112c X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:33:49.3732 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1018 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 65a12b3aafed5fc59f4ce41b22b752b1729e6701 ] We should be finishing the loop with timeout set to zero but because this is a post-op we finish with timeout =3D=3D -1. Fixes: 1082e2703a2d ("ASoC: NUC900/audio: add nuc900 audio driver support") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/nuc900/nuc900-ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.= c index f2f67942b229..84a4fc84d688 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *a= c97, =20 /* polling the AC_R_FINISH */ while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH) - && timeout--) + && --timeout) mdelay(1); =20 if (!timeout) { @@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, un= signed short reg, =20 /* polling the AC_W_FINISH */ while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH) - && timeout--) + && --timeout) mdelay(1); =20 if (!timeout) --=20 2.14.1