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 C23ADC433F5 for ; Wed, 2 Feb 2022 23:16:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C80ED83904; Thu, 3 Feb 2022 00:16:53 +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="LmyxpAL8"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="CGxmSyq5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD61C83905; Thu, 3 Feb 2022 00:16:51 +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 BAAC883902 for ; Thu, 3 Feb 2022 00:16:48 +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 72CEC4E2006; Wed, 2 Feb 2022 23:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1643843807; bh=tGAOkkk1Zhmqz1r6dOnJBgI/rOLyNkt56IOA0T1K7fA=; h=From:To:Cc:Subject:Date; b=LmyxpAL8C0wq9IM97wq+v2BrFMK1I7qomOCYB+hlVufpxkd62HW6WjCLSC1XDRMq9 itikIRdIEPIDIk9e3vdXoA6ltHIkwOPBs8gvpveXpP60I6Xpv47Z8r6G0eYlobbI7p Dx8zj6ZH/MZrJmRpwjMHkAAwaGnf4lHczeP667N4= 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 KbNazkFmP0t3; Wed, 2 Feb 2022 23:16:46 +0000 (UTC) Received: from midas.localdomain (S0106788a2041785e.gv.shawcable.net [24.108.106.191]) by node.akkea.ca (Postfix) with ESMTPSA id A60444E2003; Wed, 2 Feb 2022 23:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1643843806; bh=tGAOkkk1Zhmqz1r6dOnJBgI/rOLyNkt56IOA0T1K7fA=; h=From:To:Cc:Subject:Date; b=CGxmSyq5qvCkp8sZvuSheyb+zo/OzvqoivArGFHavLIu+N64KB/heWN4GAg/qjU0z 5KGKnWK14L1FXcGkoQAO9X1p7t+1G+V6ftXCPImcPKwPZQen+3AGk6OUIiD24DtvLJ FBAasuR8m+SXnMhc2mOlHs1nLPQRtApyGY6vopWA= From: Angus Ainslie To: u-boot@lists.denx.de Cc: Simon Glass , kernel@puri.sm, Angus Ainslie Subject: [PATCH] core: devres: don't use devres code when CONFIG_DEVRES is not defined Date: Wed, 2 Feb 2022 15:16:36 -0800 Message-Id: <20220202231636.2081677-1-angus@akkea.ca> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Put guards around the devres code so that it isn't compiled during the SPL. Signed-off-by: Angus Ainslie --- drivers/core/devres.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/core/devres.c b/drivers/core/devres.c index 313ddc7089..92a237c64c 100644 --- a/drivers/core/devres.c +++ b/drivers/core/devres.c @@ -91,6 +91,7 @@ void *_devres_alloc(dr_release_t release, size_t size, gfp_t gfp) return dr->data; } +#if CONFIG_DEVRES void devres_free(void *res) { if (res) { @@ -257,7 +258,7 @@ void devres_get_stats(const struct udevice *dev, struct devres_stats *stats) } } -#endif +#endif /* CONFIG_DEBUG_DEVRES */ /* * Managed kmalloc/kfree @@ -292,3 +293,4 @@ void devm_kfree(struct udevice *dev, void *p) rc = devres_destroy(dev, devm_kmalloc_release, devm_kmalloc_match, p); assert_noisy(!rc); } +#endif /* CONFIG_DEVRES */ -- 2.25.1