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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 1E6DEC432BE for ; Sun, 15 Aug 2021 18:17:23 +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 13A0B6120D for ; Sun, 15 Aug 2021 18:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 13A0B6120D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 3AED082C7F; Sun, 15 Aug 2021 20:17:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S6VCDkqI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 450F182CDA; Sun, 15 Aug 2021 20:17:17 +0200 (CEST) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 DABB781E47 for ; Sun, 15 Aug 2021 20:17:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@gmail.com Received: by mail-wr1-x42e.google.com with SMTP id x12so20500291wrr.11 for ; Sun, 15 Aug 2021 11:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8KIxZJDZ6BwbGkMnzffW4Mz1bAbc9ug3E6D+myZVZuI=; b=S6VCDkqIXlRLzDIVTST2D5gA8tZDOSKhfhe7Qp0kdHxWwpy5THHIVUJWxR37xzBk98 4zYpaJIvy07Fmek+nhVSs1TbbEMcaQXsRrBCbRAN6tcX8tJmOGB98Qk7gqnaGm0bhkHl HntSLngXqoLsLXQeLdjBNfyG/4BL89wNd54Y1mALQgq0R7MXcJE2rh7yvP54xB3tAkp4 4hWQiozVW6TKnSi1HutNZXaEgFhVVJpwil7CNY+nA+oH79ddJFR6C7wdE8YBVpNJshuK GUWBbPhJQsU1wswhr+QnovccDgDL1nrNDa929UGnP/HbMQzLYYW84r+/MwgxHGnlj+v4 sb2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8KIxZJDZ6BwbGkMnzffW4Mz1bAbc9ug3E6D+myZVZuI=; b=BZWc/pmSsJYRzzUGO3tEKYTZOsXWfN1IJ/3+Y+VQngxW0qULOy/h+Wd3qEDRCButaD Kcj4FDZRXdnbyTCfAqre5YwyeXOqaw9V6hiRXTVtHesK2YmbsxKSOmXAJm0t6khX7kR6 85Z06RZhp3Dewv9RrGwUB3zL56CgC3+JDO8Qf/V2gzIsu3mIbfwkPu77KOg0caGZ4Mj7 4Yj+nmxjz9nokDv5ajhgznNHMDxkU5UhlLOs8xWeyM6BdlKRKr3fvNOMmVVdavTCxiTX HDzWBAM9a/gowq0GswyJ3o7U3uCIXmvQJk9+rYbqPQ3o8Oks9cSpStCnBfpFTzHqldZf wG0w== X-Gm-Message-State: AOAM530QDMu0VsgCpg6Ax216xL+kKUQXJSUgwTlcBVG5BH475JpxyuVj iRjAHKbDuXV4Zf5fX2OlVzj984Ywu12M1w== X-Google-Smtp-Source: ABdhPJwBbZrI/h6nkNLQ9lqR/RclhyWwZrLbNZzfiZGFlIh8DXN7PaTKCJlDNVkOgKCDm3mxdkuzlw== X-Received: by 2002:adf:c549:: with SMTP id s9mr14538436wrf.344.1629051432516; Sun, 15 Aug 2021 11:17:12 -0700 (PDT) Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz. [89.176.112.137]) by smtp.gmail.com with ESMTPSA id i8sm5920343wrv.70.2021.08.15.11.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 11:17:12 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Glass , Simon Goldschmidt , Tom Rini Subject: [PATCH 02/14] lmb: Use CONFIG_LMB_*_REGIONS only if they are defined Date: Sun, 15 Aug 2021 20:13:02 +0200 Message-Id: <20210815181314.132330-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> References: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The CONFIG_LMB_*_REGIONS are defined only if CONFIG_LMB is enabled, protect access to those two config options to avoid undefined macro errors. 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(-) 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) 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_REGIONS]; struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; #endif -- 2.30.2