Re: [PATCH] kdb: Refactor kdb_defcmd implementation

2021-03-22 Thread Sumit Garg
On Fri, 19 Mar 2021 at 22:47, Daniel Thompson wrote: > > On Tue, Mar 09, 2021 at 05:47:47PM +0530, Sumit Garg wrote: > > Switch to use kdbtab_t instead of separate struct defcmd_set since > > now we have kdb_register_table() to register pre-allocated kdb commands. > > This needs rewriting. I've be

Re: [PATCH] kdb: Refactor kdb_defcmd implementation

2021-03-19 Thread Daniel Thompson
On Tue, Mar 09, 2021 at 05:47:47PM +0530, Sumit Garg wrote: > Switch to use kdbtab_t instead of separate struct defcmd_set since > now we have kdb_register_table() to register pre-allocated kdb commands. This needs rewriting. I've been struggling for some time to figure out what it actually means

[PATCH] kdb: Refactor kdb_defcmd implementation

2021-03-09 Thread Sumit Garg
Switch to use kdbtab_t instead of separate struct defcmd_set since now we have kdb_register_table() to register pre-allocated kdb commands. Also, switch to use a linked list for sub-commands instead of dynamic array which makes traversing the sub-commands list simpler. Suggested-by: Daniel Thomps