Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5978945imm; Mon, 23 Jul 2018 09:15:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7mlEmdpUrXnUUbm+ojj44ZSyRiFIRA4GBIf7Iiwe53UtgG4gufhej18bY+4ABMckssODV X-Received: by 2002:a63:d20e:: with SMTP id a14-v6mr12758631pgg.226.1532362532302; Mon, 23 Jul 2018 09:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532362532; cv=none; d=google.com; s=arc-20160816; b=utoFe+J/VNNzAawvoUaknQmhU5ahSZjlFId23WDXiTyRyXPjRu/aGVrvkS3XG8CGGy uR06Sq5YHtapZg+QbgMxmks0idEw75mbsTzimPI4/3/GBUh9ZlFBjMm7p2Ffn3HAVudP 1iaOFDOj67eXiKCBzCDX8vnbguMqtFevU2nIzfG3FyqEX85cRqf2DSU6yM+ikVF+Or1m mrQt2aesrBTc8ZiHT0mVOyuLhcBaotR1qwdaHWFmoIH6d0zlX6lWjNI4R3HTq4xc69Nh VvbuKA2agOrJCk2YjzZKm8rdQb9tyWOgf44YO9BLa3wQ+otHUyBleuHZrzrA08bkM1ju +03A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=XJvbZ9+6gcn630mMmyLNsppJrhRuFBeHZlQ7nEdZrgQ=; b=grlwI+8R7h4UaJWt7R44WSlwF5ox4JAOyjT1htrrHlofdZImmNLYRnDfx7+dDUGN3j ZqySPglQT7l0LCIarcGiNNupL93UvjLygbLirqBQMf6YL/RlV9gWZ6Zwel1XZgolXEKc 2rIIGhP/GBsi+6M2pw/q/YddoQDyS5omubY8uCR0JRvgLZfswRKOZz4URIRt1vtboEaM G3hisOn/DW4mARtU3frEjRzcYApnSZsvrhnaMW0Y7FFoh9zRsbTdvxOh/KmGLil3wb0t yxvmygkwLdzPXissvtjwYEtdy08ZbL9qn21tD+MlaeuNi2EuFi0tPOjQ1o4SX+7APojM dbPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123-v6si9042402pfd.201.2018.07.23.09.15.17; Mon, 23 Jul 2018 09:15:32 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388356AbeGWRQX convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Jul 2018 13:16:23 -0400 Received: from mail.bootlin.com ([62.4.15.54]:58942 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387970AbeGWRQX (ORCPT ); Mon, 23 Jul 2018 13:16:23 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 0551920733; Mon, 23 Jul 2018 18:14:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id B458F2069C; Mon, 23 Jul 2018 18:14:24 +0200 (CEST) Date: Mon, 23 Jul 2018 18:14:24 +0200 From: Boris Brezillon To: Arnd Bergmann Cc: Randy Dunlap , Anders Roxell , Miquel Raynal , Linux Kernel Mailing List , Rob Herring , DTML Subject: Re: [PATCH] drivers/memory/Kconfig: Add CONFIG_OF dependency Message-ID: <20180723181424.3c07f5b8@bbrezillon> In-Reply-To: References: <20180721200049.7553-1-anders.roxell@linaro.org> <20180722082939.2de739f1@bbrezillon> <20180723114107.664164d2@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) 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 On Mon, 23 Jul 2018 18:04:52 +0200 Arnd Bergmann wrote: > On Mon, Jul 23, 2018 at 5:40 PM, Arnd Bergmann wrote: > > On Mon, Jul 23, 2018 at 11:41 AM, Boris Brezillon > > wrote: > >> On Mon, 23 Jul 2018 11:34:43 +0200 > >> Arnd Bergmann wrote: > >> > >>> On Sun, Jul 22, 2018 at 8:29 AM, Boris Brezillon > >>> wrote: > >>> > +Arnd, Rob and the DT ML. > >>> > > >>> > On Sat, 21 Jul 2018 14:53:47 -0700 > >>> > Randy Dunlap wrote: > >>> > > >>> >> On 07/21/2018 01:00 PM, Anders Roxell wrote: > >>> >> > JZ4780_NEMC doesn't depend on OF, and if OF isn't enabled we get this > >>> >> > error: > >>> >> > drivers/memory/jz4780-nemc.c: In function ‘jz4780_nemc_num_banks’: > >>> >> > drivers/memory/jz4780-nemc.c:72:10: error: implicit declaration of > >>> >> > function ‘of_read_number’; did you mean ‘down_read_nested’? > >>> >> > [-Werror=implicit-function-declaration] > >>> >> > bank = of_read_number(prop, 1); > >>> >> > ^~~~~~~~~~~~~~ > >>> >> > down_read_nested > >>> > > >>> > Looks like of.h defines stubs so that people can compile-test without > >>> > CONFIG_OF selected. Maybe we should move of_read_number() and > >>> > of_read_ulong() out of the #ifdef CONFIG_OF section. > >>> > >>> That seems fine, though the added dependency seems appropriate > >>> here as well. of_read_number() is rarely used, and for the most part in > >>> powerpc specific code that is guaranteed to have CONFIG_OF enabled, > >>> so it's not that likely to cause many more problems. > >> > >> Ok, then I'll let Miquel apply Anders' patch to the NAND tree. > >> > >> Thanks for your feedback. > > > > My randconfig build bot just ran into a second problem with this driver > > with CONFIG_GPIOLIB disabled: > > > > drivers/mtd/nand/raw/jz4740_nand.c: In function 'jz_nand_dev_ready': > > drivers/mtd/nand/raw/jz4740_nand.c:133:9: error: implicit declaration > > of function 'gpiod_get_value_cansleep'; did you mean > > 'gpio_get_value_cansleep'? [-Werror=implicit-function-declaration] > > return gpiod_get_value_cansleep(nand->busy_gpio); > > ^~~~~~~~~~~~~~~~~~~~~~~~ > > gpio_get_value_cansleep > > drivers/mtd/nand/raw/jz4740_nand.c: In function 'jz_nand_probe': > > drivers/mtd/nand/raw/jz4740_nand.c:388:20: error: implicit declaration > > of function 'devm_gpiod_get_optional'; did you mean > > 'devm_gpio_request_one'? [-Werror=implicit-function-declaration] > > nand->busy_gpio = devm_gpiod_get_optional(&pdev->dev, "busy", GPIOD_IN); > > ^~~~~~~~~~~~~~~~~~~~~~~ > > devm_gpio_request_one > > drivers/mtd/nand/raw/jz4740_nand.c:388:64: error: 'GPIOD_IN' > > undeclared (first use in this function); did you mean 'GPIOF_IN'? > > nand->busy_gpio = devm_gpiod_get_optional(&pdev->dev, "busy", GPIOD_IN); > > ^~~~~~~~ > > GPIOF_IN > > > > > > We could add another dependency here or (my preference) include > > linux/gpio/consumer.h to fix that. Do you want a separate patch for > > it, or should Anders send a combined patch? > > One more failure, not analyzed yet: > > /git/arm-soc/drivers/mtd/nand/raw/jz4740_nand.c: In function > 'jz_nand_select_chip': > /git/arm-soc/drivers/mtd/nand/raw/jz4740_nand.c:87:9: error: implicit > declaration of function 'readl'; did you mean 'krealloc'? > [-Werror=implicit-function-declaration] > ctrl = readl(nand->base + JZ_REG_NAND_CTRL); > ^~~~~ Yep, somehow io.h was indirectly included by gpio.h. I fixed that in my patch when replacing gpio.h by gpio/consumer.h by including linux/io.h.