public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Eugeniu Rosca <roscaeugeniu@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Ulf Magnusson <ulfalizer@gmail.com>,
	Petr Vorel <petr.vorel@gmail.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Paul Bolle <pebolle@tiscali.nl>
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>,
	Eugeniu Rosca <rosca.eugeniu@gmail.com>,
	linux-kbuild@vger.kernel.org
Subject: [PATCH v3 0/3] Print reverse dependencies in groups
Date: Sat, 17 Feb 2018 03:05:20 +0100	[thread overview]
Message-ID: <cover.1518826148.git.erosca@de.adit-jv.com> (raw)

From: Eugeniu Rosca <erosca@de.adit-jv.com>

Hello Masahiro, Ulf, Petr and all,

Here are a few words about the motivation behind this patch series.

First, the reason I got in touch with Kconfig is to optimize the
configuration of automotive kernels, as well as to align the kernel
configuration across a number of platforms. In the context of kernel
optimization, one of the primary goals is to filter out any features
that are not mentioned in the platform requirements.

Surprisingly or not, disabling a CONFIG option (which is assumed to
be unneeded) may be not so trivial. Especially it is not trivial, when
this CONFIG option is selected by a dozen of other configs. Before the
moment commit 1ccb27143360 ("kconfig: make "Selected by:" and
"Implied by:" readable") was submitted by Petr and eventually popped
up in v4.16-rc1, it was an absolute pain to break down the "Selected by"
reverse dependency expression in order to identify all those configs
which select (IOW *do not allow disabling*) a certain feature (assumed
to be not needed).

This patch series tries to make one step further and puts at users'
fingertips the revdep top level OR sub-expressions grouped/clustered by
the tristate value they evaluate to. This should allow the users to
directly concentrate on and tackle the active reverse dependencies,
which imho are the only ones that matter for a given ARCH and for a
given defconfig (nevertheless we still print all of them).

Changes v2->v3:
- Switch from reverse dependencies prefixed by their tristate value to
  reverse dependencies grouped by the tristate value they evaluate to.
- Skip printing "{Selected,Implied} by [y|m|n]:" if there are no top
  level OR tokens/sub-expressions that evaluate to y|m|n (suggested
  by Petr).
- Use [1] as template for updating the interface/prototype of
  __expr_print() (suggested by Ulf).

Changes v1->v2:
- Don't skip the =n reverse dependency OR tokens, since some users might
  still need this information (suggested by Ulf).
- Instead of using "Selected by" for active tokens only, use it for all
  OR tokens, but specify the tristate value of each token as prefix
  (suggested by Masahiro).

[1] https://marc.info/?l=linux-kbuild&m=151777006005199&w=4

Eugeniu Rosca (3):
  kconfig: Print reverse dependencies on new line consistently
  kconfig: Prepare for printing reverse dependencies in groups
  kconfig: Print reverse dependencies in groups

 scripts/kconfig/expr.c      | 118 ++++++++++++++++++++++++++++++++++++++------
 scripts/kconfig/expr.h      |  11 ++++-
 scripts/kconfig/lkc_proto.h |   1 +
 scripts/kconfig/menu.c      |  37 ++++++++++----
 4 files changed, 140 insertions(+), 27 deletions(-)

-- 
2.16.1


             reply	other threads:[~2018-02-17  2:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17  2:05 Eugeniu Rosca [this message]
2018-02-17  2:05 ` [PATCH v3 1/3] kconfig: Print reverse dependencies on new line consistently Eugeniu Rosca
2018-02-17 16:39   ` Ulf Magnusson
2018-02-17  2:05 ` [PATCH v3 2/3] kconfig: Prepare for printing reverse dependencies in groups Eugeniu Rosca
2018-02-17 16:44   ` Ulf Magnusson
2018-02-17  2:05 ` [PATCH v3 3/3] kconfig: Print " Eugeniu Rosca
2018-02-17 16:55   ` Ulf Magnusson
2018-02-18 11:07     ` Eugeniu Rosca
2018-02-18 13:02       ` Ulf Magnusson
2018-02-18 13:19         ` Ulf Magnusson
2018-02-18 13:35           ` Ulf Magnusson
2018-02-18 13:40             ` Ulf Magnusson
2018-02-18 21:05               ` Eugeniu Rosca

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=cover.1518826148.git.erosca@de.adit-jv.com \
    --to=roscaeugeniu@gmail.com \
    --cc=erosca@de.adit-jv.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=pebolle@tiscali.nl \
    --cc=petr.vorel@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=rosca.eugeniu@gmail.com \
    --cc=ulfalizer@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /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