
Hi Robert,
On 30 April 2016 at 00:12, Robert P. J. Day rpjday@crashcourse.ca wrote:
puzzled by this in cmd/fdt.c:
/* Temporary #ifdef - some archs don't have fdt_blob yet */ #ifdef CONFIG_OF_CONTROL if (argc && !strcmp(*argv, "-c")) { control = 1; argc--; argv++; } #endif
why is that #ifdef described as temporary? first, it seems that all arch-specific global_data.h files include <asm-generic/global_data.h>, where struct global_data contains an unconditional:
const void *fdt_blob; /* Our device tree, NULL if none */
so all arches at least have access to that struct member, even if they don't currently support OF_CONTROL.
more to the point, even if all arches *did* (or do?) support that option, would that #ifdef suddenly disappear? isn't CONFIG_OF_CONTROL a perfectly reasonable option for a developer to *choose* whether they want or not?
what's "temporary" about that #ifdef?
From what I can see in the history, v2013.01 did not include generic
global_data, and the patch was likely to avoid build errors when submitted. That #ifdef can be removed now.
Regards, Simon