Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10416742ybi; Wed, 24 Jul 2019 22:50:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCpNUebPwYhvhkEIK3aeO2/2Tw2/IqWn1Yaq9vFg8sYz/s796Ir4Yp7GcoMHkYI5ZOD7lw X-Received: by 2002:aa7:96a4:: with SMTP id g4mr15504419pfk.193.1564033838952; Wed, 24 Jul 2019 22:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033838; cv=none; d=google.com; s=arc-20160816; b=o294Dgn/cE1RDzV98lv80YlgnrQTQHDUtqiTxE202PhuLS72DqBPw0jkSdjMG4yhUs UCoHf7LuIxLJJsqVY/unyf1KxFa9xtdycxrZNQK5uY6NzmkExvaL+lOf3+mfz1jvLuXZ YriRVyaOpXcg4QHdKcfZTE4VnZK6cRUd//X+O0J1z8c22JPppTQyuTpowGvQaDHnNTYo 6DAp4M7KbcIIMNy7qc1HL0xD+ev9rMAAvFEDYEkoiDJfyZsNNuO6k7jj0Epp4VnjsFrt wsLQZLbN8YwCJ1RZxPoNzmqqZaeEUZQWbnbvNzU8CbvoPUXnY38Mu4lKko0GxZjJhg3M DRWg== 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=PMejsUr9K8/BuCWQx6vgffGUCxlWl6FVyv+Mq0t5PyY=; b=H7mvMAgBShqlvyWFAaEizoZBEisvKIh9XPgDkYQQ8FN4keIXvg7oocvqu991FCnNNc XxM6zTMWlznHTMgu3gIBGpCTcHcv+8b+f8Kvx8tz4pU3DWS4SHVKVnhnBj+KB+axTkFR 0V272idXgbYgwnIHRF5DyIj3fSpjdXZXqx1iQmKcECNXb4a358U/+N1H95Z7G1SM3t3q bEY2QTCJzDwboj0v1Vc1Vr2XJWWrcxxmyFwhoctfxAYPGou4/0SiM3R/eegVw9Rl7B+w 9HE6reZEyhb8q12ihfqt8ybEQx5osjXStDBeSjGwjgqVPBTRJp93XUZhyrJi9sL5HTA8 e2sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oALzStox; 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 m6si4672209pgp.423.2019.07.24.22.50.22; Wed, 24 Jul 2019 22:50:38 -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=oALzStox; 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 S1729811AbfGXXjx (ORCPT + 99 others); Wed, 24 Jul 2019 19:39:53 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:44081 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388743AbfGXXjf (ORCPT ); Wed, 24 Jul 2019 19:39:35 -0400 Received: by mail-io1-f67.google.com with SMTP id s7so93183522iob.11; Wed, 24 Jul 2019 16:39:35 -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=PMejsUr9K8/BuCWQx6vgffGUCxlWl6FVyv+Mq0t5PyY=; b=oALzStoxBDoSIlWbN6YPeEuD/T0n8vprngDcpk7Wdx026sDFtVNYqA0fCLFfy8XRW0 5YCmBMinTsiPjB5jXmUFg/uJIbptOD+pMSOeyRUN9UM6sXpY6+7RYh4VQkctaUk3caYv rtfcA+4Bb/VuD3oRTg6XxmWR2iv/MZd3i8kkzFOVoBZGQLg3iN3O5jqeYEB1D7gYmVUt WgDYXv4HBPR8WTTCeq5PTeceotDsx6TQUq5T1RHWDtJl2l5fjkISAjHsIVAxdXBX6SWd HgAFuWI8KWDuRVh7DQNfSNcwghqvDUmtrAIYHx0CL4n02dilRSLe1ph/56ncBpOyYtqu JNpA== 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=PMejsUr9K8/BuCWQx6vgffGUCxlWl6FVyv+Mq0t5PyY=; b=VllsBGc1fU1rEt4MRx4A9LKnyxKSdY6sWRTJLaL6m0QjpGRvTTY1BKUl2uP6X2f7jp H/CQNw48E6VK/1uFjFvmq0i35msYatfSVptn0pWMXbOtm81eMRFY9DKNg5orqkYztzuG fGOkAzqjO6BSHNa0ldwsNykE3WgsASY5dq9jrk9celtT5dLn7If2aCAMiOmd99u3U1w4 rMEasuYTY8mOxD+R0EDeMsqS5AK98AbSScRAR/jh21kmv0zt4pStFAVGKDAXefv9p6/H JfbajGaqrH46CU3qmmNjqn1n7rj6giJkzjLNsNcWJpTqXz8DpdpUo5+vEqBf1rh+3Dh7 Oo5g== X-Gm-Message-State: APjAAAWsSt8XDNFYJFjsuIe+Uz4UQd/jDNKOZMTMC+1S5yPU5dm8x1z6 ysmd6I0ISpfvaTav2vb4hkw= X-Received: by 2002:a05:6602:2183:: with SMTP id b3mr67144703iob.249.1564011574860; Wed, 24 Jul 2019 16:39:34 -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 b14sm51612959iod.33.2019.07.24.16.39.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:34 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 10/11] PCI: Move PTM declaration to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:47 -0600 Message-Id: <20190724233848.73327-11-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-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 5e5ce04bda59..6cdc3500de15 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -551,8 +551,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 5dd4abeef8b0..a483b7598059 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1561,13 +1561,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