From patchwork Mon Feb 7 12:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1589272 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=ZoJjpa2g; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JslqV3J7Jz9s5B for ; Mon, 7 Feb 2022 23:31:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CE25183CF2; Mon, 7 Feb 2022 13:30:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="ZoJjpa2g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C027A83CF8; Mon, 7 Feb 2022 13:30:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 9638B83C92 for ; Mon, 7 Feb 2022 13:30:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x636.google.com with SMTP id s13so41564298ejy.3 for ; Mon, 07 Feb 2022 04:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Zp9hDAQw04gtaUo7wDv826Ay2Pe5pJ4EIWIQ72FGXyw=; b=ZoJjpa2gDyr904xrC0sYEbOBNhep0dUizUqAmax0UJ1YMos6WaVgt6CrlYHVwByZze g72NVIbcngCaBoLwXeSGiPms19s0ehH0AoADnEGxITAe2vSvc1rCqHuRd7VsxHIWOhiV LgOofB13AHy6e77VlCJiYMlqFnCL0Nf4X3y+HDPTsR58KsMxQJji5LvYYrtLZtC1Ewkz +wWaAilYZNqYHjpTx13Me3dkRDipoJqtW+/yMy9YEvHfG2DWe1AV4rQHWz8SkLpw2RIU noHdFN4e5gZxZP7qJFCxZCg59/BcPYWRlWWLGj6pqP4q2X0qKQkhyIFvFuQos1STp2IG T+1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=Zp9hDAQw04gtaUo7wDv826Ay2Pe5pJ4EIWIQ72FGXyw=; b=VWlRFsPQqJb1q7MQDXakoFT72Jzni/wNUY68MBbbkRAwJYjxqK/bcTekP2g/ORw94j bvx/9mAHJj42YH6u2nrRTXCSmcT5+7eTIH4g6nrLrk0BOMsIv6f0XFsHCB0ipen6FvdG jGHcaiyv7GBInAaqK2nVoRqRZa2aWEgJqsW8RB8QKDFDxxRzx95VvCSaoyppWg+xmiEr lLTIajq5NJvd5dOfGlFyAKa6Uu7G3SRJYYfhFa0KLT0hFvpKyo445tqpGA3gBtBYWuIS oR9GW+S/sZYj0dxJKjzak8uXRqvQ4MoswDKzSDlDpBEEQXn4a54H54MRWK3MTtW9GZx+ PuuQ== X-Gm-Message-State: AOAM532aR5U0t3jiGAd4twKiQaqPY1FWECbRZlzUiCmetD1ags4Io84g ttBQj9mcpiyPpak/ITflaf710bbpYjNCdg== X-Google-Smtp-Source: ABdhPJzYnRaYBCBC/Ny0HCxU9fvhKC8496L2G37L6w88cBPNXf5meXPOX1zqA4momRstT5NELjTYfQ== X-Received: by 2002:a17:907:97cd:: with SMTP id js13mr9930260ejc.41.1644237046060; Mon, 07 Feb 2022 04:30:46 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id d3sm5149611edq.13.2022.02.07.04.30.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Feb 2022 04:30:45 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma , Alexandru Gagniuc , Heinrich Schuchardt , Ilias Apalodimas , Marek Vasut , Patrick Delaunay , Simon Glass Subject: [PATCH v2 1/3] lmb: Fix lmb property's defination under struct lmb Date: Mon, 7 Feb 2022 13:30:35 +0100 Message-Id: <3039021757d837a192f7b5f4148dc5ba8589e9a3.1644237034.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 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 From: Ashok Reddy Soma Under struct lmb {} the lmb property's should be defined only if CONFIG_LMB_MEMORY_REGIONS is defined. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- Changes in v2: - Also fix lib/lmb.c include/lmb.h | 2 +- lib/lmb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index ab277ca80004..1476d78c2823 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -68,7 +68,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_MEMORY_REGIONS) struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS]; struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; #endif diff --git a/lib/lmb.c b/lib/lmb.c index f72996a4248e..f21fe672ae96 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -108,7 +108,7 @@ void lmb_init(struct lmb *lmb) #if IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) lmb->memory.max = CONFIG_LMB_MAX_REGIONS; lmb->reserved.max = CONFIG_LMB_MAX_REGIONS; -#else +#elif IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) lmb->memory.max = CONFIG_LMB_MEMORY_REGIONS; lmb->reserved.max = CONFIG_LMB_RESERVED_REGIONS; lmb->memory.region = lmb->memory_regions;