From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 4 Nov 2020 08:59:01 -0500 Subject: [PATCH 15/20] dm: core: Convert #ifdef to if() in root.c In-Reply-To: References: <20201003173142.3213123-1-sjg@chromium.org> <20201003173142.3213123-16-sjg@chromium.org> Message-ID: <20201104135901.GU5340@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Nov 04, 2020 at 01:55:50PM +0100, Michal Simek wrote: > Hi Simon, > > so 3. 10. 2020 v 19:35 odes?latel Simon Glass napsal: > > > > Convert a few conditions to use compile-time checks to reduce the number > > of build paths. > > > > Signed-off-by: Simon Glass > > --- > > > > drivers/core/root.c | 18 +++++++----------- > > 1 file changed, 7 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/core/root.c b/drivers/core/root.c > > index e8df5aebe84..5f10d7a39c7 100644 > > --- a/drivers/core/root.c > > +++ b/drivers/core/root.c > > @@ -50,7 +50,6 @@ void dm_fixup_for_gd_move(struct global_data *new_gd) > > } > > } > > > > -#if defined(CONFIG_NEEDS_MANUAL_RELOC) > > void fix_drivers(void) > > { > > struct driver *drv = > > @@ -129,8 +128,6 @@ void fix_devices(void) > > } > > } > > > > -#endif > > - > > int dm_init(bool of_live) > > { > > int ret; > > @@ -141,11 +138,11 @@ int dm_init(bool of_live) > > } > > INIT_LIST_HEAD(&DM_UCLASS_ROOT_NON_CONST); > > > > -#if defined(CONFIG_NEEDS_MANUAL_RELOC) > > - fix_drivers(); > > - fix_uclass(); > > - fix_devices(); > > -#endif > > + if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)) { > > + fix_drivers(); > > + fix_uclass(); > > + fix_devices(); > > + } > > This change is causing a hang on the Microblaze system. > CONFIG_NEEDS_MANUAL_RELOC is out of Kconfig that's why likely this > condition is not handled properly. Can you do the migration or should I? It looks like just adding to the top-level Kconfig and select'ing for microblaze/m68k. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: