Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp9320imm; Thu, 31 May 2018 17:16:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK+bruGN7V2bjDY2Rnt34iox6bBW5e+eayClj8js5XJWBxOjIXa31w650Mo4m+qYx4tkYx7 X-Received: by 2002:a17:902:a702:: with SMTP id w2-v6mr8828069plq.8.1527812202862; Thu, 31 May 2018 17:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527812202; cv=none; d=google.com; s=arc-20160816; b=b9ab2zOJsV1ggX59Pktrss0/VBohsHJO+LRSG9DTquBV8uz6tjO4H5x6gZSTKzRDB0 yYIPySNj7huBj+7lJi+sc5HLSy3D1cuWdpv6ZKWgsn4/lipwvqPBoPlwu6JbDaoK0uu+ q0ESpHSIZKR9Iiu0aI4ktmPy39cDzE6xG1R7ISSQj9zyrKBHdsd2RxZuWdGBdyaTQIQa UmZfDT3u1wI/wpRMLmRTCsnQ7KI2o+wCMJC8ZSVgu5xDylaM8zPSAVNaR1lHS3mp8174 jtJlOhCRPhKk7Nr4wtsYoVE/Tr/U178Sqonbzcm4iEdPF65LbU5NnpT8kxbAHrhoVyEo tG7g== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=8o42wwyrrCrChA27z8ewNhFC13iNwsESu01rpuYcsIc=; b=hOE0pL5rhnfZOPYqqLZr635o9DvQ/8xArFQcUonZ3g7wP1dDmrxgYGFoHIU0tVuaAv NZMHzhn7n+3s2KLM5/ZUo5TjKG87QB/x3s/gsr68Ss8eIZ6qW8yZULSILnLK/A5rgJ/Q wxKlo/HTbcLvJq6mvgd6LGTW4vWunsKjxoln3Q+W5FpMSBTZrQbYrNm4R34wpgnRLHSP P48zQsNjaLrOw7ePJyRPv+7AgerOAsrKiUeHqwhEu/dQPOv+RpadJL7fkBz84Qpjzv64 bO0st9osAuhZZDqnZUvPcp+fJ+bJZCVyiYV8wuOE5BMRvnrA5W9nQiEXD1eo0CWBhMPA w9mA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9-v6si36061179plo.568.2018.05.31.17.16.27; Thu, 31 May 2018 17:16:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751012AbeFAAQC (ORCPT + 99 others); Thu, 31 May 2018 20:16:02 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8243 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750796AbeFAAQB (ORCPT ); Thu, 31 May 2018 20:16:01 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7CBB45E2BFC3C; Fri, 1 Jun 2018 08:15:48 +0800 (CST) Received: from [127.0.0.1] (10.177.96.203) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Fri, 1 Jun 2018 08:15:43 +0800 Subject: Re: [PATCH 2/8] scsi: libsas: check the lldd callback correctly To: John Garry , , References: <20180529022309.21071-1-yanaijie@huawei.com> <20180529022309.21071-3-yanaijie@huawei.com> CC: , , , , , , , , , , , , Ewan Milne , Tomas Henzl From: Jason Yan Message-ID: <5B10902E.5080503@huawei.com> Date: Fri, 1 Jun 2018 08:15:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.203] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/5/31 22:09, John Garry wrote: > On 29/05/2018 03:23, Jason Yan wrote: >> We are using lldd_port_deformed so we'd better check if >> lldd_port_deformed >> is NULL. >> >> Signed-off-by: Jason Yan >> CC: John Garry >> CC: Johannes Thumshirn >> CC: Ewan Milne >> CC: Christoph Hellwig >> CC: Tomas Henzl >> CC: Dan Williams >> CC: Hannes Reinecke >> --- >> drivers/scsi/libsas/sas_discover.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/scsi/libsas/sas_discover.c >> b/drivers/scsi/libsas/sas_discover.c >> index a0fa7ef3a071..354f6db5bb66 100644 >> --- a/drivers/scsi/libsas/sas_discover.c >> +++ b/drivers/scsi/libsas/sas_discover.c >> @@ -260,7 +260,7 @@ static void sas_suspend_devices(struct work_struct >> *work) >> * phy_list is not being mutated >> */ >> list_for_each_entry(phy, &port->phy_list, port_phy_el) { >> - if (si->dft->lldd_port_formed) >> + if (si->dft->lldd_port_deformed) > > If you do make this change, then you can remove > hisi_sas_port_deformed(), as it is just a stub to avoid a jump to NULL > from above. > OK, I will remove it. >> si->dft->lldd_port_deformed(phy); >> phy->suspended = 1; >> port->suspended = 1; >> > > > > . >