From patchwork Fri Oct 28 17:20:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 9402455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 175FF6022E for ; Fri, 28 Oct 2016 17:22:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 075EC2A8A3 for ; Fri, 28 Oct 2016 17:22:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED5572A8A9; Fri, 28 Oct 2016 17:22:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,SUSPICIOUS_RECIPS autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 914672A8A3 for ; Fri, 28 Oct 2016 17:22:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0AqP-0001EG-61; Fri, 28 Oct 2016 17:21:29 +0000 Received: from lb1-smtp-cloud2.xs4all.net ([194.109.24.21]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c0AqI-00015T-MN for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2016 17:21:23 +0000 Received: from localhost-localdomain ([83.160.161.190]) by smtp-cloud2.xs4all.net with ESMTP id 15LZ1u00446mmVf015Lblz; Fri, 28 Oct 2016 19:20:36 +0200 Message-ID: <1477675233.2167.11.camel@tiscali.nl> Subject: pinctrl: mediatek: build failure if CONFIG_IRQ_DOMAIN is not set From: Paul Bolle To: Linus Walleij , Matthias Brugger Date: Fri, 28 Oct 2016 19:20:33 +0200 X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161028_102122_900357_F92F3D60 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, 0) A rather spartan build, on x86_64, which did include drivers/pinctrl/mediatek/pinctrl-mtk-common.o failed like this: drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ‘mtk_gpio_to_irq’: drivers/pinctrl/mediatek/pinctrl-mtk-common.c:838:8: error: implicit declaration of function ‘irq_find_mapping’ [-Werror=implicit-function-declaration] irq = irq_find_mapping(pctl->domain, pin->eint.eintnum); ^~~~~~~~~~~~~~~~ drivers/pinctrl/mediatek/pinctrl-mtk-common.c: In function ‘mtk_pctrl_init’: drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1474:17: error: implicit declaration of function ‘irq_domain_add_linear’ [-Werror=implicit-function-declaration] pctl->domain = irq_domain_add_linear(np, ^~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: error: ‘irq_domain_simple_ops’ undeclared (first use in this function) pctl->devdata->ap_num, &irq_domain_simple_ops, NULL); ^~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1475:27: note: each undeclared identifier is reported only once for each function it appears in drivers/pinctrl/mediatek/pinctrl-mtk-common.c:1484:14: error: implicit declaration of function ‘irq_create_mapping’ [-Werror=implicit-function-declaration] int virq = irq_create_mapping(pctl->domain, i); ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [drivers/pinctrl/mediatek/pinctrl-mtk-common.o] Error 1 make[2]: *** [drivers/pinctrl/mediatek] Error 2 make[1]: *** [drivers/pinctrl] Error 2 make: *** [drivers] Error 2 1) That build had CONFIG_COMPILE_TEST set (obviously) but CONFIG_IRQ_DOMAIN not set. 2) This quick hack fixes that for me: 3) Would you like me to submit a proper (but lightly tested) patch or do you prefer to fix this yourself? Thanks, Paul Bolle diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig index 419ea4d5964d..066087156dcc 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -7,6 +7,7 @@ config PINCTRL_MTK select GENERIC_PINCONF select GPIOLIB select OF_GPIO + select IRQ_DOMAIN # For ARMv7 SoCs config PINCTRL_MT2701