Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3553166imu; Mon, 17 Dec 2018 23:46:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xctvh+zYzOCOrVpjIlQWw1Jad/u89yFO8gehfQhmY9F0uL9M09YcfE12J1rZpBcGlNI/IW X-Received: by 2002:a17:902:227:: with SMTP id 36mr15685693plc.140.1545119167273; Mon, 17 Dec 2018 23:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545119167; cv=none; d=google.com; s=arc-20160816; b=g89AA5K4T8IoYpUeJrEwmgQPJfiMopvD0apcuMkQS9HStC2tpf0tmGqp0kpY7+4CQH zYj2itS19jOI1XozKMC+mN4kIEvYU8g+86DuWNKIYb7dUdoGqKdnVbhsVH+390yCq5eU ej+/OcFMVjt8LBf7oA4qXOuX6zSV6Jat7f5Of2rbwkKTM2AUeWR4b9zDJTuvWT6Wwx2Q laJp8bMqchuZylKi3uga8V8aYRT9+VwuofsrP17521MHawkBtKddz9kbk9iXkEXQsg+3 Ca/JVqntpi8kDFUx6a9SgA4cEtmDlbXNM0pfEAPyqBBLdsXCFxAVSHCEkMF+qh39DBRb 5EuQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DAlxm09N2oVSt9AgOUESQV2aTWWYj1F4Ij2iXHDSyNs=; b=qXwPhiSRB11voimLpvXR8ULeSlBdnCn1t0KMrz8/+J7Uf6RWLz06/ueVaGUDm0oX/K 7VwOPytrm9bC22VO7WZe1FsU+FBlLcmeuVlgPAxPxJdl/7CcYK0+w4dFxysClEKyR4JO AuGhcQnyhgHQWoWAYg4lj1GOECkqYcBJSUNmCHzq3kgI4TIQV5F/PQ+gm7PPwh1wJfRL c8zNJmjvSezmMtnJSWeusFxgydfZb8u/DpvYZazLfGbk5CcqpQkkDqUolaQANOyPheDP TkYQKP7NTY8cKDnWQ8pgm4aXDhL8lrEkAZPNO8aCDKnZ+1Q6jDTmb/Qa+d7W5uHLXktX qnNQ== 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 a6si12156153pgc.137.2018.12.17.23.45.51; Mon, 17 Dec 2018 23:46:07 -0800 (PST) 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 S1726474AbeLRHot (ORCPT + 99 others); Tue, 18 Dec 2018 02:44:49 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:16588 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726324AbeLRHot (ORCPT ); Tue, 18 Dec 2018 02:44:49 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3E75ADDC55678; Tue, 18 Dec 2018 15:44:45 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Tue, 18 Dec 2018 15:44:42 +0800 Subject: Re: [PATCH v11 6/7] ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set To: Sinan Kaya , CC: Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown , open list References: <20181218025606.32668-1-okaya@kernel.org> <20181218025606.32668-7-okaya@kernel.org> From: Hanjun Guo Message-ID: Date: Tue, 18 Dec 2018 15:44:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20181218025606.32668-7-okaya@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] 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/12/18 10:56, Sinan Kaya wrote: > Remove PCI dependent code out of iort.c when CONFIG_PCI is not defined. > A quick search reveals the following functions: > 1. pci_request_acs() > 2. pci_domain_nr() > 3. pci_is_root_bus() > 4. to_pci_dev() > > Both pci_domain_nr() and pci_is_root_bus() are defined in linux/pci.h. > pci_domain_nr() is a stub function when CONFIG_PCI is not set and > pci_is_root_bus() just returns a reference to a structure member which > is still valid without CONFIG_PCI set. > > to_pci_dev() is a macro that expands to container_of. > > pci_request_acs() is the only code that gets pulled in from drivers/pci/*.c Actually we have pci_for_each_dma_alias() too which is from drivers/pci/search.c without stub function in linux/pci.h, but I didn't get the compile error at link time, I think the compiler just do some optimization to remove the dead code because dev_is_pci() is obvious false. Thanks Hanjun