Received: by 10.213.65.68 with SMTP id h4csp521491imn; Tue, 13 Mar 2018 11:41:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELvQPAZmelH/or9uzFDMwzcoqgW2ZkBLlRroBFcX64sJp0ws4++Ut8gyu7erHjSnwCsbsMUz X-Received: by 10.101.96.73 with SMTP id b9mr1279056pgv.339.1520966514398; Tue, 13 Mar 2018 11:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520966514; cv=none; d=google.com; s=arc-20160816; b=Ug78n/R3ymqks+2XxVLgZ6vE4eZzWKfhYz/fpT/VFOxSh7utN/JO8K1C1CnHzbBZhy ZsYxEr84GBMbU0VroNVlSiS52SrfIKisUACB3W1mdLbnspcWwNHolvS5J7IErGWUWixL vUAgo6EGQJ4uNz3ONO6CJ5jKjsd0iIaGQUUjBeZ25hKj070kWBWHDvmiXpjObz7+Ym74 cH8mC3fXotxxuE87lA5S6CF/PJpcfZzrMUg4SJ66VrIcTi9uwRlc0XcDwMwmwvQ/uz8g ieOB3OIjEGiMtw8dYfCnj/Zo5LZBa2SwAXmibHj4Ge8sEo2QfiSETNOvvmJBqgaZnAAW Im8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=Abh1cF3d050wlOSpUxklLyJMvydQm047M0SEJZDzdP4=; b=X5QXRwP48GaBwqotQ1BuaEZMYDa7Q7lO25p9HfdwR0i7IrGGVSUJ1rUUaIV2l2as7f /qqLmAelFM8qCHmhp5w8ervS5HuKgffzGISc+J8BEs7cr1lVQTdXwWFMb/78WGz1rb7V O544yw1qXaxU1d07LeMLpVx0vDFBmRIvZdJptUtOKQgDPTtLSgrhtdBU6UFj3SutTxJ8 zWhAdtuXHp6bjRPuL0bmYZdddej7A6kuZOOlH4Secw3JSiIfWPrGOHRT+J1n8VG22rBr j5pkaVtmqJjc2Y3C7LoSzSP4ppfk57pksQUcIddemk04lFobpCMZMpfk1ZJTdVW3xYY8 pmRA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si476792pgp.660.2018.03.13.11.41.40; Tue, 13 Mar 2018 11:41:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbeCMSkm (ORCPT + 99 others); Tue, 13 Mar 2018 14:40:42 -0400 Received: from ale.deltatee.com ([207.54.116.67]:34340 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbeCMSkk (ORCPT ); Tue, 13 Mar 2018 14:40:40 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1evoqW-0005N9-Qp; Tue, 13 Mar 2018 12:40:25 -0600 To: Sinan Kaya , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson References: <20180312193525.2855-1-logang@deltatee.com> <20180312193525.2855-2-logang@deltatee.com> <59fd2f5d-177f-334a-a9c4-0f8a6ec7c303@codeaurora.org> From: Logan Gunthorpe Message-ID: Date: Tue, 13 Mar 2018 12:40:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <59fd2f5d-177f-334a-a9c4-0f8a6ec7c303@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: alex.williamson@redhat.com, benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, axboe@kernel.dk, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, okaya@codeaurora.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/18 09:28 PM, Sinan Kaya wrote: > Maybe, dev parameter should also be struct pci_dev so that you can get rid of > all to_pci_dev() calls in this code including find_parent_pci_dev() function. No, this was mentioned in v2. find_parent_pci_dev is necessary because the calling drivers aren't likely to have a bunch of struct pci_dev's for all the devices they are working with lying around. It's a much nicer from an API stand point to take struct devs and not worth it just to have a PCI API only taking struct pci_devs. Logan