Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp331478ybg; Tue, 28 Jul 2020 07:11:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwj4YYCriO8FhqQWglGHtXVJymRPVoI83/4jWAIT6+rjAKJCiSXVS+Fkc+ZLp2PUeWr+r1 X-Received: by 2002:a17:906:6bd9:: with SMTP id t25mr13678827ejs.250.1595945507323; Tue, 28 Jul 2020 07:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595945507; cv=none; d=google.com; s=arc-20160816; b=V+76xXUU8ckEBPXMqXWhsDSGRHwL3STJfHrr0hnOf4358wXYLdZIWNyFX8VLxeHzUg TdbA3bBhjU1DdAqQ4mv+PtVvoFljcMlFbxs73fVR/nlNn4bv0OF+eboHQWuMCOhz1vEW Mo09pgGOGTIr8vrQxL4GA8Rg3A9+7CnYqNzHy/cdEVJui8Oiw3v4cQhy7MTRx0qf62kH vqKQ3w3rCCpqGAeb8ypc8LGHEQfTDWA7GB95iDPy/BGoN0dQS+xHg9oI4QVM797fldI7 GK73nud7pPG4kIwBtfPtnJd8ElM/OmwOL368mtnUWOS1/fpuMCq+eB+tu8gLzoDjdiRk ku2Q== 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=suEMosAXJcsVRBqEPCC9fdQP59XGs0hD3Jn+cHeYz6A=; b=kAkBA2su/2qLu6Bohxdw4H2aHEo3VJRkN+nark2CPLK1INL3sfgoOb2XbSl5Obtttf pHudvEXkWNl+S0RwPrfran1zGYOegAnLyWlEhBi71NjRgff0DAah9xqoHJgV70zDTbkQ F53ZgP6vLc9lKsCigXiPBJPpFCifz8A+B3bAYChgzfcVVa+kkvnNBkLON1FXCfug2li1 PIrXTrjWTESRWoWVet10TStgbo15Ztxcfa9pTP4MFGuSBi5Ijz6qqDjJ0MuaMDtShfWe uuR82RA1HiPfCFoDcfdsRuSNN2ADWM2ADcqt4UBFdx1arGfH/Xn51sk04EwY1At71N7u sGNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="apE8fI/q"; 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 w13si2646031edr.565.2020.07.28.07.11.22; Tue, 28 Jul 2020 07:11:47 -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="apE8fI/q"; 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 S1730279AbgG1OLC (ORCPT + 99 others); Tue, 28 Jul 2020 10:11:02 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:7961 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730057AbgG1OLC (ORCPT ); Tue, 28 Jul 2020 10:11:02 -0400 X-UUID: c254afc30da74d48aec926f2773c279e-20200728 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=suEMosAXJcsVRBqEPCC9fdQP59XGs0hD3Jn+cHeYz6A=; b=apE8fI/qTpyi8svFmT4raknEZ4iQy/Wg/7sBZGW3hjb99/aLJwdS/ev7cadKXgbVgmbfEu2MyH1/UyK3R4eq2HYi9DWEoDAPYkx9U5uPTvvyzikmHgN3MkYdz1SPPPtkWIQwYlG0KqA3jqduKJsOovY5jL+RSIL/DpaI8mWbQQk=; X-UUID: c254afc30da74d48aec926f2773c279e-20200728 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 37312028; Tue, 28 Jul 2020 22:10:57 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Jul 2020 22:10:53 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 28 Jul 2020 22:10:55 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1] scsi: ufs: Fix possible infinite loop in ufshcd_hold Date: Tue, 28 Jul 2020 22:10:55 +0800 Message-ID: <20200728141055.22160-1-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain 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 LCBNZWRpYVRlaydzIHN1c3BlbmQgdm9wcyBtYXkNCmlzc3VlIFVJQyBjb21tYW5kcyB3aGljaC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