linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Chris Zankel <chris@zankel.net>,
	"open list:TENSILICA XTENSA PORT (xtensa)" 
	<linux-xtensa@linux-xtensa.org>
Subject: Re: [RFC PATCH] xtensa: setup: use CONFIG_USE_OF instead of CONFIG_OF
Date: Sun, 26 Sep 2021 14:48:31 -0700	[thread overview]
Message-ID: <2cc9c34f-e166-51bc-eedc-e4086753c011@infradead.org> (raw)
In-Reply-To: <CAMo8Bf+TE4PX5PBD8bSsF6Cx+LGunExjuB3xXyyRvwzC0iHMDA@mail.gmail.com>

On 9/26/21 11:55 AM, Max Filippov wrote:
> Hi Randy,
> 
> On Fri, Sep 24, 2021 at 8:29 PM Randy Dunlap <rdunlap@infradead.org> 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 <rdunlap@infradead.org>
>> Cc: Max Filippov <jcmvbkbc@gmail.com>
>> Cc: Chris Zankel <chris@zankel.net>
>> 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

      reply	other threads:[~2021-09-26 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  3:29 [RFC PATCH] xtensa: setup: use CONFIG_USE_OF instead of CONFIG_OF Randy Dunlap
2021-09-26 18:55 ` Max Filippov
2021-09-26 21:48   ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cc9c34f-e166-51bc-eedc-e4086753c011@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=chris@zankel.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).