Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972AbdC0GHi (ORCPT ); Mon, 27 Mar 2017 02:07:38 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35931 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452AbdC0GH3 (ORCPT ); Mon, 27 Mar 2017 02:07:29 -0400 Date: Mon, 27 Mar 2017 07:54:54 +0200 From: Tobias Regnery To: Arnd Bergmann Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, horms@verge.net.au Subject: Re: [PATCH] of: add stub for of_n_addr_cells Message-ID: <20170327055454.c6kj4keeudqn4bps@builder> References: <20170324103940.30902-1-tobias.regnery@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 46 On 24.03.17, Arnd Bergmann wrote: > On Fri, Mar 24, 2017 at 11:39 AM, Tobias Regnery > wrote: > > With CONFIG_OF=n and CONFIG_COMPILE_TEST=y the rcar pci-e driver fails to > > build on arm: > > > > drivers/pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init': > > drivers/pci/host/pcie-rcar.c:1035:16: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration] > > parser->pna = of_n_addr_cells(node); > > ^~~~~~~~~~~~~~~ > > > > Fix this by adding an inline stub for of_n_addr_cells > > > > Signed-off-by: Tobias Regnery > > --- > > This is against next-20140324 > > > > include/linux/of.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/include/linux/of.h b/include/linux/of.h > > index 21e6323de0f3..9978c918222e 100644 > > --- a/include/linux/of.h > > +++ b/include/linux/of.h > > @@ -710,6 +710,11 @@ static inline struct device_node *of_get_cpu_node(int cpu, > > return NULL; > > } > > > > +static inline int of_n_addr_cells(struct device_node *np) > > +{ > > + return 0; > > +} > > + > > This looks good, but we should also do the same thing for of_n_size_cells(). > > I think I sent something like this a few years ago, but never resubmitted it > when it was ignored at first. > > Arnd This seems sensible, I can send an updated patch with this change or I can send it as a separate patch, whatever the maintainers prefer. -- Tobias