From: Andy Shevchenko Date: Thu, 13 Aug 2020 14:14:11 +0300 Subject: [PATCH v4 1/9] CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined In-Reply-To: <20200813054800.469284-2-sr@denx.de> References: <20200813054800.469284-1-sr@denx.de> <20200813054800.469284-2-sr@denx.de> Message-ID: <20200813111411.GN1891694@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Aug 13, 2020 at 07:47:52AM +0200, Stefan Roese wrote: > Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") & > commit 999a772d9f24 ("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"), > CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default). > It makes no sense to still carry code that is guarded with > "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes > all these unreferenced code paths. ... > int pci_addr_cells, addr_cells, size_cells; > + struct bd_info *bd = gd->bd; > int cells_per_record; > const u32 *prop; > int len; > /* Add a region for our local memory */ > -#ifdef CONFIG_NR_DRAM_BANKS > - struct bd_info *bd = gd->bd; > - Can we leave assignment here? > if (!bd) > return; -- With Best Regards, Andy Shevchenko