Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3406944pxa; Sat, 8 Aug 2020 22:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSskuf6Q5t+g8YmYu//dlGsikUwReWLpR7Ixz2zBMtIG975b5XjD3WqwtJBym+FgWuKQ5k X-Received: by 2002:aa7:d818:: with SMTP id v24mr16320506edq.259.1596949821268; Sat, 08 Aug 2020 22:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596949821; cv=none; d=google.com; s=arc-20160816; b=oy3LVr5pKOUVzSwMg58oOU/fqwXCceQG+xmulO+4XZwEaWyYHaCtOgVK6YOiBHU7rI DEf7njbXasvflEvq47p0ajBr0Kd9hxRthg8Sk7+LG+v44/LICLzvb1mvBNyHTRqD53FT tFserNGWNFf6hR+9dxQr0M+3dqqjWLFlDPKDFzCdRtj1pFpJFWOzPzQRkDLiirU2sb1p 5YmBtAljKntZwsP4ByiZfKGgbfIYdphuLLf+YNmgxc+nuUUvq4j06GBoyiflbSICLIFo EWU2iXaLZoRWba5BeeVpWozOdiH+pZvdLNc9eV15icr8DhSw4AdC1b9i+/S9SpPQPT8g grdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=n5rpOkS/9YzOZBQ2IqBRfdrcZmfEvjOti8eNGJiZ+ys=; b=fQVVKEOfBIWaj/xT5m8kI3fz9jAp57fAUOui0/gFbvUlTHtOBpkMKGxa94y/qOOdsz 5A6MM8lejHiVkZHtK8noLWb/mxkQPO5B2KMux6AVFpefku6MTUu1th+z5l+dqS9RKc0o z4TmXlJELtm3J9xzzsfSQBJZxKivLEAWO7HiG6yVXyQ25m+VqzpUvdfA2HxvGDN0a91q y64FTzl3Xf8gUxSc1kniqr0UoftxC7pFDDlRzB9b33PfvilyH89cLmPMYQeRjRhHGNr6 Enfrz6+4jJkkCM5K8Xvl4Fy13vME7Z2UaUozHsPnQvuMVGK7/XDDLxYmh5iQ1U9bTI/a 2Edg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bd896+5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si8030727edn.499.2020.08.08.22.09.58; Sat, 08 Aug 2020 22:10:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bd896+5y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726389AbgHIFI2 (ORCPT + 99 others); Sun, 9 Aug 2020 01:08:28 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:56590 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725790AbgHIFI1 (ORCPT ); Sun, 9 Aug 2020 01:08:27 -0400 X-UUID: 3886343308c846c5b743285c9b51a7e6-20200809 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=n5rpOkS/9YzOZBQ2IqBRfdrcZmfEvjOti8eNGJiZ+ys=; b=bd896+5yIlzMczsrDT+5GvUq7hAwlVB10L1XylVZcrM8XFC9aX1rly6CpnZ+cpzfsIQgLj9B3QD4/9ig+FQSeDwPqObsx0OzY7GUpN+8unEpJ10g2O39JWJh2GvAs0lRveuXrZIRD035V5gaIwKtGmQWooUt3zDydHPM1ITg7Zo=; X-UUID: 3886343308c846c5b743285c9b51a7e6-20200809 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 328196676; Sun, 09 Aug 2020 13:08:20 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 9 Aug 2020 13:07:33 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 9 Aug 2020 13:07:33 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v3] scsi: ufs: Fix possible infinite loop in ufshcd_hold Date: Sun, 9 Aug 2020 13:07:34 +0800 Message-ID: <20200809050734.18740-1-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: BE00B5FA824ED99B1C6B9E2F0B73FA1E619CF8E4178918B797D1658D07BEBB112000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SW4gdWZzaGNkX3N1c3BlbmQoKSwgYWZ0ZXIgY2xrLWdhdGluZyBpcyBzdXNwZW5kZWQgYW5kIGxp bmsgaXMgc2V0DQphcyBIaWJlcm44IHN0YXRlLCB1ZnNoY2RfaG9sZCgpIGlzIHN0aWxsIHBvc3Np Ymx5IGludm9rZWQgYmVmb3JlDQp1ZnNoY2Rfc3VzcGVuZCgpIHJldHVybnMuIEZvciBleGFtcGxl LCB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