Received: by 10.223.185.116 with SMTP id b49csp1079235wrg; Sat, 3 Mar 2018 14:59:50 -0800 (PST) X-Google-Smtp-Source: AG47ELuubbuRVjhSpf+iufoeltdS/9sJLwINYLXG46larQ3fmmnSLy9D0Nxa1girJ8SPRqJuuXi8 X-Received: by 2002:a17:902:b192:: with SMTP id s18-v6mr8849118plr.243.1520117990310; Sat, 03 Mar 2018 14:59:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520117990; cv=none; d=google.com; s=arc-20160816; b=Oe0xa1ORjkg/az981CuDgIURRO4KP8jMOx7FH5rjYnBLbtRu6buo00RpZ7MLnIB5Rb PuS2hW/DTtdPRFTH59adlZ/DN7gywO6slCrKUv7xi8hBdAuNkYK9LgvKt2GOGwqvlfv8 gVRpImRt5ZjMamhiDSC4cOTfVQWsl8wRmUejHIS46FnBXZa0mBsEs4K/6+l/kmE9qilz atv9XxIosQnxf4mLJmvOvy0WWZ6020OebwRc2Fz9eFZt4AZ0ghk1Vd381y8SdDXn0t+S KjUqVapSfrMDr8j+ogDOPBzdr+mFttDfmBaC/IGw3XWr4EKI4Ec1sUeGNukrPTxJQ+Jm h+dA== 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=MU2+jNtIrv+dI1ov2frxHDAX3O15NZFGLfH1cMZcLhc=; b=KuAPJQyIS4aZQpxr5A5r9PhwlY3fKLkJfvK8zliNN1mvOM2XDLABoP/HgvfbPKES5M k7Ndrim2ravM6yQiFrh3K4TEuw/fsPgBRyiNIxFjuvl99pzhRBnkSBmsfv6Q1xP7oobR MefW5werZqbCLMf7Q4AK6KGYk0oqIzKBZ7OuXJIw+dEJWGa18g0G+UcohRWbdN15oG+D 2/kozLlFbe6obfU/oe8Q9PrxKwkuDpk8aCLAaEhmPK5mrP8jPDlaa/t+YXZ7RQpuZhp4 Nr9FQaMHKqoj9HpKvkDurh9qoOmLK60yaDfYun7vXsmlv+x+HnAxivD4kshAUvwrb93a NhMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ezbKT+Q1; 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 n3si7375383pfi.302.2018.03.03.14.59.36; Sat, 03 Mar 2018 14:59:50 -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=ezbKT+Q1; 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 S935474AbeCCW5v (ORCPT + 99 others); Sat, 3 Mar 2018 17:57:51 -0500 Received: from mail-cys01nam02on0110.outbound.protection.outlook.com ([104.47.37.110]:31968 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935338AbeCCWk4 (ORCPT ); Sat, 3 Mar 2018 17:40:56 -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=MU2+jNtIrv+dI1ov2frxHDAX3O15NZFGLfH1cMZcLhc=; b=ezbKT+Q1TK57Z4ozdOEFRCnZEIxW/hse8Zsl9YIqu5ylH+4ulyqGrhjHGU23JUU7B/d3Lqpq1flTT6nxd9f+tBQWD+9+6U9N8oKegP51PYMAbNWiTWGAafF1Gcy1CqCcqvrtYx7XMUoziLsLovT8s1XQEQ8yeFBRrDNtSenxHhI= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MWHSPR01MB344.namprd21.prod.outlook.com (10.174.251.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.3; Sat, 3 Mar 2018 22:40:52 +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:40:52 +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 4.4 112/115] ASoC: nuc900: Fix a loop timeout test Thread-Topic: [PATCH AUTOSEL for 4.4 112/115] ASoC: nuc900: Fix a loop timeout test Thread-Index: AQHTsz9vBmRrZedEfEqjP4LenWC1TQ== Date: Sat, 3 Mar 2018 22:31:56 +0000 Message-ID: <20180303223010.27106-112-alexander.levin@microsoft.com> References: <20180303223010.27106-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223010.27106-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;MWHSPR01MB344;7:2bYNCfni2HuUYgbqnY/OBoDai4dljR9KCfnm2Xrj98Jse0r1Igi0lHympvtjGfFr4fTUNN2jseycX+owp5JISCdGJJXbhgRuF3BaT+JL2bcdNzP/k2d1uPyZFZhGBMkfqUvDP6+JrCeDaMBYsAh+cXrBGIzwHhhM50DNCVJbVX2NJ6znajsSbYtBlSvK++Wq6YySZR5CwDI1NkQ18S3SQqnHFPRpx+gKqHHnKy2TzWEPqbxwVo+otUJu3y9VQUw6 x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3f6d6728-7743-443d-b0db-08d58157d207 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MWHSPR01MB344; x-ms-traffictypediagnostic: MWHSPR01MB344: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; 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)(5005006)(8121501046)(3231220)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:MWHSPR01MB344;BCL:0;PCL:0;RULEID:;SRVR:MWHSPR01MB344; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(346002)(39860400002)(366004)(39380400002)(189003)(199004)(8676002)(5660300001)(5250100002)(2501003)(6506007)(7736002)(36756003)(25786009)(3846002)(6116002)(97736004)(305945005)(2900100001)(76176011)(6436002)(10090500001)(26005)(8936002)(186003)(81166006)(102836004)(81156014)(106356001)(86362001)(10290500003)(3660700001)(2906002)(99286004)(14454004)(86612001)(105586002)(478600001)(4326008)(6486002)(53936002)(107886003)(68736007)(316002)(54906003)(110136005)(6512007)(72206003)(3280700002)(22452003)(2950100002)(1076002)(66066001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHSPR01MB344;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: +hhlbyMYkB7IfTE4Lg6fEuSbzIGqhFcE2TThOiOQlPynBCbMPeDmkxofiVm/R/eRw4Oju/XX6yAh6Pp14iC+Pagt8PEX+UtfahJkjaIy7uR5DxyGbPUf7PbhJsBqW3wVK2wAZMkKFwGsqs4CYbHHRiyzUlpkPuflgWhlqDIjzdY= 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: 3f6d6728-7743-443d-b0db-08d58157d207 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:31:56.6051 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR01MB344 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 b6615affe571..fde974d52bb2 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