Message ID | 20180126134356.9393-26-mario.six@gdsys.cc |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefan Roese |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zSgQn1bbBz9s7F for <incoming@patchwork.ozlabs.org>; Sat, 27 Jan 2018 00:55:27 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6CCC2C22580; Fri, 26 Jan 2018 13:52:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9264BC2256C; Fri, 26 Jan 2018 13:45:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 19E02C22548; Fri, 26 Jan 2018 13:45:10 +0000 (UTC) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.29]) by lists.denx.de (Postfix) with ESMTPS id 7FD1BC2251C for <u-boot@lists.denx.de>; Fri, 26 Jan 2018 13:45:05 +0000 (UTC) Received: from [80.151.34.241] (helo=bob3.testumgebung.local) by smtprelay02.ispgateway.de with esmtpa (Exim 4.89) (envelope-from <mario.six@gdsys.cc>) id 1ef4JY-0000Rh-Bq; Fri, 26 Jan 2018 14:45:08 +0100 From: Mario Six <mario.six@gdsys.cc> To: U-Boot Mailing List <u-boot@lists.denx.de>, Stefan Roese <sr@denx.de>, Masahiro Yamada <yamada.masahiro@socionext.com>, Simon Glass <sjg@chromium.org>, Marek Vasut <marek.vasut@gmail.com>, Patrice Chotard <patrice.chotard@st.com> Date: Fri, 26 Jan 2018 14:43:56 +0100 Message-Id: <20180126134356.9393-26-mario.six@gdsys.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126134356.9393-1-mario.six@gdsys.cc> References: <20180126134356.9393-1-mario.six@gdsys.cc> X-Df-Sender: bWFyaW8uc2l4QGdkc3lzLmNj Subject: [U-Boot] [PATCH v3 26/26] cfi_flash: Always define cfi_flash_num_flash_banks X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
[U-Boot,v3,01/26] cfi_flash: Fix space between function name and parenthesis
|
expand
|
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 347382f529..da44e6184e 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -91,6 +91,8 @@ static u16 cfi_flash_config_reg(int i) #if defined(CONFIG_SYS_MAX_FLASH_BANKS_DETECT) int cfi_flash_num_flash_banks = CONFIG_SYS_MAX_FLASH_BANKS_DETECT; +#else +int cfi_flash_num_flash_banks; #endif #ifdef CONFIG_CFI_FLASH /* for driver model */
The variable cfi_flash_num_flash_banks is defined iff CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used unconditionally in the function cfi_flash_init_dm. This leads to a undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT is not defined, but DM is enabled. Fix this by always defining the cfi_flash_num_flash_banks variable. Signed-off-by: Mario Six <mario.six@gdsys.cc> --- v2 -> v3: * Added proper commit message v1 -> v2: None --- drivers/mtd/cfi_flash.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0