From patchwork Fri Jan 11 12:25:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 155341 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp516480jaa; Fri, 11 Jan 2019 04:25:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Hfp05WL0dz5TZkUz1onJu9DVJq9/sSxhKShA2LFR/Go8Eni/pe5dWr/KEuasm1HHRkopv X-Received: by 2002:a17:902:2dc3:: with SMTP id p61mr14184196plb.166.1547209535367; Fri, 11 Jan 2019 04:25:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547209535; cv=none; d=google.com; s=arc-20160816; b=NHwq1FlsKyQBIK6FYEXERvF1bfh51x51NuggFJJa5DLv37IoV2SQEoKINoibpagMrM e1iWKU65vU5HEdrPFbZBr585SHpZTFZuUl/QGkOlNKRW5IV6Rf6VCrrsWLiKnqfABIi+ d6TbiR+Ne2g+TGKnqVEwTaDLWpKrxn3m04yod8RqvvZrUcyrTrNhFWETeBbbu/D+rAR6 bTcrq3r1xo0Rob9Hrb0BIbMqYzFSngudVkYCWbUhB5wczuhr8GqRFCXVVrXvVmd6BH88 chbNgc/FqCJ0ET1lduzjXTj0rq6lXD7Xo/l9L3knqirJoD1WhOzCxLIGf58znrRSNG/o WneA== 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 b11si25402519pgt.289.2019.01.11.04.25.35; Fri, 11 Jan 2019 04:25:35 -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 S1732312AbfAKMZd (ORCPT + 31 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 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(+) -- 2.19.2 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;