Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3B86C433F5 for ; Sat, 19 Mar 2022 14:15:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D90DC837E3; Sat, 19 Mar 2022 15:15:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="asLjPYJr"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="asLjPYJr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 55BCD838B9; Sat, 19 Mar 2022 15:15:34 +0100 (CET) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C640D83689 for ; Sat, 19 Mar 2022 15:15:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id D6B484E200C; Sat, 19 Mar 2022 14:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1647699328; bh=InUhle3igz8LjzwBAS0ufK5bkPki1S+BKkhW8LpbJbQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=asLjPYJrxwB5JuSvVCZf1QQvZvUcvjqTg6RvaCWQM4OB/u/tYj11YfmYVoHkBcE9S Gw4azjG85qUsHASaoZrBZhPghRVv21ERbxmGDcuI0NsQDXmZ7Eh0dnX3QXVNRtpKBc BNA6ChtCD56bE2jzAV/GulXsYpagxTvDpw7wSJvY= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5skJNKc98e9v; Sat, 19 Mar 2022 14:15:28 +0000 (UTC) Received: from www.akkea.ca (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 36D664E2006; Sat, 19 Mar 2022 14:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1647699328; bh=InUhle3igz8LjzwBAS0ufK5bkPki1S+BKkhW8LpbJbQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=asLjPYJrxwB5JuSvVCZf1QQvZvUcvjqTg6RvaCWQM4OB/u/tYj11YfmYVoHkBcE9S Gw4azjG85qUsHASaoZrBZhPghRVv21ERbxmGDcuI0NsQDXmZ7Eh0dnX3QXVNRtpKBc BNA6ChtCD56bE2jzAV/GulXsYpagxTvDpw7wSJvY= MIME-Version: 1.0 Date: Sat, 19 Mar 2022 07:15:28 -0700 From: Angus Ainslie To: Simon Glass Cc: U-Boot Mailing List , kernel@puri.sm, dl-uboot-imx Subject: Re: [PATCH v2] core: devres: optionally build devres into the SPL In-Reply-To: References: <20220228203307.206022-1-angus@akkea.ca> Message-ID: <9e3e1e33c0eb30165603757b7ea67adf@akkea.ca> X-Sender: angus@akkea.ca User-Agent: Roundcube Webmail/1.3.17 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Hi Simon, On 2022-03-18 15:41, Simon Glass wrote: > Hi Angus, > > On Tue, 1 Mar 2022 at 07:58, Simon Glass wrote: >> >> On Mon, 28 Feb 2022 at 13:33, Angus Ainslie wrote: >> > >> > Add a CONFIG_SPL_DEVRES option >> > >> > Signed-off-by: Angus Ainslie >> > --- >> > >> > Changes since v1: >> > >> > Instead of gaurding the source add an SPL_DEVRES option >> > >> > drivers/core/Kconfig | 13 +++++++++++++ >> > drivers/core/Makefile | 2 +- >> > 2 files changed, 14 insertions(+), 1 deletion(-) > > Unfortunately this break the tests, e.g. building sandbox_spl - can > you please take a look? > > sandbox_spl: +make O=build-sandbox_spl -s sandbox_spl_defconfig > +make O=build-sandbox_spl -s -j4 > /usr/bin/ld: /tmp/ccsYY64W.ltrans0.ltrans.o: in function > `device_unbind': > build-sandbox_spl/spl/../../drivers/core/device-remove.c:120: > undefined reference to `devres_release_all' > /usr/bin/ld: /tmp/ccsYY64W.ltrans0.ltrans.o: in function `device_free': > build-sandbox_spl/spl/../../drivers/core/device-remove.c:157: > undefined reference to `devres_release_probe' > collect2: error: ld returned 1 exit status > make[3]: *** [../scripts/Makefile.spl:509: spl/u-boot-spl] Error 1 > make[2]: *** [Makefile:2094: spl/u-boot-spl] Error 2 > make[1]: *** [Makefile:177: sub-make] Error 2 > Exit code: 2 > So the problem here is that CONFIG_DM_DEVICE_REMOVE can be defined without CONFIG_DEVRES being defined. Is there a way to make DM_DEVICE_REMOVE dependant on DEVRES or do I need to add "&& CONFIG_IS_ENABLED(DEVRES)" everywhere that I find "CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)" ? Thanks Angus > Regards, > Simon