From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755389AbeEaOKC (ORCPT ); Thu, 31 May 2018 10:10:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33702 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755287AbeEaOJ7 (ORCPT ); Thu, 31 May 2018 10:09:59 -0400 Subject: Re: [PATCH 2/8] scsi: libsas: check the lldd callback correctly To: Jason Yan , , References: <20180529022309.21071-1-yanaijie@huawei.com> <20180529022309.21071-3-yanaijie@huawei.com> CC: , , , , , , , , , , , , Ewan Milne , Tomas Henzl From: John Garry Message-ID: Date: Thu, 31 May 2018 15:09:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20180529022309.21071-3-yanaijie@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > si->dft->lldd_port_deformed(phy); > phy->suspended = 1; > port->suspended = 1; >