[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/2] kconfig: 'if' and automatic submenu creation documentation
On Sun, Jan 14, 2018 at 10:00 PM, Sam Ravnborg <> wrote:
> Hi Ulf.
> On Sun, Jan 14, 2018 at 12:33:43PM +0100, Ulf Magnusson wrote:
>> These together should make the automatic submenu logic a lot clearer.
>> Ulf Magnusson (2):
>> kconfig: Document 'if' flattening logic
>> kconfig: Improve auto. menu documentation accuracy
>> scripts/kconfig/menu.c | 33 +++++++++++++++++++++++++++++----
>> 1 file changed, 29 insertions(+), 4 deletions(-)
> Very good with extra comments in menu_finalize.
> If you can mamage to explain the logic related to select
> then even better.

I added a short comment in, which is already in

* Handle selects and implies, which modify the
* dependencies of the selected/implied symbol
if (prop->type == P_SELECT) {

There's also

/* Reverse dependencies through being selected by other symbols */
struct expr_value rev_dep;

I guess it could be made more explicit. I don't want to heap on too
many patches at once though.

> While on the subject on improving readability, then
> menu_finalize would benefit from a split in a number of
> well named and well documented helper functions.
> It would be great if you could try this out.

I had a stab at it earlier, but never got done. I think the high-level
structure in Kconfiglib should work:

Hopefully I'll get back to it later once the current batch of patches
has been merged. I'm just happy to have to have less mystery code in
there for now. Definitely one of the more opaque parts of Kconfig.


 \ /
  Last update: 2018-01-15 12:01    [W:0.069 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site