Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp775364ybg; Tue, 28 Jul 2020 19:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/FT7yTa5+24HwEMDmSSQzZeCcxuR0fDMMOXImD+q+rIBrqfZvAckxAoRLGfG+DRI8177Y X-Received: by 2002:a05:6402:b87:: with SMTP id cf7mr2270507edb.131.1595990485644; Tue, 28 Jul 2020 19:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595990485; cv=none; d=google.com; s=arc-20160816; b=YCDSlaN0mDTeFN6dmyGChF20eWpzf+pUxSj8I32WBk2POEH7003j7tM1BJ3qzdw8uJ n4GbYo8ZJmKuYDIfk0iLzHrqkiHG8Gr2Ldf/5cLDS5V2vQXi/A9Pz9orT3EBtfVz0NKx 4fOuxKrsuwihMAIx2KwhdYY0dnaFacLdCx2ERCNflEXZXQTY+mq64YHT9p1IQLAQFrr1 kYHF99LFFuAa+Qpabdz2UEbLyFPQx0OEEVfrsaFcB/w8h2om7VS0/8JiJ2wK4QMmKfW6 U2EdV/JTu7x0RJTOgEKO369uulx/3Az9LLLgRuJD6+vLb1lHm6XA+VN5CW00883VzLef 6L8w== 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=bsmSl6GhvNafW+/QxrJVytLlWNDF54Z01VPoq2J5LuA=; b=SdcEWkjYKGlX2RLl2FcxMvjnfkP0KuHc7RGs8GPW8HM1xhytFKxibUKj1uqZf1sDu1 jwD74WT6mN34GOxLz7gXVZ6ntuWWbFHTAJ9ohkaOmFq+SXEwb/RHrqQEsD8tm7fPOl9E qqSKOPZp8uGLfDGPpYALDLw8mgZkyD9E/59eN4cLUpbhG3kAtvN2itwLSB094sNmK2VK ecJCB83aoRM0boAFSZJuaeRqIoYoIcnBE24YWh/Z6CWRNyYh6zAHo0/s0BD4KhHJxrnI DJibzOsqQ+EbUlQxa6XwYpPVAT6h2ReABb3G8jfDpac6azgJ/gUsFjr8PvcBhOlWGe3z AkMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=b8+a7zcp; 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 e8si257547eja.31.2020.07.28.19.41.03; Tue, 28 Jul 2020 19:41:25 -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=b8+a7zcp; 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 S1731087AbgG2Ckn (ORCPT + 99 others); Tue, 28 Jul 2020 22:40:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:53663 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730407AbgG2Ckn (ORCPT ); Tue, 28 Jul 2020 22:40:43 -0400 X-UUID: d0e9ccca0dd34c9398f8429e711107a5-20200729 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=bsmSl6GhvNafW+/QxrJVytLlWNDF54Z01VPoq2J5LuA=; b=b8+a7zcpU/1y3tgBJKc203MtEZGFdOe7ADIeUvjKRASg9p5lbb8SRMfSP7rEukGyFjhNnN1fdgpCwXhnHA5v7DO0Bs1o+zi9y5mDhQtzlkH5IJa49waHaGUv6+SKG+9LPR8ga+xZoDIOr3nm5LSozKbgofO9dcj/GYxVbCZ0XTg=; X-UUID: d0e9ccca0dd34c9398f8429e711107a5-20200729 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1933251817; Wed, 29 Jul 2020 10:40:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Jul 2020 10:40:37 +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; Wed, 29 Jul 2020 10:40:38 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2] scsi: ufs: Fix possible infinite loop in ufshcd_hold Date: Wed, 29 Jul 2020 10:40:37 +0800 Message-ID: <20200729024037.23105-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: 6DB1F27E1A9D8E1C51B5FB23D8BB069EFE1E31E88C79BDBB30C332B2C85C741A2000: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 Ymx5IGludm9rZWQgYmVmb3JlDQp1ZnNoY2Rfc3VzcGVuZCgpIH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