From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Date: Thu, 2 Mar 2017 21:08:00 +0100 Message-ID: <20170302200800.GA21303@ulmo.ba.sec> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> <20170302192406.GA8519@wtj.duckdns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6627134699467838173==" Return-path: In-Reply-To: <20170302192406.GA8519@wtj.duckdns.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Tejun Heo Cc: Wenrui Li , Gabriele Paoloni , "linux-pci@vger.kernel.org" , Shawn Lin , Will Deacon , Michal Simek , Tanmay Inamdar , Linux-Arch , Lorenzo Pieralisi , Jonathan Corbet , Pratyush Anand , Russell King , Jon Mason , Andy Shevchenko , Murali Karicheri , Catalin Marinas , Arnd Bergmann , Bharat Kumar Gogada , Ray Jui , John Garry , Joao Pinto , Bjorn Helgaas List-Id: linux-arch.vger.kernel.org --===============6627134699467838173== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 02, 2017 at 02:24:06PM -0500, Tejun Heo wrote: > Hello, >=20 > On Thu, Mar 02, 2017 at 02:50:00PM +0200, Andy Shevchenko wrote: > > > I thought about that and did not do it because here we are remapping > > > resources that are _not_ PCI bus resources (ie it is not PCI BARs we > > > are remapping), keeping the devm_* prefix would be more consistent > > > to the typical device drivers remapping functions pattern (ie a > > > typical PCI host controller driver would mix devm_ and pcim_ calls > > > which is a bit hard to parse), that was my rationale. > > > > > > I am not too fussed about that either way, I am happy to update it to > > > pcim_* though, it is Bjorn/Arnd's decision. > >=20 > > I would vote for pcim_*() variant. >=20 > Me too, for brevity. devm_* is equally brief. Also, all existing pcim_*() functions take a struct pci_dev * as their first argument, because they operate on the PCI devices. However in this case the devm_pci_remap_*() functions do not operate on PCI devices. Rather they operate on the struct device that represents the PCI host bridge. Therefore I think devm_ is more appropriate here. Thierry --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAli4e50ACgkQ3SOs138+ s6GNuA//fAb3QI6abNRkCmASOctClqDiO1meyvngmoqLymMYTyIhT4iuVWlXmUHu QESNy10gY57D8xhjFKNemzp18/GuY0BTZClWBzJHjSits4rH2qGD/x4LOpfxrHbm NRf+Yh/C4NLeGYFl04ds3MtbSh5MPuf3XmbR7IzMSKxvBSO90SBw9q3GjKb2Eokr 7LV0I5qFEiwiRvgBYFj6vjU5DA9Fg5Is5msK7psHMLh5t6Dy9skHWgB2wRnzsuOc 91uplo72htr9puZ4EBNirOOb5dYEILAoPkSPJiFut/09GYV+Ywxp7rmgfvp+N/M+ 7YQcRvcGQFP4KhMz5EmCcZH7BFRtZ3sbHVqFf5F0nFkfPhQG+zJgWEjP8v8r5EYE 2iNp3Cq0Sa+AkIsyHKmBqwcqLmFkjZesgyvvtoSa/ByvQpGLY5hpTGlKvUjLozyB aJ1EG/g3QaHPOd1hYPj08cbl48t+g+m+Pcq1CfORvTQhXnOB6z+PzEqUnnfBcvrj yybtp7EGx6+7SpOFcomi4Fl337XQOJF4fH/KipX+sYHib+fP65WLBTQXajf8pgQ8 J0KYqrL164+geCiaZSazoSTMSoGS2KGvU75xjTxTyQ0kuthtrTAZEFDxgfwiRmpK wHrxAnQvr9v68FZXihw//W+uMzSmgY8w0jK6L7ptGJUt4fGkByI= =3s6b -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- --===============6627134699467838173== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6627134699467838173==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com ([209.85.128.195]:35332 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751148AbdCBURb (ORCPT ); Thu, 2 Mar 2017 15:17:31 -0500 Date: Thu, 2 Mar 2017 21:08:00 +0100 From: Thierry Reding Subject: Re: [PATCH 07/20] PCI: implement Devres interface to map PCI config space Message-ID: <20170302200800.GA21303@ulmo.ba.sec> References: <20170227151436.18698-1-lorenzo.pieralisi@arm.com> <20170227151436.18698-8-lorenzo.pieralisi@arm.com> <20170302120546.GB17277@red-moon> <20170302192406.GA8519@wtj.duckdns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20170302192406.GA8519@wtj.duckdns.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Tejun Heo Cc: Andy Shevchenko , Lorenzo Pieralisi , "linux-pci@vger.kernel.org" , linux-arm Mailing List , "linux-kernel@vger.kernel.org" , Linux-Arch , Jonathan Corbet , Bjorn Helgaas , Arnd Bergmann , Will Deacon , Catalin Marinas , Russell King , Pratyush Anand , Jingoo Han , Mingkai Hu , John Garry , Tanmay Inamdar , Murali Karicheri , Bharat Kumar Gogada , Ray Jui , Wenrui Li , Shawn Lin , Minghuan Lian , Jon Mason , Gabriele Paoloni , Thomas Petazzoni , Joao Pinto , Michal Simek , Stanimir Varbanov , Zhou Wang , Roy Zang Message-ID: <20170302200800.qpE0U4n6J7xd8h-jqHI0rsBMt1a0gyhtpV1wFQSNCtY@z> --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 02, 2017 at 02:24:06PM -0500, Tejun Heo wrote: > Hello, >=20 > On Thu, Mar 02, 2017 at 02:50:00PM +0200, Andy Shevchenko wrote: > > > I thought about that and did not do it because here we are remapping > > > resources that are _not_ PCI bus resources (ie it is not PCI BARs we > > > are remapping), keeping the devm_* prefix would be more consistent > > > to the typical device drivers remapping functions pattern (ie a > > > typical PCI host controller driver would mix devm_ and pcim_ calls > > > which is a bit hard to parse), that was my rationale. > > > > > > I am not too fussed about that either way, I am happy to update it to > > > pcim_* though, it is Bjorn/Arnd's decision. > >=20 > > I would vote for pcim_*() variant. >=20 > Me too, for brevity. devm_* is equally brief. Also, all existing pcim_*() functions take a struct pci_dev * as their first argument, because they operate on the PCI devices. However in this case the devm_pci_remap_*() functions do not operate on PCI devices. Rather they operate on the struct device that represents the PCI host bridge. Therefore I think devm_ is more appropriate here. Thierry --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAli4e50ACgkQ3SOs138+ s6GNuA//fAb3QI6abNRkCmASOctClqDiO1meyvngmoqLymMYTyIhT4iuVWlXmUHu QESNy10gY57D8xhjFKNemzp18/GuY0BTZClWBzJHjSits4rH2qGD/x4LOpfxrHbm NRf+Yh/C4NLeGYFl04ds3MtbSh5MPuf3XmbR7IzMSKxvBSO90SBw9q3GjKb2Eokr 7LV0I5qFEiwiRvgBYFj6vjU5DA9Fg5Is5msK7psHMLh5t6Dy9skHWgB2wRnzsuOc 91uplo72htr9puZ4EBNirOOb5dYEILAoPkSPJiFut/09GYV+Ywxp7rmgfvp+N/M+ 7YQcRvcGQFP4KhMz5EmCcZH7BFRtZ3sbHVqFf5F0nFkfPhQG+zJgWEjP8v8r5EYE 2iNp3Cq0Sa+AkIsyHKmBqwcqLmFkjZesgyvvtoSa/ByvQpGLY5hpTGlKvUjLozyB aJ1EG/g3QaHPOd1hYPj08cbl48t+g+m+Pcq1CfORvTQhXnOB6z+PzEqUnnfBcvrj yybtp7EGx6+7SpOFcomi4Fl337XQOJF4fH/KipX+sYHib+fP65WLBTQXajf8pgQ8 J0KYqrL164+geCiaZSazoSTMSoGS2KGvU75xjTxTyQ0kuthtrTAZEFDxgfwiRmpK wHrxAnQvr9v68FZXihw//W+uMzSmgY8w0jK6L7ptGJUt4fGkByI= =3s6b -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--