Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp96378ybi; Thu, 11 Jul 2019 15:28:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwilEsZAMGPkof0lE8jPfcHM8ppOS68Pb3vQsiAnTQkkdGiHlWwX+PN+TWCE2uEHayoRChx X-Received: by 2002:a17:902:9349:: with SMTP id g9mr7155234plp.262.1562884093770; Thu, 11 Jul 2019 15:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562884093; cv=none; d=google.com; s=arc-20160816; b=jB8rigvKgsgdg3hfh3GLCOHPDOuRFLHujsX6WjD69aY7W1eyFvwO5SwYswAB9EkWo0 eEu4qUBzHJUA7x5xkMXTMr5VXtuxEhr2CNfoQ5WvN99wpni/SoI9/oilyYb1eV+JSKHy hyAnJPyhPJlULmfXEgbtp3MA0qjUcpBEwnBwUuEXyiAG7VzD9cKy90DANgSvs91P8Cjw SD/PNjG8o5vYyI+80vqUa8Je4uj52d77ob1AQ9kGID1ZfXzZiDqW97mJpr0nIPGLMc57 zNuPc36GUhyQunlAyRYBjmajlkNuJS5uxTTHBdrk7K3nln+Hk6EeWFxHIpw6kMYEy6kE 8pzA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tLtPErnr+10mn/XsYOjDK3yHjlI3l+cv/3zQtxd52ew=; b=PtyvOhvv5y30PcDBP0dnqPpBLrntlowx83V8/zNry7rIjgGhQuR9NbTTma/CNU+inO qmeVXnvYnpaXywgctEzJdDtb6rEpt0Y3VIHc4OVcpo/aEXLGGDP0h8svEYF4NxWKzO25 YEXURIxtSRLO0niJJ3GgarGyCM4uF/cnHHTO8gr2/X5lsI2IxGlJmOSE2ZVYooqMX4gK FgcSLocZUwrZqscfwCQrVFsM/beVKYmMI73UNOEdSlk6VgfDIo/UrIhVqV1TN37mAa5R 7rpmu9IrGKNF7NHa0o60xBiCrUdEOs5s1e4Xs5nxYSks0ACAa7WDwBUNL6whasg4Z1JU 24sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vAHxja5Y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si5763026plb.35.2019.07.11.15.27.58; Thu, 11 Jul 2019 15:28:13 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vAHxja5Y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729094AbfGKW0k (ORCPT + 99 others); Thu, 11 Jul 2019 18:26:40 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:36818 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbfGKW0X (ORCPT ); Thu, 11 Jul 2019 18:26:23 -0400 Received: by mail-io1-f67.google.com with SMTP id o9so16211972iom.3; Thu, 11 Jul 2019 15:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tLtPErnr+10mn/XsYOjDK3yHjlI3l+cv/3zQtxd52ew=; b=vAHxja5YQ/17QpJhY0YbiqGLiWC3QUVwEZWVnncNW2rXsmHpTwA5W4kZ/8xD9OnZ0T N4s07/uneatBdzihYNtKyAGLYsscPNce7EI5lYNYtQyIxyVKJ1LTnixBAcbJGQyvYD3D LOCs+MMXw39TkG6ckB4GBcvSdOQyczUQMA6vRWo+3ZkLAFWnspR/bPkDAMyDfIjxp6Ny AMBD1HcjogPFyRx1YeDyFTtThhI3m2phXwhtZhXKwUb3Rf0bcAy5i/wMdaT/naBqorzg o81T+zHv6piOZSTUvzOiAGTOwhS0rpoWwOBUpvZhe1r0NbHlLVGHXOx0kVpKphHot4Nz NyRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tLtPErnr+10mn/XsYOjDK3yHjlI3l+cv/3zQtxd52ew=; b=Mly4JK7LaeFSUa/80c8/FyRHfa5gOhvUM5pYnnm1JlVsJvb7aAxxDCSfywkxFSbsro k0sUtcTS5+6yBesfSFhCEQVhOqPXR+PYIoLYYq8cZLxpfPjWmUkr0UCPtNPcG+TmZURO rfNmjlQVBXehcxarfOARtgnAxEX/hiA5H/e9YJvHirpW6S96HMChA0BsAYfwggqhODu1 u09ZzUqdoge9fIwazOtexo/7jGfAfra0PRwlaD3Tnk0txg42Ze/p1ukGpiX5Dv9YpxDa KgFso7uGC2h3mrIsAdr2FI0b2RGOyl8wYN1ZVnDwiOwZp+XRsUeNa+/MYhLKZV2b5H8U kFDw== X-Gm-Message-State: APjAAAXNeIPPlu9SBJ4Q/mfiZfaNDFPL/TGOeGhCwqAmX/HuRHI7dC9f DdlVeqoUdQ8swdnHxD8SJe9YNEDlwMOtrQ== X-Received: by 2002:a02:c487:: with SMTP id t7mr7318479jam.99.1562883981680; Thu, 11 Jul 2019 15:26:21 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id s2sm4478982ioj.8.2019.07.11.15.26.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:21 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 08/11] PCI: Move pci_ats_init() to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:38 -0600 Message-Id: <20190711222341.111556-9-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_ats_init() is only called with drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 7 ++++--- include/linux/pci.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 59321488da03..bc677e97a262 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -436,11 +436,12 @@ static inline void pci_restore_dpc_state(struct pci_dev *dev) {} #endif #ifdef CONFIG_PCI_ATS +/* Address Translation Service */ +void pci_ats_init(struct pci_dev *dev); void pci_restore_ats_state(struct pci_dev *dev); #else -static inline void pci_restore_ats_state(struct pci_dev *dev) -{ -} +static inline void pci_ats_init(struct pci_dev *d) { } +static inline void pci_restore_ats_state(struct pci_dev *dev) { } #endif /* CONFIG_PCI_ATS */ #ifdef CONFIG_PCI_IOV diff --git a/include/linux/pci.h b/include/linux/pci.h index 3221d9f61ab4..263c087b95d5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1708,13 +1708,11 @@ static inline bool pci_ats_disabled(void) { return true; } #ifdef CONFIG_PCI_ATS /* Address Translation Service */ -void pci_ats_init(struct pci_dev *dev); int pci_enable_ats(struct pci_dev *dev, int ps); void pci_disable_ats(struct pci_dev *dev); int pci_ats_queue_depth(struct pci_dev *dev); int pci_ats_page_aligned(struct pci_dev *dev); #else -static inline void pci_ats_init(struct pci_dev *d) { } static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } static inline void pci_disable_ats(struct pci_dev *d) { } static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } -- 2.20.1