From: Pali =?utf-8?B?Um9ow6Fy?= Date: Thu, 4 Mar 2021 14:41:27 +0100 Subject: Dead code CONFIG_ARMADA_39X? In-Reply-To: <4dc1f4f5-e629-865f-3f3a-848770668286@denx.de> References: <20210303102131.3musuyaaepmivev7@pali> <4dc1f4f5-e629-865f-3f3a-848770668286@denx.de> Message-ID: <20210304134127.fc2ot4mcdmpvl4fy@pali> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 04 March 2021 14:29:46 Stefan Roese wrote: > On 03.03.21 11:21, Pali Roh?r wrote: > > Hello! > > > > I see in more U-Boot files check for ifdef CONFIG_ARMADA_39X but I do > > not see that CONFIG_ARMADA_39X could be defined in some header or board > > code. > > > > So does it mean that all code under ifdef CONFIG_ARMADA_39X is dead? Has > > U-Boot support for Marvell A39X SoC? > > > > If it is really dead code, should not be ifdef CONFIG_ARMADA_39X > > completely removed? > > Frankly, I don't remember the history here. Did you look into the git > history to see, where this Kconfig option was introduced? There is no Kconfig option for ARMADA_39X. Only C source files are checking if CONFIG_ARMADA_39X is defined or not. But there is no code which can define CONFIG_ARMADA_39X, neither header file nor Kconfig. That is suspicious for me. > It could very well be the case, that this was introduced "by accident" > by including some Marvell code without taking it out. AFAIK, we are not > supporting any Armada 39x in mainline right now. So it looks like that somebody introduced code #ifdef CONFIG_ARMADA_39X on more places "by accident". For example in commit edb470253346f4a882ba9e891c8b102ce388b9cc were added some these ifdefs and commit was authorized by you. So I thought that you would know more... So if mainline U-Boot does not support Armada 39x, does it make sense to remove all code hidden under CONFIG_ARMADA_39X? Following command could do it: git ls-tree -r --name-only HEAD | xargs unifdef -m -UCONFIG_ARMADA_39X