Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1594529pxb; Mon, 12 Apr 2021 01:46:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx197HTqyubn1K0UvACG6/etN5G0BI0EwpfO6+5hIlYbD3qHW4XjEYdEhgsZzc/QV27y8D9 X-Received: by 2002:a63:6ec1:: with SMTP id j184mr25606330pgc.364.1618217200394; Mon, 12 Apr 2021 01:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618217200; cv=none; d=google.com; s=arc-20160816; b=WCTczyckRbCn9DzWN1AcpDhGw+sClhIANJFLqDV21CEqmzRsQ15wrPwh+Ckzhno1jf 0RrawYsxMB+c0NxVlKIVdlCBzL/jGoQUUFTeo+Gfi2TjqEOihyTElKD02F+dXZW93JJ8 /BvQIL+QrynWmPUacv62lB6eYjMsNK1XFPp0iluTky8/Gy+cdS8zwUeSMxiyT0ENJcFk d2DYj1ofLfkN6+yfI7fLYz6I3y7KOKl3p0N8wuUgucmGBDGlvBFQKD8umYwUTxTuqwgF k42gRbeSHswNJN4b4ABT/FxzwvR5ArHUCBP22wmPRyIa4V43SlQ8wHizXCtOH/W/twqe eoxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=kBwmmfEhnxnMkwjBfKpRa+OtUqiDVgf+6Uq1v3KjUJM=; b=kk9SamUVE+Avlh7/nLlgqUEgAvzOnz+EFm3ZQElstfGBc08wKgFZN/DqU5VCXm197V Wqk65cBoQGL1Ypw+ISZ7NkqNTG2ZELbYhlh/nu7FozF3GlSV+z26YteLxBcvNxXEYRQV L5ywFwtHLt432S5hAo54/yPwKHve6O+gukSkS41t0hamN0PPftmH/2CXmuc6lnfY4u5c b3N0Bv9oj45XCKSKHDhiYh3quvhdR67S0STgGhbtu5/65JR48sHmCyqtz2zS7pM81LHd YG9F5J9T6zN2VpDWUog25dyQ7Q7dBw6rcM2voxa1fZ6H6xkSpGSwCi78NxLeULynZfOl PfrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 136si15779282pfz.261.2021.04.12.01.46.25; Mon, 12 Apr 2021 01:46:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237664AbhDLIog (ORCPT + 99 others); Mon, 12 Apr 2021 04:44:36 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:2831 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237599AbhDLIoG (ORCPT ); Mon, 12 Apr 2021 04:44:06 -0400 Received: from fraeml705-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FJhsv5GGBz688MV; Mon, 12 Apr 2021 16:36:35 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml705-chm.china.huawei.com (10.206.15.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Mon, 12 Apr 2021 10:43:46 +0200 Received: from localhost (10.47.93.73) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 12 Apr 2021 09:43:45 +0100 Date: Mon, 12 Apr 2021 09:42:19 +0100 From: Jonathan Cameron To: Kunihiko Hayashi CC: Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Marc Zyngier , , , , "Jassi Brar" , Masami Hiramatsu Subject: Re: [PATCH v10 1/3] PCI: portdrv: Add pcie_port_service_get_irq() function Message-ID: <20210412094219.000031ca@Huawei.com> In-Reply-To: <1617985338-19648-2-git-send-email-hayashi.kunihiko@socionext.com> References: <1617985338-19648-1-git-send-email-hayashi.kunihiko@socionext.com> <1617985338-19648-2-git-send-email-hayashi.kunihiko@socionext.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.93.73] X-ClientProxiedBy: lhreml713-chm.china.huawei.com (10.201.108.64) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 10 Apr 2021 01:22:16 +0900 Kunihiko Hayashi wrote: > Add pcie_port_service_get_irq() that returns the virtual IRQ number > for specified portdrv service. Trivial comment inline. > > Cc: Lorenzo Pieralisi > Signed-off-by: Kunihiko Hayashi > Reviewed-by: Rob Herring > Acked-by: Bjorn Helgaas > --- > drivers/pci/pcie/portdrv.h | 1 + > drivers/pci/pcie/portdrv_core.c | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index 2ff5724..628a3de 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -144,4 +144,5 @@ static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {} > #endif /* !CONFIG_PCIE_PME */ > > struct device *pcie_port_find_device(struct pci_dev *dev, u32 service); > +int pcie_port_service_get_irq(struct pci_dev *dev, u32 service); > #endif /* _PORTDRV_H_ */ > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > index e1fed664..b60f0f3 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -477,7 +477,22 @@ struct device *pcie_port_find_device(struct pci_dev *dev, > } > EXPORT_SYMBOL_GPL(pcie_port_find_device); > > +/* /** this is kernel-doc style, so why not mark it as such? > + * pcie_port_service_get_irq - get irq of the service > + * @dev: PCI Express port the service is associated with > + * @service: For the service to find > + * > + * Get IRQ number associated with given service on a pci_dev. > + */ > +int pcie_port_service_get_irq(struct pci_dev *dev, u32 service) > +{ > + struct pcie_device *pciedev; > + > + pciedev = to_pcie_device(pcie_port_find_device(dev, service)); > + > + return pciedev->irq; > +} > + > /** > * pcie_port_device_remove - unregister PCI Express port service devices > * @dev: PCI Express port the service devices to unregister are associated with