Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp619900imu; Fri, 11 Jan 2019 06:19:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN7J4hbS8g21REtbiHQRijhsFbtemt/TJ90gt1oHZVZGKUUyNmunwKj94pctx4Zw+Fbm63G4 X-Received: by 2002:a17:902:6909:: with SMTP id j9mr14363382plk.196.1547216349308; Fri, 11 Jan 2019 06:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547216349; cv=none; d=google.com; s=arc-20160816; b=pBe3xZevW+mBmgTvW6IwK8F37/JwWhZ+tV7NJwipK6TOWPAkCj4HLQCRw33Nm9Hl5o X5jiSx5KQZfEcEvZtlPx1RRrlpKVtBBFxfirHrjRry4X0pzn7NeuH6AyKFpIFCL1uVZq ZiX1ETcyi8eoMhKn9kB1X24BaXfjqssRVLR5LbZXCF9CV2IuQ+pSAGJFx1PfUjiiGUqJ QEgvWNISVlF4Soc6irRck/MPkHft2W4/Bu5P/QmlLKeqlptcOVl8XSlIVf5XFM/01lNn UZzwHWRKYp2wcs+IUUefWcxZTOctVy/vnidLR2K5gFHYAJq55d620gh73BPvXqbMJVuO dthg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=w8s0iPyC3nM/rk7L/c68nMdHKZ/R/Cy2gudgTNhTVnE=; b=pxYK6k4u1WWGLgGIDhaUa5CzybX+Wd9SJJSCFdnWrhiP4BsDkg3mGunShfH/l50T7Y PEXWwG0CLuEY6eb7t14X8FEoCkbvlvj0ct7h4dMKNntoYSJmxxVstUOipaDFr20SUX32 RWKalNPNVkq2o/kXcbBotgkPjVvVzkYFfzsap4fqINgz5PRnHAHKiJlx+rT3JlsHd7LH eFJtX8WgZxHg+AXd6F+eWr33oodx0p7XR5UyI7IxNn41CRB6cEImVKk2m+QIUqe15FmV IB0bVfWMGDJzQ2ULjw2ZcpUCaSTAcEXx5JW3oSIzasbO9o1OREWm4axVnTvl+ZWthED4 vskw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S68dFzP9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2si74032pgo.544.2019.01.11.06.18.53; Fri, 11 Jan 2019 06:19:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S68dFzP9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732308AbfAKMZd (ORCPT + 99 others); Fri, 11 Jan 2019 07:25:33 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45842 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbfAKMZc (ORCPT ); Fri, 11 Jan 2019 07:25:32 -0500 Received: by mail-lf1-f66.google.com with SMTP id b20so10634169lfa.12 for ; Fri, 11 Jan 2019 04:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w8s0iPyC3nM/rk7L/c68nMdHKZ/R/Cy2gudgTNhTVnE=; b=S68dFzP9pj3n5dHoJ0ra2uhg+Ei+0UiopJ6Ey0M2wq1BODvJLLrn+18QdQ51lvNXYc 5ZVPlvqUJcpGwFJwXWlVYREI+BMnT2Lb1qud31JL8u2VdlteLNSSCsaSOV//5F70n/mH EUOwBVdnoOGpB+BCZboXYm4XXz3MZqYbNJb3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w8s0iPyC3nM/rk7L/c68nMdHKZ/R/Cy2gudgTNhTVnE=; b=FHkvrg9c6fKRsETUhnlMLayM6PMVPhNq+5kNsaweell05hg3t/ye92iItf7WZzsBDY eW47Lt8JtlBdtBVdq+vOjUvN45ecDFPtwTJeERkm6KosjfJ3cvQgWmPtmFXNMgMMKpfW B83B2xxh3OP6zysuf0cZc+mhf0iiY2Exw4gabKYTdPOQBfyDpFtsptJIHwMZPlCmDtt8 ancH1Kf9wj3HF9aKNEkIHIvb9ejylu3hotOXpR78PvwIb19dNsB09xLseyHNWAkN7Dj3 rFK11mvdiDzgdehHR/N+bevzpPPhMSIi829la+Zh/RflDvEWmF4SvTnJMHLGzZBZuSPd 03EA== X-Gm-Message-State: AJcUuketHvH+ONe4nXEmhTMy5wMSy7j1WV3SxSBYSaNkMkz1Zs3ZZ9XT ABIYFusGVtymdNLrRiEZcfZZ4j2oeg5RGg== X-Received: by 2002:a19:645b:: with SMTP id b27mr7941995lfj.14.1547209529978; Fri, 11 Jan 2019 04:25:29 -0800 (PST) Received: from localhost (185-130-167-110.kund.ip-osteraker.se. [185.130.167.110]) by smtp.gmail.com with ESMTPSA id v19sm14618009lfe.69.2019.01.11.04.25.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 04:25:29 -0800 (PST) From: Anders Roxell To: arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] misc: pvpanic: fix warning implicit declaration Date: Fri, 11 Jan 2019 13:25:25 +0100 Message-Id: <20190111122525.21167-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building and have fragment CONFIG_NO_IOPORT_MAP enabled then the following warning: ../drivers/misc/pvpanic.c: In function ‘pvpanic_walk_resources’: ../drivers/misc/pvpanic.c:73:10: error: implicit declaration of function ‘ioport_map’; did you mean ‘ioremap’? [-Werror=implicit-function-declaration] base = ioport_map(r.start, resource_size(&r)); ^~~~~~~~~~ Since commmit 5d32a66541c4 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set"), its now possible to have ACPI enabled without haveing PCI enabled. However, the pvpanic driver depends on HAS_IOPORT_MAP or HAVE_IOREMAP_PROT when ACPI is enabled. It was fine until commit 725eba2928ad ("misc/pvpanic: add MMIO support") got added. Rework so that we do a extra check ifdef CONFIG_HAS_IOPORT_MAP. Suggested-by: Arnd Bergmann Signed-off-by: Anders Roxell --- drivers/misc/pvpanic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c index 595ac065b401..95ff7c5a1dfb 100644 --- a/drivers/misc/pvpanic.c +++ b/drivers/misc/pvpanic.c @@ -70,8 +70,12 @@ pvpanic_walk_resources(struct acpi_resource *res, void *context) struct resource r; if (acpi_dev_resource_io(res, &r)) { +#ifdef CONFIG_HAS_IOPORT_MAP base = ioport_map(r.start, resource_size(&r)); return AE_OK; +#else + return AE_ERROR; +#endif } else if (acpi_dev_resource_memory(res, &r)) { base = ioremap(r.start, resource_size(&r)); return AE_OK; -- 2.19.2