Received: by 10.223.185.116 with SMTP id b49csp1095059wrg; Sat, 3 Mar 2018 15:24:13 -0800 (PST) X-Google-Smtp-Source: AG47ELuEterH+IDTcuhUFkg0j+LdtDByLOTkO+o5hQ56ZFeqO7cAUKNIaxzsWwlY/yfXPWWdep2Q X-Received: by 10.167.131.86 with SMTP id z22mr10420337pfm.185.1520119453651; Sat, 03 Mar 2018 15:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520119453; cv=none; d=google.com; s=arc-20160816; b=OIp1kn7X7XEd8fbd+BKCXb3Z+mpqJ+YAubzTKgjuxn3x0jRWkWV8RYy7jToNcxIyEU 1PSQFG2zYc7mnBbW0B9mvu+XxaLd11mHjHw3KnvJYM53fv4XCEcsawRwqSULTd05oEld 51aInJ7YfxIPzeis0BoAG+hWMfRhxwwzwboHdCdgz5gxpcoKUwZrpVqZGfvRatKk4NZX k57JLRImq3Z5G0Qs9U/rWvK1jFgz/AF7aFTUhC6+ZIyOWC9xnTcsiD8HW1scPzZ6rVLJ HyK9cPXLie18zYou2tTOBzliUC2LVjNDJjaSZYI7IEVh45FCiBfHBbX4wXBU0fBungRD XOKQ== 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=Xh9+UFBmFZFMVtKB0vdA57FjMU6tIMT59V3hC3hkgVD+ib5e7xwYKJ7MThqZKhOf+D OSLqRtdFDJqpliNuKdD+F5cRdvTddtRUTginvZdcrXcESGog/Mq/7yClG8N6rsYZ9bRu /5kLsagVTia0qNqyFHZ7GULU3JS3ZnMq3QmwjdVOlovRQvuZn9Hm5l37g2IDkmlAxN+N OIZvItYprTpU+fGSjMwA5cm4eV8KgQ5i0Lyurb49qvwAEX8BIlhNc9CtVIMAOWrKhwij aLbhi9Xz/8piLRmKEMQaLOgPTZUiKy+MtTvMhrMZ2M8gFRqJx+6Svo01WBKz9m58X5dR KBBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=hw/JJn9d; 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 1-v6si6904974plz.756.2018.03.03.15.23.59; Sat, 03 Mar 2018 15:24:13 -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=hw/JJn9d; 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 S1752329AbeCCXXZ (ORCPT + 99 others); Sat, 3 Mar 2018 18:23:25 -0500 Received: from mail-co1nam03on0134.outbound.protection.outlook.com ([104.47.40.134]:45128 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934687AbeCCWhw (ORCPT ); Sat, 3 Mar 2018 17:37:52 -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=hw/JJn9dp9CEJinGlSUYbfCwOPyvENA1/73LoCwOaKOSHEQygtpEMQ/H1busimueGlyM9LTAEnEB3A7YAXlsIuLFZZEQBng6wIvEeGwZ9d1NkKVquc47yOHS+ILUZv+dj9p/wO2gVn21BpHJo8oD7mp7KuSmZBdhcWDlC84DGPo= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1100.namprd21.prod.outlook.com (52.132.149.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:37:49 +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:37:49 +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.9 215/219] ASoC: nuc900: Fix a loop timeout test Thread-Topic: [PATCH AUTOSEL for 4.9 215/219] ASoC: nuc900: Fix a loop timeout test Thread-Index: AQHTsz8rUgFeEx21ekKJiUFiPmcnPA== Date: Sat, 3 Mar 2018 22:30:01 +0000 Message-ID: <20180303222716.26640-215-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-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;MW2PR2101MB1100;7:CYhdYRXRbJmmkOiTrnm5FCKHOp/y9z1e1wQveqE2wujNcFR9Obxja7pXONr5+EJetWJyV29zD7bmsQwqv1+qlvAn76tFrkn756zdRLwgKrrobO2jhK2H25Ucf7rXgWiACmtStcUylb2PrJTufb4bkvtM6o2HRA492YC1ewKFGEYGMNRiERId4sd6YZr+NQtYMtjBqPCNRbrKTfjVxAkwAJeuUgVH3Qg7tFOk9kzDEWGDJAH5vlg7fOekTnyRzuxv x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9cb22961-2dce-4a90-5722-08d5815764a0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1100; x-ms-traffictypediagnostic: MW2PR2101MB1100: 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)(10201501046)(3002001)(3231220)(944501244)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:MW2PR2101MB1100;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1100; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(39380400002)(376002)(39860400002)(396003)(366004)(346002)(199004)(189003)(22452003)(97736004)(7736002)(5250100002)(105586002)(2906002)(6506007)(72206003)(66066001)(4326008)(305945005)(10290500003)(186003)(3280700002)(102836004)(2950100002)(6666003)(2501003)(478600001)(26005)(2900100001)(10090500001)(53936002)(8676002)(25786009)(81166006)(81156014)(54906003)(86362001)(6436002)(106356001)(110136005)(68736007)(36756003)(316002)(6512007)(5660300001)(107886003)(8936002)(1076002)(6486002)(3660700001)(99286004)(76176011)(3846002)(86612001)(14454004)(6116002)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1100;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) x-microsoft-antispam-message-info: oiQVjS9z3mP6kcp9KtYDKakSSxcgfMp3ReOLVquMnOkdTk9L7K8strHLtdwMrAyTBXygQyPB6/IBDUoorXoUEZ00UfIJxz+uld1XVoExbUZohRfFBhv3vaA7M6piQnqbkB5UnA0zE3DtAAyta2DLcOuv0neYMWiYbh1B2yXSPkY= 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: 9cb22961-2dce-4a90-5722-08d5815764a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:30:01.5726 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1100 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