Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1499119ybb; Thu, 2 Apr 2020 01:52:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKMh+/zD4+eu1vY5CTAnnvFB6QuLXjmeiT5u6AWgwsM3JblC4vuEoSD66IxtgH327LYACHk X-Received: by 2002:aca:ecd0:: with SMTP id k199mr1494539oih.60.1585817577935; Thu, 02 Apr 2020 01:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585817577; cv=none; d=google.com; s=arc-20160816; b=FF5+N6IGc6c+rA1/A4YVFc86GYZVmUcKVl4BzM1Sd2tCzmWVkivuFzqtwj53bRKEzT 1QBdR8Zi/WDLYLTiXjWNr/QSWk0Dwlgs2aC/VzEN+dxwxzlg6dq0wXMrqWeFhrZZLLVm GuRSZ5t72Q+W6cLsKvlKye0l1Mq0hicOyY/Z13qN3ddKSnItzsGiGkmIPYJEoA9ru+PV 1uqjcziUIJepVQhP+5xdm+Zwr/LhbT2BU7SMSDGnMuFTtS65c+1DOscdBdbIVFGlWi0v Af/RtluYsZ9LSwtAtxIulb1sXto8Ge4Nkd72WN13ERX4bLO6ZoG1E/bnYCMfD/riJr5w AXEQ== 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; bh=0jtZPvV6mdMsYvcjgbq4mS9OENc9LEGZA6ZnP7pwMVI=; b=pMCLOYIx/og+nrve4k8RkOqIF/rXG8PNuRnhObUVkNDl6SffoM0KGZMtA2pNliaY5f 1Imt70t7uMJgMQ9BrzBtxG1BkoTRJmVdAkEWRSIS/8KWaE/Y3s/G4qsW0zZNKtBj1T3L 1aSFZhMrBPbDfHFUWP9tG3SpF2HfdAhRY/MAUsYjdewfl3iwhHRvyRhHnpQZocdlv1lp 4yRuDw0S2jhvHEemdGdgtuz7QxHDS03EadIzS7gYMbl7e4qGJPSKb2AwQGBDiuRmLXsm 8MeZ9usvYjw+SU7zOfTPTOHS7rDTEYRcg3PCSM4C6OQGtWjqDqxvDRJZYf49bzgJA1y6 Fruw== 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 v6si2114435oif.149.2020.04.02.01.52.45; Thu, 02 Apr 2020 01:52:57 -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 S2387849AbgDBIvr (ORCPT + 99 others); Thu, 2 Apr 2020 04:51:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12603 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387715AbgDBIvq (ORCPT ); Thu, 2 Apr 2020 04:51:46 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8E3031276CA38C65E99B; Thu, 2 Apr 2020 16:51:42 +0800 (CST) Received: from [127.0.0.1] (10.173.223.234) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Apr 2020 16:51:34 +0800 Subject: Re: [PATCH] scsi: hisi_sas: Fix build error without SATA_HOST To: John Garry , , , References: <20200402063021.34672-1-yuehaibing@huawei.com> <855fee9e-ae2d-ca70-8630-df27a273e6f3@huawei.com> CC: , , "Bartlomiej Zolnierkiewicz" , From: Yuehaibing Message-ID: Date: Thu, 2 Apr 2020 16:51:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <855fee9e-ae2d-ca70-8630-df27a273e6f3@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.223.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/2 15:30, John Garry wrote: > On 02/04/2020 07:30, YueHaibing wrote: > > + > >> If SATA_HOST is n, build fails: >> >> drivers/scsi/hisi_sas/hisi_sas_main.o: In function `hisi_sas_fill_ata_reset_cmd': >> hisi_sas_main.c:(.text+0x2500): undefined reference to `ata_tf_to_fis' >> >> Select SATA_HOST to fix this. >> >> Reported-by: Hulk Robot >> Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk") > > That's not right. SATA_HOST was only introduced recently in the ATA code. It would fix those kconfig changes. Ok, thanks > >> Signed-off-by: YueHaibing >> --- >> drivers/scsi/hisi_sas/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig >> index 90a17452a50d..13ed9073fc72 100644 >> --- a/drivers/scsi/hisi_sas/Kconfig >> +++ b/drivers/scsi/hisi_sas/Kconfig >> @@ -6,6 +6,7 @@ config SCSI_HISI_SAS >> select SCSI_SAS_LIBSAS >> select BLK_DEV_INTEGRITY >> depends on ATA >> + select SATA_HOST > > That does not feel right. > > SCSI_HISI_SAS depends on ATA, but SATA_HOST also depends on ATA, so it seems better to just depend on SATA_HOST (and omit explicit ATA dependency), rather than select it. Depends on SATA_HOST will result int this: scripts/kconfig/mconf Kconfig drivers/scsi/hisi_sas/Kconfig:2:error: recursive dependency detected! drivers/scsi/hisi_sas/Kconfig:2: symbol SCSI_HISI_SAS depends on SATA_HOST drivers/ata/Kconfig:37: symbol SATA_HOST is selected by SCSI_SAS_ATA drivers/scsi/libsas/Kconfig:18: symbol SCSI_SAS_ATA depends on SCSI_SAS_LIBSAS drivers/scsi/libsas/Kconfig:9: symbol SCSI_SAS_LIBSAS is selected by SCSI_HISI_SAS For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" All users of SATA_HOST have the 'select' statement, so we should do the same here. > > Thanks, > John > > . >