Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-28 Thread Randy Dunlap
On 3/28/21 3:32 AM, Joe Perches wrote: > On Sat, 2021-03-27 at 15:26 -0700, Randy Dunlap wrote: >> On 3/27/21 3:12 PM, Mihai Moldovan wrote: >>> * On 3/27/21 4:58 PM, Randy Dunlap wrote: On 3/27/21 5:01 AM, Mihai Moldovan wrote: > + if ((-1 == index) && (index == match_start))

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-28 Thread Joe Perches
On Sun, 2021-03-28 at 11:27 +0200, Mihai Moldovan wrote: > * On 3/27/21 11:26 PM, Randy Dunlap wrote: > > There is a test for it in checkpatch.pl but I also used checkpatch.pl > > without it complaining, so I don't know what it takes to make the script > > complain. > > > > if

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-28 Thread Joe Perches
On Sat, 2021-03-27 at 15:26 -0700, Randy Dunlap wrote: > On 3/27/21 3:12 PM, Mihai Moldovan wrote: > > * On 3/27/21 4:58 PM, Randy Dunlap wrote: > > > On 3/27/21 5:01 AM, Mihai Moldovan wrote: > > > > + if ((-1 == index) && (index == match_start)) > > > > > > checkpatch doesn't compl

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-28 Thread Mihai Moldovan
* On 3/27/21 11:26 PM, Randy Dunlap wrote: > There is a test for it in checkpatch.pl but I also used checkpatch.pl > without it complaining, so I don't know what it takes to make the script > complain. > > if ($lead !~ /(?:$Operators|\.)\s*$/ && > $t

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-27 Thread Randy Dunlap
On 3/27/21 3:12 PM, Mihai Moldovan wrote: > * On 3/27/21 4:58 PM, Randy Dunlap wrote: >> On 3/27/21 5:01 AM, Mihai Moldovan wrote: >>> + if ((-1 == index) && (index == match_start)) >> >> checkpatch doesn't complain about this (and I wonder how it's missed), but >> kernel style is (mostly

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-27 Thread Mihai Moldovan
* On 3/27/21 4:58 PM, Randy Dunlap wrote: > On 3/27/21 5:01 AM, Mihai Moldovan wrote: >> +if ((-1 == index) && (index == match_start)) > > checkpatch doesn't complain about this (and I wonder how it's missed), but > kernel style is (mostly) "constant goes on right hand side of comparis

Re: [PATCH] kconfig: nconf: stop endless search-up loops

2021-03-27 Thread Randy Dunlap
On 3/27/21 5:01 AM, Mihai Moldovan wrote: > If the user selects the very first entry in a page and performs a > search-up operation (e.g., via [/][a][Up Arrow]), nconf will never > terminate searching the page. > > The reason is that in this case, the starting point will be set to -1, > which is t