Received: by 10.192.165.148 with SMTP id m20csp1153971imm; Thu, 10 May 2018 06:31:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq6qCqQRaxnUfkQ/ldkfRNYW7rfxFkALWKqj4wGDz+h/aWQ1iBtTToOWz7swQC78YPNXCDF X-Received: by 2002:a62:8105:: with SMTP id t5-v6mr1404827pfd.215.1525959111881; Thu, 10 May 2018 06:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525959111; cv=none; d=google.com; s=arc-20160816; b=UppNRvkdGtEVc1PAswsSaoUkyd5Eumhbw6NVLU42AqIrr00owedS/w4/83njFcFU0W ywIKf0lXLGFerG2cNb8f5tTWABId5cQflbOBFKCbQXpz0/1sqOIDrs/DaAsB7S3LquBh RUVQJqTvJgRnUv0oPBbak9accUmwmnWE81kymH5RCRGC5tkJ29AZKb2P91fZT9Ly22ap iQr5gqfO79gxpn5ZA+rTobI4/5qE42O7Aybq8g47AI+xEXdDQL5qvWNY0wq08E/hZVOT dI/ujPP+Cgd4baxnrca0xjecy6NOKmdLFRWup6k3NNGudBkia5Dt8wF2qEMQd53LWUdW KDXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=c2ALu7GyMXr87aSf0E+ZjW/XxvJicXkYo724PPYuLBw=; b=K1vkt6CttRZu4pmd5IguhIdcSvpL2+jS4DZ65UYHkr0ZY8syzrKXDYN50GoOKpeOrL M/HKvUXxBCVdrMyO4nBlCt+1CmzW9GcbICzb1ZVwFA/qToZII90dWqraxYTszP0jTWzk CGaO7Wr+q2y2vtzZ2nABnUbTiXGZjgsI29E+MvcogeqS++rN4usrqX18EJ9no2LUNMo1 /jAx9r8eqE7QHe+3HnUhknW2c8BcDU6tjR7GUFyDikeWL18YGL09XAvJgn7/TrrqO9mE nR21tU0y4+UlYW7jxSrZ5JJr8YbZnzkcTdLRNUcO9o6Va9NdyPvGkRkPjVEOO19N8Tda Cg1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ontw3a+r; 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 31-v6si793540plz.364.2018.05.10.06.31.37; Thu, 10 May 2018 06:31:51 -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=ontw3a+r; 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 S1757318AbeEJNbH (ORCPT + 99 others); Thu, 10 May 2018 09:31:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756946AbeEJNbG (ORCPT ); Thu, 10 May 2018 09:31:06 -0400 Received: from localhost (50-81-62-164.client.mchsi.com [50.81.62.164]) (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 61A662173C; Thu, 10 May 2018 13:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525959065; bh=bYwhTfFGm06al8kEqqDnLA6oTjXtdpm5f7K6XHkKJeY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ontw3a+rDngsMMO/wYwLqKnfv5GFD0oSLf/JPdhAOGnwP/JsSAxvaYJtn4Iu3Paoq I/79BdMAOpnFLanV/XL6ewxW2JIxOMru2vVAc6NZopYiKpUCB8pgIM5CesDHQLJW8K xYiHe2xjoog+w0BKD+fEVKwTqxLRlSqXuLaLVaDI= Date: Thu, 10 May 2018 08:31:04 -0500 From: Bjorn Helgaas To: Oza Pawandeep Cc: Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi Subject: Re: [PATCH v15 7/9] PCI/PORTDRV: Implement generic find device Message-ID: <20180510133104.GG173327@bhelgaas-glaptop.roam.corp.google.com> References: <1525323838-1735-1-git-send-email-poza@codeaurora.org> <1525323838-1735-8-git-send-email-poza@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525323838-1735-8-git-send-email-poza@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 03, 2018 at 01:03:56AM -0400, Oza Pawandeep wrote: > This patch implements generic pcie_port_find_device() routine. > ... > + * pcie_port_find_device - find the struct device > + * @dev: PCI Express port the service devices associated with > + * @service: For the service to find > + * > + * Find PCI Express port service driver associated with given service > + */ > +struct device *pcie_port_find_device(struct pci_dev *dev, s/struct device/struct device/ (remove extra space) > + u32 service) > +{ > + struct device *device; > + struct portdrv_service_data pdrvs; > + > + pdrvs.dev = NULL; > + pdrvs.service = service; > + device_for_each_child(&dev->dev, &pdrvs, find_service_iter); > + > + device = pdrvs.dev; > + return device; > +} > + > +/**