From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Yan Subject: Re: [PATCH 2/8] scsi: libsas: check the lldd callback correctly Date: Fri, 1 Jun 2018 08:15:42 +0800 Message-ID: <5B10902E.5080503@huawei.com> References: <20180529022309.21071-1-yanaijie@huawei.com> <20180529022309.21071-3-yanaijie@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: John Garry , martin.petersen@oracle.com, jejb@linux.vnet.ibm.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, zhaohongjiang@huawei.com, hare@suse.com, dan.j.williams@intel.com, jthumshirn@suse.de, hch@lst.de, huangdaode@hisilicon.com, chenxiang66@hisilicon.com, xiexiuqi@huawei.com, tj@kernel.org, miaoxie@huawei.com, Ewan Milne , Tomas Henzl List-Id: linux-scsi@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; >> > > > > . >