Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10416665ybi; Wed, 24 Jul 2019 22:50:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/dspc9IiKuIQO37yUmaCj9QvtvWTODpq0eeO1aK3bb178F5rP4ikTRrSs0l76uM2riOyi X-Received: by 2002:a63:4e60:: with SMTP id o32mr86212294pgl.68.1564033832469; Wed, 24 Jul 2019 22:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033832; cv=none; d=google.com; s=arc-20160816; b=PG9bR9dCiOL5M0MiLBy16N5BT9ZYftrENBvOUqjAWy8FiVa6D96OsgWvuK+qWO6Kxw ibWAmQCHRha53xdLhqPY9R0HxlRhYv+XJpXLN1VteL8+eHHOWY/Ej/ZknfvyuZPqc0r9 59uVQ6eocznzT85UgK+JK+SzL0JTUN/Joe+M/YDjXzxiNau1HoN8Bqprs/z6RQvJpEkU ACcyc7Ehjr8RFwnIzAzxg8GaTEATfA9TSQfBGBDKO27tDf/nGdcrEOc0pC32UwYo4d5o tGGDIk2rqFHEu1LgcYOwJJm1nllfFsihRafm10Nw1+/cqo98tmplSM1r2IoF7tRmtkZR v1RA== 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=qNiVS6KaY4NBAE+rZSVHlFmLJSQHz8WYKfYsVUbOMCM=; b=ZbAjCjSI8Y1kufAb+PERUs30ffUTSQ9RhWavhUVoO2nAWnImqqhrNbAkRo4fCNeuOq 7JByYZ1S3HbggKzR7d4i0mLhNM4iGQkPoDQ4ydHFziNMUHdn5CK4I410a9WxQmWtcGyn jnlKbI9AlP9pfgQO65tInmLd65pbamhdo9OfFSeuHWM76DoX9mGFAeY9s4WOAXT7wMxi kxPVvqCJWOSKew3M10yu9S8l5VouWOZCrdtRVSgX3T0ocyzfAV0jypbamMssgebnBlRX AgQKOOD7LeeuAbhW83dIYX6zNs/PcZ94yDzv7Bpfqo26tOlD5MHAbVL74YNT/vXHtq7v 9WlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W25R1WYe; 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 z12si9760977pfc.99.2019.07.24.22.50.17; Wed, 24 Jul 2019 22:50:32 -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=W25R1WYe; 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 S2388782AbfGXXji (ORCPT + 99 others); Wed, 24 Jul 2019 19:39:38 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:45974 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388699AbfGXXjc (ORCPT ); Wed, 24 Jul 2019 19:39:32 -0400 Received: by mail-io1-f68.google.com with SMTP id g20so93285072ioc.12; Wed, 24 Jul 2019 16:39:31 -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=qNiVS6KaY4NBAE+rZSVHlFmLJSQHz8WYKfYsVUbOMCM=; b=W25R1WYezOB68dc9K78bpE8OES+u0aPNWsLm0Z/eSuGSyd0/XPQymoibZ4/BQIpcIq Eq3IrnM+oHw+Eh6OmLLt8+VcxYmuU7nbhOPftOr6CUCfGsWZq9kd6MU+KuDYSCr2lTKO 97W3ST3Ccjp0sPANSoCmnLWC6kpqmG6IaQnHr44maxuHGR4ryk1xyGo+Wk+1lOSkxNXL UDih0DZ1Xyp4+xltmYYSvYQOzDSm2m3cCP3Fp/o2ZyIuEcCwIs4aPI8LYmnnxHyEVJuP U6Lhd/1lq9BN0VuDudKaKlZrFQ3hgzTlZR7WlT/+jUemIuKhKe2DvVx9o8boR7KYii2E GmiA== 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=qNiVS6KaY4NBAE+rZSVHlFmLJSQHz8WYKfYsVUbOMCM=; b=tRUDZw7IH4RPePqk0vUJzEV5DE1RnKJ+zOD3cFPpQTpvnRtM6f3ycigE7I+htk5nd7 TO+ubNTxfxFZCY9rckwt0GDaRhwtP/8pJXiUM1xOfg07zGnVYJcE0HTXUYhzOerpfqcd sdR6j2XhwPIdNERaeN/WMphQZhtjWyAqwjKWbhbd0qLyKMUx7OEKJjOW4Dw+avd2+PQT JzKwh4+vnONiT8U9iNUvKibnIRRnlzItdhP+bsUTpmAguFoAfugO9XcjGNZ/sWxSppN6 VwVmOkP0hHlyPr6WENuvK1FutAL9sZzcYXZnBgm1rDRo+6kGT4V6Iqhnkwu0f3qgpH/l TX7A== X-Gm-Message-State: APjAAAX2nmFxT7ywTX30oAGtjL4IrVxTvvVI9j2A52L9yHnsnPAOAFQM 4Jeqlwk+htMzMq8vdDyMd4o= X-Received: by 2002:a6b:6505:: with SMTP id z5mr76156608iob.295.1564011571550; Wed, 24 Jul 2019 16:39:31 -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.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:30 -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 08/11] PCI: Move pci_ats_init() to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:45 -0600 Message-Id: <20190724233848.73327-9-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_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 feec29853a44..7c0488b64faf 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -439,11 +439,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 c6a25c32a49a..5760e19cb625 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1766,13 +1766,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