Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3418570pxb; Sun, 26 Sep 2021 14:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygDDPLwFWoifhJjQGpnkUd0kkBxhDdyQFbrqEAVa0MIRsMhlTjqH5LbZY0p/1ssenUkiyc X-Received: by 2002:a17:906:25d7:: with SMTP id n23mr24317434ejb.322.1632693044331; Sun, 26 Sep 2021 14:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632693044; cv=none; d=google.com; s=arc-20160816; b=JKsJGDRRxW3QiYsMeIM9gdHVFrADl1I3rGmJDCyBj3O1UlF899mzVq4Gq7DsX4nVjf ab3G6oTzj7xlkX66W3kBWZsAzQ++cNon3x0i5EBFnSZ0X7D6Wy1aVuMU+XJWkvbYDZJM fPDAoe7uMGDrokDDXwblqSkvO9KSr9LLVZb53i5ijYO743Zj5i+ZXEXU9kNDXBL+c96T Ked4opgelsVPNrpLBs/+2IHdJMsmnJl8Ct98Y7S5u0FuuJFdpLdoq2bSNUbm3FfwL99q vRFgBUk42D4nLFshrfDXIMkNsO6jcRx589x0dx9aKNJBGPJy20n1sAcMaDOS+PbPH83Y Lyjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Tw65aNmxnM9/K7u2U3QRi6kOxX3UaX2u6AJJK6c0E24=; b=aCcqvrU49H6biul3aZMUXqRgvc20gk1kvpwkIzss7HSGr1Lrn7/iHj2g6U4bacWhfT wpZufZaN0a8CEHEuYZRirOOknlkjDjQC4+kOfd1t8r4xA6VtLfSCILPmOhqgTBTmC0sc iL8PZedHBX9Wt/Xgrs+aiIR2bVrLaiXardHN71BXd01eqaggXV0vSCuOUWjqRagGOkgD kpAXTeOEpUgV22mGW2wa7QDWHwWcqK+bjIOm/POUcRbBgnPbSlk0jTLgxIud2WX5WhQt 1ZQMz+Pse8wIZEoY8YE+9Ivtkj3zrAiQQ+QmK/RYa4miV7ntHyAnGDid1CHiKGQicZPR x3jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ohoD6AHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si8563957edw.135.2021.09.26.14.50.20; Sun, 26 Sep 2021 14:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ohoD6AHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbhIZVuL (ORCPT + 99 others); Sun, 26 Sep 2021 17:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbhIZVuK (ORCPT ); Sun, 26 Sep 2021 17:50:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E184EC061570 for ; Sun, 26 Sep 2021 14:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=Tw65aNmxnM9/K7u2U3QRi6kOxX3UaX2u6AJJK6c0E24=; b=ohoD6AHId6glTizVzppyXfnFgM bFU3tUVrGUgruilqmGNvDMu0bIZ3tZCWfC8UbzH7CYDqLCpSQVKz/CA7qjpCEHj5bBE5POarlYmH7 7LZAT/neG7J2xSXR2s+/u5IEV8VYn4D2iNzHD8Wj9w1k3M2xFMyMEsyxrSoeW7cQAdXlX2o8L5ztp HUAQxbNFe5UmCM78QhIFTMinNqwZLATXCQX4NnWDbOR9agfXxw4txm0EVdyN2eGN1BV9mwXcEBO5n raMAm6ILMYkmllukbi9lQQRCOblssaHYPjgmOUow++oM0eCajsP3WL6teNuUKOmo4fG5wt8fVA4+S f86Gd5SQ==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUc0e-0017NX-Bj; Sun, 26 Sep 2021 21:48:32 +0000 Subject: Re: [RFC PATCH] xtensa: setup: use CONFIG_USE_OF instead of CONFIG_OF To: Max Filippov Cc: LKML , Chris Zankel , "open list:TENSILICA XTENSA PORT (xtensa)" References: <20210925032951.6767-1-rdunlap@infradead.org> From: Randy Dunlap Message-ID: <2cc9c34f-e166-51bc-eedc-e4086753c011@infradead.org> Date: Sun, 26 Sep 2021 14:48:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/26/21 11:55 AM, Max Filippov wrote: > Hi Randy, > > On Fri, Sep 24, 2021 at 8:29 PM Randy Dunlap wrote: >> >> CONFIG_OF can be set by a randconfig or by a user -- without setting the >> early flattree option (OF_EARLY_FLATTREE). This causes build errors. >> However, if randconfig or a user sets USE_OF in the Xtensa config, >> the right kconfig symbols are set to enable xtensa/kernel/setup.c to >> build. >> >> Fixes these build errors: >> >> ../arch/xtensa/kernel/setup.c: In function 'xtensa_dt_io_area': >> ../arch/xtensa/kernel/setup.c:201:14: error: implicit declaration of function 'of_flat_dt_is_compatible'; did you mean 'of_machine_is_compatible'? [-Werror=implicit-function-declaration] >> 201 | if (!of_flat_dt_is_compatible(node, "simple-bus")) >> ../arch/xtensa/kernel/setup.c:204:18: error: implicit declaration of function 'of_get_flat_dt_prop' [-Werror=implicit-function-declaration] >> 204 | ranges = of_get_flat_dt_prop(node, "ranges", &len); >> ../arch/xtensa/kernel/setup.c:204:16: error: assignment to 'const __be32 *' {aka 'const unsigned int *'} from 'int' makes pointer from integer without a cast [-Werror=int-conversion] >> 204 | ranges = of_get_flat_dt_prop(node, "ranges", &len); >> | ^ >> ../arch/xtensa/kernel/setup.c: In function 'early_init_devtree': >> ../arch/xtensa/kernel/setup.c:228:9: error: implicit declaration of function 'early_init_dt_scan'; did you mean 'early_init_devtree'? [-Werror=implicit-function-declaration] >> 228 | early_init_dt_scan(params); >> ../arch/xtensa/kernel/setup.c:229:9: error: implicit declaration of function 'of_scan_flat_dt' [-Werror=implicit-function-declaration] >> 229 | of_scan_flat_dt(xtensa_dt_io_area, NULL); >> >> Fixes: da844a81779e ("xtensa: add device trees support") >> Signed-off-by: Randy Dunlap >> Cc: Max Filippov >> Cc: Chris Zankel >> Cc: linux-xtensa@linux-xtensa.org >> --- >> arch/xtensa/kernel/setup.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) > > Thanks for your RFC. I've tested it and found a couple more places > where CONFIG_USE_OF should be used instead of CONFIG_OF. > I'll post the revised version. > Hi Max, Thanks for checking and for the extra fixes. Looks good. -- ~Randy