From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbcFGIM5 (ORCPT ); Tue, 7 Jun 2016 04:12:57 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:49680 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbcFGIMw (ORCPT ); Tue, 7 Jun 2016 04:12:52 -0400 From: Arnd Bergmann To: Bjorn Helgaas Cc: Bjorn Helgaas , Heiko Stuebner , Wenrui Li , Doug Anderson , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Shawn Lin , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Jingoo Han , Pratyush Anand , Hannes Reinecke , Alex Williamson Subject: Re: [PATCH 1/3] pci: introduce read_bridge/write_bridge pci ops Date: Tue, 07 Jun 2016 10:13:01 +0200 Message-ID: <3754686.OCbiLBzILC@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160607002822.GA1391@localhost> References: <1464784332-3775650-1-git-send-email-arnd@arndb.de> <3585926.N1C2xx3GaB@wuerfel> <20160607002822.GA1391@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:aKwrNVS2SMq+Z6vzuYIlQmdbz43jtlzJjOTLMtKMv61SwMR4FM5 TwARjmIukW1NXsE5XcwUrAgSKCI3bCpCA4Vajg0CWt3fTQig3xJq85I6GOUHQctJfvkwrV8 OWZX2wHSvKxukExKrxvZblpUGIpObhn0EVhJBy+bcKJLQbIorej7kKcMTslJjQdrK3KaBw7 5iTuoOg3N7NnbZY/FIBlw== X-UI-Out-Filterresults: notjunk:1;V01:K0:+cGchNdkBUk=:euyokM0JBG+29K/noyDu5l qgObRUP7Q4R7KLOAHx4etVF5S0FCUwtdagBr/V+/xZzapJTFcTWZF52IG/4M7GCybK0RWNMnM 9PX53rKj7qXp7XDJj7LIUXGqF3xlRiwEK0tqDnQP7qAMmgZxIo30sTCIFXryplJ7q0+/l1Meq 4+gkQwB08IcxeAQVMb/wauEUtei2I0h3mghq9LMrCkD3ZFMvRZ8aE4KVl/T5csCN+VHVOTpfY St9VqQvqGWxWH3NYO4oWKtWvhg0k3bFZZKS6gD+V4KQBV7bAwrQNypmj9knWQVwD0/Eqylbxv wMgDzSMzGNF47QAawrIe6fucnSUSHaj64X5BF7/Mh4b5P17/XZ/2aPGLVb8L+W6oLJrFNiQfo 5mh6JvQyUzV/QW0LQWNvF2s+fBNpa+bMOD/IYbcQMB5qpepn6mOWrLKwRLKmTPWjhZ07zolOp ng69vbyEIUdcTb4OcMuxjI57mlK4tDuLcVt6gD8y8W9aRpixYXEuZF0nV0EpfnUs4s6ZwLtEu XGnqaPkOI/1a45/qyhzW+sXDv8Yar+KccZWBIi86J+R6e2pC0tdQHfwkXBSTgnbn1kZE/va39 0EduTCsCWK62K144RAHw0Cm/K3oT8z17D+ivJj6MH4bDyCRPpNNJUuKlwWz75rLl+LzZxGyN0 GztXaKddi58QhRfJVD48A3v1K31bNQaMsgfNv7KvET20ANWbQUuvkWhSA9O4j8s1B8H9Ehj9S vGScySTlOKr8TRKQ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, June 6, 2016 7:28:22 PM CEST Bjorn Helgaas wrote: > The caller is performing one abstract operation: reading or writing > config space of a PCI device. In the caller's context, it makes no > difference whether it's a type0 or type1 access. > > Moving the test from the host bridge driver to pci_read_config_byte() > does move a little code from the callee to the caller, and there are > more callees than callers, so in that sense it does remove code > overall. If you consider a single driver by itself, I'm not sure it > makes much difference. > > The pcie-designware.c patch is a net removal of 17 lines, but that's > not all from moving the type0/type1 test: restructuring along the same > lines but keeping the original type0/type1 test removes about 9 lines. > > Anyway, I think I'd rather work first on your RFC patches to make > pci_host_bridge the primary structure for probing PCI. I think > there will be a *lot* of benefit there. Fair enough. This series started from the review of the Rockchip driver, and the idea was to make that one simpler, but given that we already have several dozen drivers doing the same thing, adding one more isn't going to have a significant impact now. Arnd