Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp64524imn; Mon, 25 Jul 2022 10:12:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5uqyz1o6AWCMXGDg8FiT5bPbE+epn4rauj6m28vSlA/bL8+HOFUJPoU7bGIIb/3P0claY X-Received: by 2002:a17:902:ccc9:b0:16b:af81:37c6 with SMTP id z9-20020a170902ccc900b0016baf8137c6mr13407542ple.107.1658769167084; Mon, 25 Jul 2022 10:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658769167; cv=none; d=google.com; s=arc-20160816; b=McyPVa6GDIeO/GxzEIp+95ugcZrnWY1ruAafXurNTcs4OdIIk9e6d2PC+r7Rw4Yeup QUGwv03yBB7WzvdpGyv1ndfqfIole7De4UgJ91DLHPwqqkSGK59RxwkETJLa8+RkC0zB iMJ9+fJG+ATJBvDuDfgfpa0A1lRJZ6oapVkZDJpoghTMvExwLZFC7ldtR+x6GegI61IO 7jvW3EnQ+jizZZ57aGKTi8Rq69UU73dV97Wjn/SJPyacEEK0bGsPM9GGD355HgintK8a dh6Ow/WNSfKl80HnoeH0cjinLGXU2dkQnQBkAC2MRoz9L2MekORD8SpAyQNJHa22tr5d Z/cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=NQ6IFp5r72IMAUMzvU/p1jOOZwHNFFpUAOBZ5KRcfHM=; b=zbTZ0FDGyLRCoTRgGpZiHETJ3HvKAEdUtnV1n+2c+DFKFEjiuQagwEAid2M6KXJpy1 EEpfHoHbcq8WxavAu0JXQ/87F9+mXPkej1YOG5+Ty7lfQHLE/0udwr/U3lwN3CwKdf5I 8UUsAeVLK4gzW9xFAHSk/kOOiVzFthGwJuN1/t48FIOcyfLHfN/WBXI+HrAklxm/Djph EblfcSuKgYAoz5z6IlgUzWuVe2bJcOW6cD9C9sMy9u4myGx7c500i1pyFD97YMzgjyXD e2Inc1kMyTuEoUSJML/IxqwyznSF+j4hyAYD0ZLrDb1JP+jf9ARPO1RCymiQqvWibdUH aeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sPQ7nARI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020aa79f91000000b0052ad6e04b95si13452945pfr.202.2022.07.25.10.12.30; Mon, 25 Jul 2022 10:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sPQ7nARI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236666AbiGYRLF (ORCPT + 99 others); Mon, 25 Jul 2022 13:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234035AbiGYRLC (ORCPT ); Mon, 25 Jul 2022 13:11:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F8D13E16; Mon, 25 Jul 2022 10:11:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D1DC361345; Mon, 25 Jul 2022 17:11:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11D49C341C6; Mon, 25 Jul 2022 17:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658769061; bh=SKW2lL3RlrSi+/8Qu/3N2lRnWb6J3ulHowVphz7pQtE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=sPQ7nARImAwmj+nzuV8LmZgvN1dpsNBcLWMAICfr/sXPG+RikK6b14xwlJHc4Sr7H N++SSGKbS7ZkK8OchvHd1uKqqpW7mhSKuNxbelpGtgl9F5usierf+i3luVwrUzmpt9 3aqirHSNSt3/X5McCYtntpw+USgiHiS0a/KT1U1m2HkajGK6Gey9TFfHOtiVDEejNX /xoU88ySj9oUikU3hP+hjcKgJL9l5rLMZIas4W5cbJmuopgK0V0U+CfdM+N2d3pevr QVSj5KZh125f9r/pPjQuLQwIslplYeZQwLfGydP1sJtSpPgy4DGme2vIolPHyG50Q8 poIXnqWG5WbAg== Date: Mon, 25 Jul 2022 12:10:59 -0500 From: Bjorn Helgaas To: Stafford Horne Cc: LKML , Arnd Bergmann , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v3 1/3] asm-generic: Support NO_IOPORT_MAP in pci_iomap.h Message-ID: <20220725171059.GA5779@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220725020737.1221739-2-shorne@gmail.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2022 at 11:07:35AM +0900, Stafford Horne wrote: > When building OpenRISC PCI which has no ioport_map we get the following build > error. > > lib/pci_iomap.c: In function 'pci_iomap_range': > CC drivers/i2c/i2c-core-base.o > ./include/asm-generic/pci_iomap.h:29:41: error: implicit declaration of function 'ioport_map'; did you mean 'ioremap'? [-Werror=implicit-function-declaration] > 29 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) > | ^~~~~~~~~~ > lib/pci_iomap.c:44:24: note: in expansion of macro '__pci_ioport_map' > 44 | return __pci_ioport_map(dev, start, len); > | ^~~~~~~~~~~~~~~~ > > This patch adds a NULL definition of __pci_ioport_map for architetures > which do not support ioport_map. > > Suggested-by: Arnd Bergmann > Signed-off-by: Stafford Horne FWIW, Acked-by: Bjorn Helgaas I assume this will go via some other tree; let me know if otherwise. > --- > include/asm-generic/pci_iomap.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h > index 5a2f9bf53384..8fbb0a55545d 100644 > --- a/include/asm-generic/pci_iomap.h > +++ b/include/asm-generic/pci_iomap.h > @@ -25,6 +25,8 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); > #ifdef CONFIG_NO_GENERIC_PCI_IOPORT_MAP > extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, > unsigned int nr); > +#elif !defined(CONFIG_HAS_IOPORT_MAP) > +#define __pci_ioport_map(dev, port, nr) NULL > #else > #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) > #endif > -- > 2.36.1 >