From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64D90C432BE for ; Sun, 29 Aug 2021 22:10:21 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 923E560F44 for ; Sun, 29 Aug 2021 22:10:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 923E560F44 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2AF382D92; Mon, 30 Aug 2021 00:10:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="CefMRkwC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE58082D92; Mon, 30 Aug 2021 00:10:16 +0200 (CEST) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0357782D88 for ; Mon, 30 Aug 2021 00:10:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72b.google.com with SMTP id m21so13602241qkm.13 for ; Sun, 29 Aug 2021 15:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OcNF6SQf+OBdOmckF9tfZPgUol3rMHtJZMBRbGZAxec=; b=CefMRkwC3QjUeb3DFMt51cqzSih4u7oRGtfUr9LGeD2u0qJlS8fWEbK2/N+HuMjnav IzfPetyXBFq5kMYrB4k1gyBdN6mB2GZ+8iUshAdileNC1FgXtMiNA5mcQCnNkvSsP8hy 2Wl6AvUu4SrqX3+SUMHoC3wPMs9bqymLY74cc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OcNF6SQf+OBdOmckF9tfZPgUol3rMHtJZMBRbGZAxec=; b=fFL2WlqB/Iqrm0HkEt5UURdOUjwGym1xpqu8SWh7kVV9fFLIek8xID/vy7/7pDbD76 MRCqOL/TnYyi7DX89EmbLjCCG+V4OlxK0HhCwwylDkIS88zIvHTJ8gfhoB6HP9Gvv67A WRcIUYFtYZbYzEfgnDv8lHnFAh5vek44gbSe0CoijUd9HQY428bH11ISBffdim5KCnQd h1cFdfZ7tBpNYz2v9U5ueh9FlAe+qqfUo0qmZ7eMG+NYvAXtgghg2kLz1IEmzeWbIMXu TtKPF0rklPUIXMP7bL1Y1osToUg7gsctlQWGYDWcddx4djyyOrIDdJbTlDoQDjw/pQCq HsUg== X-Gm-Message-State: AOAM5322Ho64D1kTW4/25whQHhU2VNP6hOKoQJrSZkrBzXaOxyG+4IS7 ky+IOKZ8Te9t3IwYwiCP98ObEQ== X-Google-Smtp-Source: ABdhPJxrgfeF0GLguWSUah8OutUswSa25CzPU8kzyaBrRaC3guXz890bN0F7aPC48m95zEtecHkvAQ== X-Received: by 2002:a05:620a:2089:: with SMTP id e9mr19120949qka.298.1630275010617; Sun, 29 Aug 2021 15:10:10 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-8054-417e-d97b-7576.res6.spectrum.com. [2603:6081:7b01:cbda:8054:417e:d97b:7576]) by smtp.gmail.com with ESMTPSA id s204sm9847591qke.109.2021.08.29.15.10.09 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Aug 2021 15:10:09 -0700 (PDT) Date: Sun, 29 Aug 2021 18:10:08 -0400 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Simon Glass , Simon Goldschmidt Subject: Re: [PATCH 02/14] lmb: Use CONFIG_LMB_*_REGIONS only if they are defined Message-ID: <20210829221008.GK858@bill-the-cat> References: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> <20210815181314.132330-2-marek.vasut+renesas@gmail.com> <20210815194721.GN858@bill-the-cat> <20210829180202.GG858@bill-the-cat> <20210829193239.GH858@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o4cQPHEr/wQM7oU7" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --o4cQPHEr/wQM7oU7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 29, 2021 at 11:47:58PM +0200, Marek Vasut wrote: > On 8/29/21 9:32 PM, Tom Rini wrote: > > On Sun, Aug 29, 2021 at 09:24:46PM +0200, Marek Vasut wrote: > > > On 8/29/21 8:02 PM, Tom Rini wrote: > > > > On Sun, Aug 29, 2021 at 06:26:23PM +0200, Marek Vasut wrote: > > > > > On 8/15/21 9:47 PM, Tom Rini wrote: > > > > > > On Sun, Aug 15, 2021 at 08:13:02PM +0200, Marek Vasut wrote: > > > > > >=20 > > > > > > > The CONFIG_LMB_*_REGIONS are defined only if CONFIG_LMB is en= abled, > > > > > > > protect access to those two config options to avoid undefined= macro > > > > > > > errors. > > > > > > >=20 > > > > > > > Signed-off-by: Marek Vasut > > > > > > > Cc: Simon Glass > > > > > > > Cc: Simon Goldschmidt > > > > > > > Cc: Tom Rini > > > > > > > --- > > > > > > > include/lmb.h | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > >=20 > > > > > > > diff --git a/include/lmb.h b/include/lmb.h > > > > > > > index 3c4afdf9f0..fa1474a360 100644 > > > > > > > --- a/include/lmb.h > > > > > > > +++ b/include/lmb.h > > > > > > > @@ -44,7 +44,7 @@ struct lmb_property { > > > > > > > struct lmb_region { > > > > > > > unsigned long cnt; > > > > > > > unsigned long max; > > > > > > > -#if IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) > > > > > > > +#if IS_ENABLED(CONFIG_LMB) && IS_ENABLED(CONFIG_LMB_USE_MAX_= REGIONS) > > > >=20 > > > > This doesn't make sense to me, still. You cannot enable > > > > CONFIG_LMB_USE_MAX_REGIONS without CONFIG_LMB as the former depends= on > > > > the latter in Kconfig. > > > >=20 > > > > > > > struct lmb_property region[CONFIG_LMB_MAX_REGIONS]; > > > > > > > #else > > > > > > > struct lmb_property *region; > > > > > > > @@ -67,7 +67,7 @@ struct lmb_region { > > > > > > > struct lmb { > > > > > > > struct lmb_region memory; > > > > > > > struct lmb_region reserved; > > > > > > > -#if !IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) > > > > > > > +#if IS_ENABLED(CONFIG_LMB) && !IS_ENABLED(CONFIG_LMB_USE_MAX= _REGIONS) > > > > > > > struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REG= IONS]; > > > > > > > struct lmb_property reserved_regions[CONFIG_LMB_RESERVED= _REGIONS]; > > > > > > > #endif > > > > > >=20 > > > > > > We shouldn't need this at all. LMB and LMB_USE_MAX_REGIONS are= both in > > > > > > Kconfig and have the dependencies expressed that way. > > > > >=20 > > > > > However, CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGION= S may be > > > > > undefined if CONFIG_LMB and !CONFIG_LMB_USE_MAX_REGIONS . They ar= e four > > > > > different symbols. > > > >=20 > > > > I'm still not seeing it, sorry. Is there some case where we're try= ing > > > > to access a struct lmb without CONFIG_LMB enabled? > > > >=20 > > >=20 > > > See build failure > > > https://source.denx.de/u-boot/custodians/u-boot-sh/-/jobs/315331 > >=20 > > Ah, progress. Drop from since we already have a > > forward declaration of struct lmb? But it's not failing without this > > series too, so what's changing? >=20 > See 01/14 in this series. Ah, so drop 1/14 then. --=20 Tom --o4cQPHEr/wQM7oU7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEsBbgACgkQFHw5/5Y0 tywL/Av9GEHKLqKqjLT7MBwJGK8t97M1J+ToVuxfNLLpADgVkQW2Zaqxw5+93JJD n+uYh8m2a/etG/SYZRSM3VeBvQ5P6JD7+ByJF93tEAh6RUXeNuYFprcuY1J2rrJk AzpoVoA/TN3n6/zr5SVUHaFvzbG14b2MHqvrILTLNOXAshIZD7x7BtIgRh22mY8G 4rwzGaOvbPwK5Tej7pn9lqerA5DTfu21rBECrulsfl7AYi2EzgHP1J8TOGG3o4B2 UBvgxT0K1WJ/fDax+aeBg3QTZ2PAryEQueWiTv+QEmjdESIaG/Zdb0Av6tH36kVy kO0OuAbk3S6708uE/uWf4ZjXPNdhlgWyLnIr6uqrmf4wXB2ZNEw30laYkXXxWM5+ 9sgDu6j6uk6FtNPQzw7Dp9rSBEaIyNRNI/2bTA4+lqqrYd9gJDFAe1vNbTKgretK no3S5dg8i46ZVSYs4xWjOE9adrKc5CRg3FRc9XOGe1d2MZlXsJfDlIsSxN/2/w6U BmcFqT+v =wCN1 -----END PGP SIGNATURE----- --o4cQPHEr/wQM7oU7--