Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1282136imm; Fri, 8 Jun 2018 13:13:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJFaGQaAtNNT+rEwum21hCm6wqJ157U3ldARw7zePi8ZZRkIig6sf4hqrXA41zqI9wMqy/K X-Received: by 2002:a63:7b1e:: with SMTP id w30-v6mr6224282pgc.402.1528488828007; Fri, 08 Jun 2018 13:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528488827; cv=none; d=google.com; s=arc-20160816; b=qpo1a/RcBsDKjgXJR8WLA18BhkyBaFJzPNTXKiEgThooHFo5peF2ZCLDmI0fyYN28A Zp7TSsNjvCT+9wJYfZdq6yUP0lFS7kRfR10iKZwh9HMIS/9Gfb1+3YwCuAnHK2OOV5Wj 7wrVnyoSw6iJxTFohuI/Ogv9YzERTZSuX6tb9sahpm0cnwmGwwR77HERAPM+aVfvCVto ZKuCaHig0r8aslKNoo0pzS3sGRphlbzd+BROo6DFWoPLJ4fE30S5r7RqdIcWpmvGbBM6 fDOUi1YLvVxUEPMLy5qpUiE+w0Jq18pDqSxoz6XiE9pjNtfD9xjVGVukN41bWDk0+o3g dr5w== 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 :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:arc-authentication-results; bh=C5ge6fHD7KhDlNhqDLARR49fH9wgClFePgny3Ak6qys=; b=jcK3WfX8Of4BQuTKPbvfRryhfgHgiWvcfpm5MHmByrn7+VIMe9+tus0st7k3SIjIdJ zSQMHkgKh5haegdiknY461oJg5gYQw6z/UiZfvqoKigaOmISmrCLa86tyWeNSLO8cAMX unjU2GMS5P1Kpvnd8IldmSM+K8GausPvFBISt6cjcLciDYaZJcQLOTvT9kCfIvHUrqOe 812QoPfm2qZGbXmGzAEpi28JMWovyo38iyHYlYr3/v8UG8v19EBVvxFBhM+9V+hOTkmi bkDmWvL9Ki23tB9Olj46YYMhJf5H8488/nCDI4DEJnWOkro0xa+gH0j/z1/J17XJMcNu HNIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SELfRmgP; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si13202618pff.154.2018.06.08.13.13.33; Fri, 08 Jun 2018 13:13:47 -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=@kernel.org header.s=default header.b=SELfRmgP; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932136AbeFHUMr (ORCPT + 99 others); Fri, 8 Jun 2018 16:12:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:51668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbeFHUMp (ORCPT ); Fri, 8 Jun 2018 16:12:45 -0400 Received: from localhost (unknown [150.199.191.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E66C206B7; Fri, 8 Jun 2018 20:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528488765; bh=txj0OxAxq8/gUPIRZ4J0c7+bbE9UNmQJsMWruGQFie0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=SELfRmgP8bBYX0YoQkvcxbdHBwKObfD5tCwhCOM/gnj21QZXE7njO/tkGAc64Rog6 NJipizx65B0vrhlndjVzYzY7PfHpzE4Mbf/zFyEC9scbqKRZQRmrzsNl3Ont1eNvXY m+kNrySgcbOlW3r4niBTPe7CwugKro07K43D1w9I= Subject: [PATCH v1 7/9] PCI/portdrv: Move private definitions to portdrv_pci.c From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Oza Pawandeep , linux-kernel@vger.kernel.org Date: Fri, 08 Jun 2018 15:12:44 -0500 Message-ID: <152848876423.14051.16979792429494986407.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <152848853199.14051.12670957565366345798.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152848853199.14051.12670957565366345798.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas Move private definitions to portdrv_pci.c. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/portdrv.h | 9 --------- drivers/pci/pcie/portdrv_pci.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index ab3631a61347..20344e1bf247 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h @@ -69,15 +69,6 @@ struct pcie_port_service_driver { int pcie_port_service_register(struct pcie_port_service_driver *new); void pcie_port_service_unregister(struct pcie_port_service_driver *new); -/* - * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must - * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI - * supports a maximum of 32 vectors per function. - */ -#define PCIE_PORT_MAX_MSI_ENTRIES 32 - -#define get_descriptor_id(type, service) (((type - 4) << 8) | service) - extern struct bus_type pcie_port_bus_type; int __must_check pcie_port_bus_register(void); void pcie_port_bus_unregister(void); diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 1375e91c268f..76ad08e97a6f 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -363,6 +363,13 @@ static int pcie_message_numbers(struct pci_dev *dev, int mask, return nvec; } +/* + * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must + * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI + * supports a maximum of 32 vectors per function. + */ +#define PCIE_PORT_MAX_MSI_ENTRIES 32 + /** * pcie_port_enable_irq_vec - try to set up MSI-X or MSI as interrupt mode * for given port @@ -528,6 +535,8 @@ static int get_port_device_capability(struct pci_dev *dev) return services; } +#define get_descriptor_id(type, service) (((type - 4) << 8) | service) + /** * pcie_device_init - allocate and initialize PCI Express port service device * @pdev: PCI Express port to associate the service device with