Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3013989pxb; Tue, 12 Jan 2021 04:20:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzSoLDyvCtPYKYgwNCtdj3E3l+1DBJSJYbLNE4i5FAD2ssBdo1TfFq5Pp82Qvi7576Phmo X-Received: by 2002:aa7:cd63:: with SMTP id ca3mr3220914edb.164.1610454054425; Tue, 12 Jan 2021 04:20:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610454054; cv=none; d=google.com; s=arc-20160816; b=GUSOdMSA9FULF+JL4DgKKnoPlCNKQjNq3vh6W6vOLt0Y8ajWQmIbQZTUgpTOymwqSq zJJaDgBhnQO6kQ16Q2JkKJ6pmmPFoUByzc2w+kD7m0NKEK/F4CGf/nQveh2xCSEipHJV 1QBMR0IZ+kNNCY4Eu+0rvKME+h6kM1cFZ300t2tP1jybgAnnLXm+IKriPIaLl8sGgQgI BENa2M0uwMkUNi/G+pK3uGbCt/2sKjR8Y//ls6Elc3fi6/2I/0igKtkilLz/wm2SIU2S yFTEQ0rbpqnaan8CTucnAByaqqLbD7YHovbO3YMmozv9wnNums65O2HDrDY6IzMMMem8 j8gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=ckkDf189o5v2XiYHPid++E4CFViQu5HHJ+upHqoGF+g=; b=n8ufRAoDv2USQRKnt783uT7JaHg/PQcYN+QH2C7AZIZVkobcOIFqwaeoKljFOx+sdX pR+NgRtO91LsEnItAssURiQIDb/rCZRxh9yvrxI0plxgUdtQbb6RqVoyLDmX/ZCk2fm5 WQUl+dzUBkmbjEXRRqprmhkUt+w3ufeE+HSY07EqPZkSmmuM5RKFD2qPHVhqsB79QgHb oi3PBZrG1ZDCHz5ioCGOT9+MaPHe9/Aj+9KrNCmRYIDI1D9r/9YhF9JN+C/xJuffXIZw TDy03AqCt9C8schObdNBMhfRkZbvRR1zJ1ygApSeZVqxawZ9BLLY5qKJ7hkB15+j2QuD gddw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oCdo8jnq; 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 r15si622692ejs.502.2021.01.12.04.20.29; Tue, 12 Jan 2021 04:20:54 -0800 (PST) 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=oCdo8jnq; 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 S2392491AbhALJSE (ORCPT + 99 others); Tue, 12 Jan 2021 04:18:04 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:41366 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2392480AbhALJSC (ORCPT ); Tue, 12 Jan 2021 04:18:02 -0500 X-UUID: 77b7c95bd0c843278d4ca975ac7d15a8-20210112 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=ckkDf189o5v2XiYHPid++E4CFViQu5HHJ+upHqoGF+g=; b=oCdo8jnqUy2M/+Cn+ETmzCAa2mHnb5UxKuVoXW/+gwep10to9PoHwCwvUgjAwLTccJ5VRzasY1t/10A4D+cFO/YeHDFqoegQ2GT9c2o5XkZ8pSmm505YLDU7TwnKkM+AtQpm6FhFK/2r45JNkFQyyr/ab//FfOnabR8/43EgaG4=; X-UUID: 77b7c95bd0c843278d4ca975ac7d15a8-20210112 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1644260711; Tue, 12 Jan 2021 17:17:16 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 12 Jan 2021 17:17:14 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 12 Jan 2021 17:17:14 +0800 Message-ID: <1610443035.17820.9.camel@mtkswgap22> Subject: Re: [PATCH 1/2] scsi: ufs: Fix a possible NULL pointer issue From: Stanley Chu To: Can Guo CC: , , , , , , , , , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Bean Huo , Bart Van Assche , open list Date: Tue, 12 Jan 2021 17:17:15 +0800 In-Reply-To: <6d03cdacda2f757ba0d0f39ce625eaec@codeaurora.org> References: <1609595975-12219-1-git-send-email-cang@codeaurora.org> <1609595975-12219-2-git-send-email-cang@codeaurora.org> <1610433327.17820.5.camel@mtkswgap22> <6d03cdacda2f757ba0d0f39ce625eaec@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQ2FuLA0KDQpPbiBUdWUsIDIwMjEtMDEtMTIgYXQgMTQ6NTIgK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