public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: Dead code CONFIG_ARMADA_39X?
Date: Thu, 4 Mar 2021 14:41:27 +0100	[thread overview]
Message-ID: <20210304134127.fc2ot4mcdmpvl4fy@pali> (raw)
In-Reply-To: <4dc1f4f5-e629-865f-3f3a-848770668286@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

  reply	other threads:[~2021-03-04 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 10:21 Dead code CONFIG_ARMADA_39X? Pali Rohár
2021-03-04 13:29 ` Stefan Roese
2021-03-04 13:41   ` Pali Rohár [this message]
2021-03-04 13:50     ` Stefan Roese
2021-03-04 13:58       ` Pali Rohár
2021-03-04 14:02         ` Stefan Roese
2021-03-05 14:52           ` [PATCH] arm: mvebu: a38x: Remove dead code ARMADA_39X Pali Rohár
2021-03-08 14:35             ` Stefan Roese
2021-03-12  8:55             ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210304134127.fc2ot4mcdmpvl4fy@pali \
    --to=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox