Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2418154imi; Sun, 24 Jul 2022 19:38:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUV4oe4eq243tK877G8tLiE5m6eQQiSpVqvAGeUdljaNeb7t5ohuiM/7gPNqimOOoU7j7w X-Received: by 2002:a17:907:b08:b0:72b:1c60:4411 with SMTP id h8-20020a1709070b0800b0072b1c604411mr8215810ejl.587.1658716704929; Sun, 24 Jul 2022 19:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658716704; cv=none; d=google.com; s=arc-20160816; b=X1UEPpwTAiMBPrQpK/O2XZj6Ze7HwzBLK0Kq+VynDYiH+Ctu7P872N+NM//5SEsiwB kjDwNlkS2D4jCrj5Wd1JlMKEv3TRTIRfMZVAoQ6gNhiq1MgDyz71cGNAbD5/pR/1uhHi jwkXf9MUBi47vBLFyx7qY5tUy5PHjx9yDzWcwTeGUhkTGvxTmp8w9lA7Qlu7J102hhVW tBCQFzu2qarte0ztXSMWGPMx7MVJXlVwuiLu/FTT4eH1horWAWmNOHWpNwB6iNBVNhiY 9DZa5lbj+l+lZdeHevVdG3gRmAM2oNl2zAvFP/6t8Y/DOs4aPosnEdZ9QRKV8+vEWFWJ 8MbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wPqnXwXti1+G5tWXmkHTdMuVELnLmjzK9jn4d9GRpd0=; b=JWGH/9wfZakMNTEniHk2i660a5fB7ve8a4r7MeT9FeJPbQqELKcXNCUtuHDcGvLVYF vUYIRsGb6wCOIuEBD23havmbmzQ4Ae2GX5NhWmmkfvovzJcpx33Z+AbE1YElTPZ3Kacv yi2GGu9GzBhQFr26JJBlXcyqvQXxl54R2pRPrF1IULzh2lMyuMmWyck0rRq/JD8oajSY /Fzk4e4LdkODWRd24vvWz++Y4P8mhiOcaELe4ocRZM46B632Ijj4dHwpvQJpz5zGekHt iRDm+fnHLPoa43NiUr1Z8uus2YQATwwCD+3V+R+/QGiErefX80fIjVKMsP8GpziyUNWz jQlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VDm5l9E+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020aa7d2c2000000b0043a71bf3999si11003971edr.57.2022.07.24.19.38.00; Sun, 24 Jul 2022 19:38:24 -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=@gmail.com header.s=20210112 header.b=VDm5l9E+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232965AbiGYCIM (ORCPT + 99 others); Sun, 24 Jul 2022 22:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbiGYCIL (ORCPT ); Sun, 24 Jul 2022 22:08:11 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18F32DF83; Sun, 24 Jul 2022 19:08:10 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id q16so9090698pgq.6; Sun, 24 Jul 2022 19:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wPqnXwXti1+G5tWXmkHTdMuVELnLmjzK9jn4d9GRpd0=; b=VDm5l9E+2HuSM1K5W3uvSA51dlS6VFJXblBSWOH2EKnXLZLKifshM9+cmkfKqXqAUb Lp01f6pGs2IG5th9y+gzAgnoZyOUTS457R7GeR7X3tNC+E+iXNQAXN0Qd4UuEi0U+3v0 C+jiaAKkB7x7fMhMAIsdmN7ryNK/1kImmiv2hXwbRjrtoyn7K6C1IlmAFbJrokDljWbE BTPjtHcG50eFJHzfvIje0tKIPXFBn6nm8vJ/aQyGieEPQgHRJYtjDGexIk/pnZT99f8n xFR3vW/ENV7nyioVcn8fFeB9XyBq+F8rpBjvB+t0iVm4uXIjL50iPed1qZKZpi6JGHAC JHCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wPqnXwXti1+G5tWXmkHTdMuVELnLmjzK9jn4d9GRpd0=; b=1XIRkiJfCFu8o7XC9v2/lcUjq8FBQuT75FAykK9BprSIBlBb4FHjAYOYovfZSer0R4 4lHJnXLtgAx3Y1ca0uJno/n2YKQa+ElQPtnCcRo4w2bRH6cz31KInxoJKmM21rjh6G8P CGsHsW2isqKW5SelcUU+kJjw8LvpKYFLLsP+n0p2Nwzpbc8OipziWMeYo0BvG1Cb3szu 1EvOH+wdgVy9qgiygathR3C+GFEG6ls09CUB6QqUs1wv3y7er1MdjmdscEgn/tr5H9OF r1IB041JJqn+b80I7JThpaZ10oIx4Rlb7j2Wp32qnV9HawmcqlgEJEIKSld0P6/9RGFD cJeg== X-Gm-Message-State: AJIora+WTH15FGuBuQ71nqz+e6+QgwmFIeKWQyVZUSyhFk0jcwy6leAf y37v+nw0iLrUvcdulifGCpzg2OG+u2jTlA== X-Received: by 2002:a63:6c87:0:b0:419:b667:6622 with SMTP id h129-20020a636c87000000b00419b6676622mr8895996pgc.495.1658714889186; Sun, 24 Jul 2022 19:08:09 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id z10-20020a1709027e8a00b0016c740e53bbsm307815pla.79.2022.07.24.19.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 19:08:08 -0700 (PDT) From: Stafford Horne To: LKML Cc: Bjorn Helgaas , Arnd Bergmann , Stafford Horne , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH v3 1/3] asm-generic: Support NO_IOPORT_MAP in pci_iomap.h Date: Mon, 25 Jul 2022 11:07:35 +0900 Message-Id: <20220725020737.1221739-2-shorne@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220725020737.1221739-1-shorne@gmail.com> References: <20220725020737.1221739-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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 --- 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