Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp818712pxb; Wed, 29 Sep 2021 10:16:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyHxQGOD12cUffNtW9JPDbYI9i4QvYU1yRVLSK3qzOm4jFplQrrhfEhVNmAcdRG5nMI2Di X-Received: by 2002:a17:902:9887:b0:13b:9892:860b with SMTP id s7-20020a170902988700b0013b9892860bmr693806plp.65.1632935784397; Wed, 29 Sep 2021 10:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632935784; cv=none; d=google.com; s=arc-20160816; b=XQV8smUZhM71SKuSZhFcqjfjJ/QIO5BxyUIJR9d1auKWl1OqLRjpX7Z7SpTebHzrF5 pkBFaSAtkNq4aTfT73WbX+yMFCMuyYSH9Dqm/v1pC/8gmnpLlIJYK0JnDGXE+ujx5CGa aDbvHR/ExO5VBI4zbI74C7ZT/Bpg+QfanlvaFMaDdGhT3LLPmE/VhTfL4PObuO+/5hmq fEimIucaJWxG9SWC6W54K0ikSHnsW8+c+CRwptNRsYXlZOvQ6Gmecj0nMawtR1dMqWro ojZJV9a0WrpQyO6MtKYUCa+VRyUZj5mPifL/piipwYikGA91Jhp6WTvaBK/F+K95bB6g 6mjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0CedjH0EPW2LOtyAJj7BytLlhrkv8bQcDH7qDV5Cbms=; b=rzoYVmhuVLM+NSKG5bxyE2CpKFwQ9B9duOadcKcWvoIXdJwbdp8/bF6r34NKvdfdz9 QQwIZgU0qjAojdKgQTQFJMO37DzS2arAU2Hr2Tq9LmZYtF094pwpApEINZVAVDVq42WB WGM/Sj2UguszEA/uIjIOt9DjyZQ0z5gnuYDGFkXdS8H0hcWTlaq/flSwDRdbb/6gN7Rl Ht0BG31CYvfw9ErPF1QrhGDzvx4yKk68NrTX7VOir+lBM0i2gC4RFTsXBNM5U2Fyow+q Gd22wIgeMBAk7axbN5KYbxXLNVhk7wfdPy03R7SGG3CS0qF3p3vpfLZ7gAWhgZ4z7S60 eOGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFW54fO7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si683668plf.374.2021.09.29.10.16.11; Wed, 29 Sep 2021 10:16:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFW54fO7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344424AbhI2O2f (ORCPT + 99 others); Wed, 29 Sep 2021 10:28:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:56458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344142AbhI2O2f (ORCPT ); Wed, 29 Sep 2021 10:28:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FF1A613A7; Wed, 29 Sep 2021 14:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632925614; bh=L4/gUbMB7IXW/+mE5sg2yvzrsdvg/AxRJNdmEImmNm4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LFW54fO7AUdG0exWC/NgjDiA4Nt98dn5yg0hPo3EdvdC/yPNIU47XEiwzYG8CA3BF 0SNFSR6r2SyIYtkfpzI4LAfwTbTG3DBrFJ5qzRxSS/y+WJJbxgkf49SzQfVT3nyNPB 9PNRPsZLeUoBBMb3mPdxloLfnyshGTbxNl4rp4JwCqgZq+g0aLnHChxSFXBBXTOGsb wfqT3eYHAdisIEprDGJ4H3K1Tjo8GIQX8bf9duGS5vbKKof+zhR+gGolnhRupHx9ON Lmk2TH0udml8MKxicJ+4dx20E74mu7RFB1yt8THg5eycDrx7gP2qtlXLGLePaDu6r3 tJ1l6JW4OhIxw== Received: by mail-ed1-f45.google.com with SMTP id v18so9294167edc.11; Wed, 29 Sep 2021 07:26:54 -0700 (PDT) X-Gm-Message-State: AOAM530AWTYw6wGELTRpFM0qU68auhQ9t52+FgqKS5KPPvEHvYzJnmh7 VodpMrl9xpILhfs2+Nc2NDdOK1x+BG4ijKIJoQ== X-Received: by 2002:a50:d887:: with SMTP id p7mr232004edj.164.1632925576614; Wed, 29 Sep 2021 07:26:16 -0700 (PDT) MIME-Version: 1.0 References: <20210928201214.294737-1-trix@redhat.com> In-Reply-To: <20210928201214.294737-1-trix@redhat.com> From: Rob Herring Date: Wed, 29 Sep 2021 09:26:05 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: remove duplicate declaration of of_iomap() To: trix@redhat.com Cc: Frank Rowand , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 3:12 PM wrote: > > From: Tom Rix > > A ranconfig produces this linker error > irq-al-fic.c:252: undefined reference to `of_iomap' > > The declaration of of_iomap() is dependent on OF > The definition of of_iomap() is dependent on OF_ADDRESS > These should match. There are duplicate declarations > of of_iomap(), remove of_iomap() and the > of_address_to_resource() duplicate. > > Signed-off-by: Tom Rix > --- > include/linux/of_address.h | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/include/linux/of_address.h b/include/linux/of_address.h > index 45598dbec269..a190996b4b0b 100644 > --- a/include/linux/of_address.h > +++ b/include/linux/of_address.h > @@ -122,13 +122,7 @@ static inline bool of_dma_is_coherent(struct device_node *np) > { > return false; > } > -#endif /* CONFIG_OF_ADDRESS */ > > -#ifdef CONFIG_OF > -extern int of_address_to_resource(struct device_node *dev, int index, > - struct resource *r); > -void __iomem *of_iomap(struct device_node *node, int index); This is going to break sparc which has !OF_ADDRESS and its own of_iomap and of_address_to_resource implementations. I don't want to add CONFIG_SPARC in here, so I think we should solve this in kconfig. OF and !OF_ADDRESS is supposed to mean the arch provides these functions. I'd really like to do away with HAS_IOMEM. It doesn't serve much purpose other than disabling a bunch of drivers. > -#else > static inline int of_address_to_resource(struct device_node *dev, int index, > struct resource *r) > { > @@ -139,7 +133,7 @@ static inline void __iomem *of_iomap(struct device_node *device, int index) > { > return NULL; > } > -#endif > +#endif /* CONFIG_OF_ADDRESS */ > #define of_range_parser_init of_pci_range_parser_init > > static inline const __be32 *of_get_address(struct device_node *dev, int index, > -- > 2.26.3 >