Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp95793ybi; Thu, 11 Jul 2019 15:27:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhwoQIoMEd6ZsedGMHHuPA5EWMr8G1URAsafjnFcy9Ee+pg2G8BFxK5620YPBucaBx4g8T X-Received: by 2002:a63:f857:: with SMTP id v23mr6854064pgj.228.1562884043016; Thu, 11 Jul 2019 15:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562884043; cv=none; d=google.com; s=arc-20160816; b=VEaRF9V13A627IDKA0slHgbL3zzwwMeyw2sxq32GuxT+8IfPXMw1VhIn5IsIfd7rBN vmQpAujwPMtTJbWrdGevZjB5QsVh7DKNqBZFZDlZZbgvFTOPMOT/a3bPa6BXrYKUqgz0 yZINYN5xt2TyS0hKdEhmZiQFTC3HHwOlptJ7yWsRxnAZico7NOydYxdB88vU95W+HoqL 0Is5pbr/j1/czn/drArRO5vULYBDWlBpDl/ypgfkQAkH3gyzqQWvwawJ7yPtQkAtUFd8 JA2MF5GWbb/6CdS/Tccn4KVui3AezsOrROOZnJrneDFQKE+vxIOJMRS2Bxm2x8iJ059v 52Hg== 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=TcJ39mrTnrQlLHfGMzt7/5Q8HNdDCCU3tKZkCQ828ZU=; b=JCqkNkJoOKQP8oHJ8fMBkMubi/qFLtkzbvZFlW3GI7LfHXiIO7EnPK4T0mYXDER4Mv MzxkfDAPXg4eQBll3r+DqI2JOnKszlF0vwJUykIjZwGo06l7jaw2zR+mZfOAlHzto9nK d9ghyak9tRL6wv9tWV61va8UW1xx/bI1CDC5e5qdxeyBF23pjskjqeXA64/nWiZ9UIyZ aBzgj0sFDnQtkrc/ZQuMUEaX9SNvunKCaPKJ1gH3ZfSycMg5A+nufStnmBUNukXh+uEF h4PHnnp4eWEkxz4usxvU4PZzRhPIaPpVZsyBKzInjcwg5bW/tdDNLfDfqLI3B3waIKeF GecQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="uTWK1/58"; 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 x9si6479323pfi.211.2019.07.11.15.27.00; Thu, 11 Jul 2019 15:27:23 -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="uTWK1/58"; 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 S1729042AbfGKW0a (ORCPT + 99 others); Thu, 11 Jul 2019 18:26:30 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37802 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728946AbfGKW00 (ORCPT ); Thu, 11 Jul 2019 18:26:26 -0400 Received: by mail-io1-f68.google.com with SMTP id q22so16168827iog.4; Thu, 11 Jul 2019 15:26:25 -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=TcJ39mrTnrQlLHfGMzt7/5Q8HNdDCCU3tKZkCQ828ZU=; b=uTWK1/58bH92DE6I5OcM0TOKOi08hvLUxO2zwYDSeu+G0xK0fEO+sl+bl8ufZT8Ofs 2ZtGevaZh+JRkImOpVXgC52RU6KvSoo+rq6gunglaY8azo3+IKe9qlPRdm3vwWSogcCn qkF5+dg1WoZI5cOAVLfVk7mglurCY713h5x8o2jC3635Gl93ytO1f92t5HZTwm0VVide YAJ9vp6/cidQ8WSue7C07T0Py06UDSCJeMLZ/9FL0f2IhXkPyZm5nRaUPPMI+OKg+ykQ 2ONZeDHcY9tXpbQHlLZnOoyFd87LrvnUaAfu+R0wa2llPdIhjSZLyT4hJFagt1vcyRLx qsGA== 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=TcJ39mrTnrQlLHfGMzt7/5Q8HNdDCCU3tKZkCQ828ZU=; b=NuH63WvkJxh03/huaLypWyCIl8e/iMpFT06/MawKUyUd7lDzZeblQLVbRtLMZEfMWy bvV0k9/Fu0Tk/6cZH6iEKOyuBAUt70/toi24YsLFdequfEtatq6Uu1jWw7W2Xtu+EQBw TW2zE8VFzY/ZIjqtMzFKriDoa1OLfNqZ46eIoCTTv3/xHRikoK2L6mO3nzOYdhIzVehv Ff9XwTXBytbG47K9fWZKgwvUceATvzEKPd9HoZWZUfEoe2p6XwVR8AO0at4uLUoqHAqx fQ52ktXL7nkLV3beZkxfn+WPKIGsiZZghWmKGhPziudw0c7tP7nu4HFI34PHn8n4ku0r KKpw== X-Gm-Message-State: APjAAAW1irU2PLAa6hQPGFj0WDjCIPgtJb4GCz97NoGgscTdH6BkKhRm 7JvSunskN+xkzGO4hpNHleZkLBeFPumx0w== X-Received: by 2002:a02:7f15:: with SMTP id r21mr7677881jac.120.1562883985001; Thu, 11 Jul 2019 15:26:25 -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.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:24 -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 10/11] PCI: Move PTM declaration to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:40 -0600 Message-Id: <20190711222341.111556-11-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_enable_ptm() is only called within drivers/pci/. Since declaration does 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 | 3 +++ include/linux/pci.h | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 74249c31325c..95bca00ea85a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -547,8 +547,11 @@ static inline void pcie_ecrc_get_policy(char *str) { } #ifdef CONFIG_PCIE_PTM void pci_ptm_init(struct pci_dev *dev); +int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); #else static inline void pci_ptm_init(struct pci_dev *dev) { } +static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) +{ return -EINVAL; } #endif struct pci_dev_reset_methods { diff --git a/include/linux/pci.h b/include/linux/pci.h index 8fbe3471e8f0..ea4dfb6b6693 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1503,13 +1503,6 @@ static inline bool pci_aer_available(void) { return false; } bool pci_ats_disabled(void); -#ifdef CONFIG_PCIE_PTM -int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); -#else -static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) -{ return -EINVAL; } -#endif - void pci_cfg_access_lock(struct pci_dev *dev); bool pci_cfg_access_trylock(struct pci_dev *dev); void pci_cfg_access_unlock(struct pci_dev *dev); -- 2.20.1