From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933195AbcJLNEL (ORCPT ); Wed, 12 Oct 2016 09:04:11 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51982 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755110AbcJLMmO (ORCPT ); Wed, 12 Oct 2016 08:42:14 -0400 Date: Wed, 12 Oct 2016 05:42:10 -0700 From: Christoph Hellwig To: Kishon Vijay Abraham I Cc: Bjorn Helgaas , Arnd Bergmann , Jingoo Han , hch@infradead.org, Joao.Pinto@synopsys.com, mingkai.hu@nxp.com, m-karicheri2@ti.com, Pratyush Anand , linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Joao Pinto , Rob Herring , nsekhar@ti.com Subject: Re: [RFC PATCH 02/11] pci: endpoint: introduce configfs entry for configuring EP functions Message-ID: <20161012124210.GB942@infradead.org> References: <1473829927-20466-1-git-send-email-kishon@ti.com> <1473829927-20466-3-git-send-email-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473829927-20466-3-git-send-email-kishon@ti.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2016 at 10:41:58AM +0530, Kishon Vijay Abraham I wrote: > diff --git a/drivers/pci/endpoint/Kconfig b/drivers/pci/endpoint/Kconfig > index a6d827c..f1dd206 100644 > --- a/drivers/pci/endpoint/Kconfig > +++ b/drivers/pci/endpoint/Kconfig > @@ -13,7 +13,9 @@ config PCI_ENDPOINT > > Enabling this option will build the endpoint library, which > includes endpoint controller library and endpoint function > - library. > + library. This will also enable the configfs entry required to > + configure the endpoint function and used to bind the > + function with a endpoint controller. > > If in doubt, say "N" to disable Endpoint support. This needs to grow a depends on CONFIGFS_FS > +/** > + * pci-ep-cfs.c - configfs to configure the PCI endpoint Please don't use the file name in the top of the file comment, it's only bound to get out of date.. > +struct pci_epf_info { > + struct config_item pci_epf; > + struct pci_epf *epf; > +}; Any reason not to simply embedd the config_item into the pci_epf structure?