Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3336552pxb; Sun, 26 Sep 2021 11:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyeeXy3D8Yk/lfot9J1YDBX+SZwB2/nF/slG1z5KfipFv/ymbmZoB/UKRDxwQhbBvc8v4Q X-Received: by 2002:a17:902:8206:b0:13e:19b2:af4b with SMTP id x6-20020a170902820600b0013e19b2af4bmr4492025pln.82.1632682696796; Sun, 26 Sep 2021 11:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632682696; cv=none; d=google.com; s=arc-20160816; b=ILMGUy0dIMvDRERHRiAl9c0UJ5jFvUc2uof25y8I83RpcSO1hm6yuQQSD8Qe8aTAOp WGOyV5CYBWtOfmucmhMk19iTg2S8YWloHwKN+1etf1s3hQod7r+mxuxplciRyqR8qSo2 qFI/8J07iiLnXBURLxv6TqkBa9jX7Iqz1y+XD8Np7NUufoJZXpTUt75PxoWqZ7sE92mo u7v8NBGTktFG2l4oD9MDsFUKqBocAdDXw6aj4LZ6CU7NHLL9S7d5rEmHbXDuu7lA+kwL QOjZ9i4w+J2DDeK/YN7H2uusHaqnCMXf0LuGlaePpqmPNZOCRIW4xa+8UkOaUhq7GLcY c3Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=euhjRyQ0dvhOzaWisAQrBRgkNaU3wGFLRW2qXQGz1q8=; b=F29quHRizn/CVO8xP8FTIZ+GY4mjFhxp5ZiNbJJsj3pEAoJU9UiYKm7JvRTDgRW4V0 CTuljj5L3by4WP8CHh8wMoHvKnB66aawBQQbECtdVICiYIjvuOGX6gpnsWpdtzY1B9J8 fhaQCVJJwuTf3PamQCQf48ZcCrMBDXVdsGkz5ri9g8Bnccz/oyVEOLYX9lB20z0w/pYO 1caqnAWa4M5PR/gqevb0o5Nl0sQk3SH6PClOJiQ8O4kFRhOzCEaEdL7yf/1th8SarZja aNSrBtNGvmDMezaSq/maFe1YWkImpQOuaKrFyoDhQLzBw8Di3ZUEsgSPsILLN1XuxkHF CG7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IxZPnAMq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si18188212pfi.316.2021.09.26.11.58.03; Sun, 26 Sep 2021 11:58:16 -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=@gmail.com header.s=20210112 header.b=IxZPnAMq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbhIZS5r (ORCPT + 99 others); Sun, 26 Sep 2021 14:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbhIZS5r (ORCPT ); Sun, 26 Sep 2021 14:57:47 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72BE5C061570 for ; Sun, 26 Sep 2021 11:56:10 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id g8so59622427edt.7 for ; Sun, 26 Sep 2021 11:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=euhjRyQ0dvhOzaWisAQrBRgkNaU3wGFLRW2qXQGz1q8=; b=IxZPnAMq/V0yqSjNHnrnmPO58IzCuok1uPDSKG7Gqv7WODWcY1/mqLEBY8qhWMVLoj 20PkSsmW5mt0Zq1gjPxWRAnR55SQtyq5/b6NU1W7RSqqU94NjHQhpyJruyKgN7Hg1KI6 V3E/kDJ31FJNtTvyyAvQpC0d+dwPO5fa1MTE7cIL+ML0LsKZdYQtvnLame7E+GK360Eo 4NK8AAH59aDI9ZpWZFNEaDplCStGbvxRyy/Yg39dAmLbQbscLt7VSlnCtTBfTCGbLR9G Vx6S34wa+krhh3zIvJm3PhdnuoAp6GO0D6RY5wIRAwTHondg4rtHTzF2I2O0Qf9WT9+1 5hXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=euhjRyQ0dvhOzaWisAQrBRgkNaU3wGFLRW2qXQGz1q8=; b=vUBlC/M5vQkRpMpBITZdBtcwMuRNT8SXkX0MleUp0gtJH/LIgXg2KEoJwPNrP9rh3t 3y1Ou+Ao+K5mAG89BY9E7KtpD4Eg2+UielIHYMME8KzENdhdhGIRQe66P0LA7uUwfNy1 Vv8dC9jo4uxdXL+89reth3x9vtM5enCr0XwByKE47P1Vsz3JQqZ7lVMaCIrVdzXPa60V WsBTGnIwoNDIPOVT3T0CtYgP4bgrWAhCbJkYE3s36M+Xw8S02MyYvQLKxwaSH2Aob7E1 fvEGgsr38W2R7edJl0KVQzu1geZBJoIkKRTLGlXITIFtGxx7EsSwS3dCwJTjgROjSlJD 8qCg== X-Gm-Message-State: AOAM5332GEGONrBDuwYIq/UyCMU8GNx7Umwkx1jWBuikyuJHoyJXkFMa smVO0uUx2ttyQu+BiqUQfaueGFr81QR1q7jZsxg= X-Received: by 2002:a17:906:7208:: with SMTP id m8mr22939415ejk.82.1632682568970; Sun, 26 Sep 2021 11:56:08 -0700 (PDT) MIME-Version: 1.0 References: <20210925032951.6767-1-rdunlap@infradead.org> In-Reply-To: <20210925032951.6767-1-rdunlap@infradead.org> From: Max Filippov Date: Sun, 26 Sep 2021 11:55:57 -0700 Message-ID: Subject: Re: [RFC PATCH] xtensa: setup: use CONFIG_USE_OF instead of CONFIG_OF To: Randy Dunlap Cc: LKML , Chris Zankel , "open list:TENSILICA XTENSA PORT (xtensa)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Thanks. -- Max