2018-01-16 8:09 GMT+09:00 Petr Vorel <petr.vorel@xxxxxxxxx>: > rev_dep expressions can get rather unwieldy, especially if a symbol is > selected by more than a handful of other symbols. I.e. it's possible to > have near endless expressions like: > A && B && !C || D || F && (G || H) || [...] > > Chop these expressions into actually readable chunks: > - A && B && !C > - D > - F && (G || H) > - [...] > > I.e. transform the top level OR tokens into newlines and prepend each > line with a minus. This makes the "Selected by:" blurb much easier to > read. For consistency the same is done for "Depends on:" although the > problem isn't that bad for it. This is done only if there is more than > one top level OR. > > This also prevents trimming too long lines. > > Based on idea from Paul Bolle. > > Reported-by: Paul Bolle <pebolle@xxxxxxxxxx> > Signed-off-by: Petr Vorel <petr.vorel@xxxxxxxxx> > --- > Tested on search USB and General setup -> Kernel compression mode (Gzip) -> Help. > > Changes v3->v4: > * Add split also for "Depends on:". This is done for consistency (reported > by Masahiro Yamada). I didn't consider other symbols which call expr_gstr_print() > as reasonable candidates (i.e. "Implies:" and "Range : "). > * Add new line and hyphen only when there are more top level OR than one. > --- How much did you check the call graph of expr_print()? This function is called from various places. Probably, the format will be broken here are there. For example, here is an example of breakage. -----------------(test case)------------- config FOO bool default y select BAR config BAR bool "foo" depends on BAZ || QUX -----------------(test case end)---------- Without your patch, $ make alldefconfig scripts/kconfig/conf --alldefconfig Kconfig warning: (FOO) selects BAR which has unmet direct dependencies (BAZ || QUX) # # configuration written to .config # Then, with your patch, $ make alldefconfig scripts/kconfig/conf --alldefconfig Kconfig warning: (FOO) selects BAR which has unmet direct dependencies (BAZ - QUX) # # configuration written to .config # One more thing. This patch improves the readability of "selected by" and "implied by", but it is questionable for "depends on". Depends on: - BAR [=y] - BAZ [=y] ... means "depends on BAR && BAZ", but it might be confusing with depends on BAR depends on BAZ ... which is equivalent to "depends on BAR || BAZ". The idea seems useful, but I want to see this only where appropriate. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html