lkml.org 
[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scripts: kconfig: implement a sort method
Felipe, All,

On 2017-04-12 10:49 +0300, Felipe Balbi spake thusly:
>
> Randy Dunlap <rdunlap@infradead.org> writes:
> > On 04/11/17 04:12, Felipe Balbi wrote:
> >> With a growing amount of Kernel configuration, it's
> >> getting ever more difficult to find anything on
> >> menuconfig. Because of that, implement mergesort for
> >> kconfig to make it a little easier for anybody
> >> building kernels.
> >
> > Search works for me, but I don't mind Sort either.
>
> yes, it works. It does a different thing, though. Here's what happens
> when I want to find DWC3:
>
> / DWC3 RET
>
> | Symbol: USB_DWC3 [=m] │
> │ Type : tristate │
> │ Prompt: DesignWare USB3 DRD Core Support │
> │ Location: │
> │ -> Device Drivers │
> │ (1) -> USB support (USB_SUPPORT [=y]) │
> │ Defined at drivers/usb/dwc3/Kconfig:1 │
> │ Depends on: USB_SUPPORT [=y] && (USB [=y] || USB_GADGET [=y]) && HAS_DMA │
> │ Selects: USB_XHCI_PLATFORM [=m] │
> │ │
> │ │
> │ Symbol: USB_DWC3_DUAL_ROLE [=n] │
> │ Type : boolean │
> │ Prompt: Dual Role mode │
> │ Location: │
> │ -> Device Drivers │
> │ -> USB support (USB_SUPPORT [=y]) │
> │ -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m]) │
> │ (2) -> DWC3 Mode Selection (<choice> [=y]) │
> │ Defined at drivers/usb/dwc3/Kconfig:41 │
> │ Depends on: <choice> && (USB [=y]=y || USB [=y]=USB_DWC3 [=m]) && (USB_G │
> │ │
> │ │
> │ Symbol: USB_DWC3_EXYNOS [=n] │
> │ Type : tristate │
> │ Prompt: Samsung Exynos Platform │
> │ Location: │
> │ -> Device Drivers │
> │ -> USB support (USB_SUPPORT [=y]) │
> │ (3) -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m]) │
> │ Defined at drivers/usb/dwc3/Kconfig:63 │
> │ Depends on: USB_SUPPORT [=y] && USB_DWC3 [=m] && (ARCH_EXYNOS || COMPILE │
> │ │
> │ │
> │ Symbol: USB_DWC3_GADGET [=y] │
> │ Type : boolean │
> │ Prompt: Gadget only mode │
> │ Location: │
> │ -> Device Drivers │
> │ -> USB support (USB_SUPPORT [=y]) │
> │ -> DesignWare USB3 DRD Core Support (USB_DWC3 [=m]) │
> │ (4) -> DWC3 Mode Selection (<choice> [=y]) │
> │ Defined at drivers/usb/dwc3/Kconfig:34 │
> │ Depends on: <choice> && (USB_GADGET [=y]=y || USB_GAD
>
> Now I know where DWC3 is defined, so I navigate to Device Driver, USB
> Support and search for DesignWare USB3 DRD Core Support:

Or you just press '3' (the number between parenthesis), and that will
take you directly there.

When you then exit, you're back top the search results.

> │ │ <M> USB Test and Measurement Class support │ │
[--SNIP unsorted menu--]
> │ │ < > USB LCD driver support │ │
>
> Compare that to the sorted view of this same entry:
>
> │ │ --- USB support │ │
[--SNIP sorted menu--]
> │ │ < > Support WUSB Cable Based Association (CBA) │ │
>
> much easier to find, don't you think?

Arguably, the order may also make sense, for example to "group" related
items. So, <Sort> should be a toggle, so that it is possible to go back
to the unsorted, original order, IMHO...

> > Any Help text for Sort? or is it obvious what it does? (no)
> wait, it's not obvious what "Sort" means?

I guess that what Randy said was that in this context, it is not more
obvious than Load or Save, and they are documented in the help (but it
is not obvious how to get the help).

For example, go on the "General setup" entry, but do not enter the menu.
Now, select Help: you'll get a bit of help on how to use menuconfig.

There, Load and Save are documented, in Alternate Configuration Files.

> > In an 80x25 terminal (window), the < Sort > option wraps around
> > past column 80.
> not what I see here [1]

I see the same as Randy here:

$ stty size
25 80

https://imgur.com/a/ku0sG

> > I haven't looked at the source code (lately), but I think that it
> > would OK to not have the (extra) spaces inside the <...> brackets.
> > I.e., instead of
> > │ <Select> < Exit > < Help > < Save > < Load > < Sort
> > >
> > just have
> > │ <Select> <Exit> <Help> <Save> <Load> <Sort>
> >
> > Or the <Select> does not need to be indented as much as it is.
> I changed that for this very reason

Or just always left-align the line, rather than center it?

> > And BTW, Yann made kconfig an orphan today. :(

Yes, I did a very bad job at being the maintainer over the past years,
so I could not really keep it any longer...

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

\
 
 \ /
  Last update: 2017-04-12 18:07    [W:0.071 / U:0.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site