Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp654191imm; Thu, 31 May 2018 07:10:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQr4e4QSlkU7mx/Ww9RJYRScXRl5SIh4ptD4t2cwUTYxJnEDqsMjUH4zUUJ8/jxE3z1ZmK X-Received: by 2002:a17:902:8217:: with SMTP id x23-v6mr7082075pln.380.1527775859190; Thu, 31 May 2018 07:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527775859; cv=none; d=google.com; s=arc-20160816; b=yzKIYgZ7MihVN6GhHaWh3g4G+/9Lr4ZPXrOsuraBtMIKpJ1U2fwCjpU5SPzIX91Dfb dRGbulSVcrqj7ZjUZSU1bY46E4Cespsw0xNYQRiGKv+EeGsuHfO4Ok2U6kIDEtgTkpJd 6oOBXFSzmVpAGlc7pC7ngedawuMwDaZsti0hWFLiBrhqk1VNyVhhgN+yIXhmJc5ty9Gt ImOHKkgGWD4FrhL8V5vmGG7was/+uVg6raRjL+M0dw4rX7PZdpMuZjR67TqhSSLUxqH+ gWwPpD/CIMDXibgsBj6u5VJUewGj5T5XdRv0RmlwHwjeMDwv8coVsCoJVHRXCW/+TbHO Qb+Q== 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=XzpeO513K0bcCXQJ1uz9Ec9tf5wyUUMHV1mAGZ6XPsk=; b=mE9SfFFoiS5Av659fCiYFi1Lra01sGVajnK/ZclqLr+zAjMnFpNvKVsagS/Ybwq0nC dZTFcCsmQeiWncwAJOWGznjoKdP4ZNNzYctXcOBq7HO/n/bySPaYWlFycsWBik0Ytiv6 nkpA8m9nCkPXSjZW+9xsn8ctcCHckIVmEgyhPLOdklgL/rSUVrmZgbVwXrZEGkI4r+VV /4qbIQwmmAEUr9g/5+2z5WWb5jSHnSJeYX8aTb1aZJYk0QS3dLh+JOWQc8EBx2rrW85m 8f0vKSjUkUAlTA32P9m3W5JoeRqTI/cSpYMKDV3VNtWsE1Yaqn7rphlqmhgbM51ZHHfs liKQ== 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 r28-v6si10781944pfe.168.2018.05.31.07.10.45; Thu, 31 May 2018 07:10:59 -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 S1755381AbeEaOKC (ORCPT + 99 others); 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 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B7B38F093210F; Thu, 31 May 2018 22:09:55 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.382.0; Thu, 31 May 2018 22:09:51 +0800 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 Precedence: bulk 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; >