[PATCH 1/1] riscv: add NULL check before calling strlen in the riscv cpu's get_desc()

2024-05-06 Thread Hanyuan Zhao
. Signed-off-by: Hanyuan Zhao --- drivers/cpu/riscv_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c index 9b1950efe0..d39a943cb8 100644 --- a/drivers/cpu/riscv_cpu.c +++ b/drivers/cpu/riscv_cpu.c @@ -24,7 +24,7 @@ static

[PATCH v3 3/3] cli: compile history code if and only if history config is selected

2024-03-04 Thread Hanyuan Zhao
to CMD_HISTORY. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Move the #ifdef CONFIG_CMD_HISTORY directives to this patch. These directives are still necessary when us

[PATCH v3 2/3] cli: allow users to determine history buffer allocation method

2024-03-04 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Add more detailed information about the CMD_HISTORY_USE_CALLOC option b

[PATCH v3 1/3] cli: panic when failed to allocate memory for the history buffer

2024-03-04 Thread Hanyuan Zhao
information instead. Signed-off-by: Hanyuan Zhao --- This is v3 of patch series cli: allow users to disable history if unused at all. Please ignore the v2 version. --- Changes v1 -> v3: - Separate the first patch and let this patch be the panic one. --- common/cli_readline.c | 2 +- 1 f

Re: [v2,1/2] cli: panic when failed to allocate memory for the history buffer

2024-03-04 Thread hanyuan
if and only if history config is selected I made their change logs very complex and their relations are hard to understand. Please ignore all v2 patches and allow me to resend v3 version series, thanks! Regards, Hanyuan

[PATCH v2 1/1] cli: compile history code if and only if history config is selected

2024-03-04 Thread Hanyuan Zhao
to CMD_HISTORY. Signed-off-by: Hanyuan Zhao --- This is v2 of patch series cli: allow users to disable history if unused at all --- Changes v1 -> v2: - Please ignore the inaccurate description about the history code compilations in the previous v2 patch: cli: panic when failed. - This pa

[PATCH v2 2/2] cli: allow users to determine history buffer allocation method

2024-03-03 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- Changes v1 -> v2: - Add more detailed information about the CMD_HISTORY_USE_CALLOC option both in the Kconfig and the code. - Update the comments on global history array and flash running problems. ---

[PATCH v2 1/2] cli: panic when failed to allocate memory for the history buffer

2024-03-03 Thread Hanyuan Zhao
information instead. Signed-off-by: Hanyuan Zhao --- This is v2 of patch series cli: allow users to disable history if unused at all --- Changes v1 -> v2: - Remove the lines surrounded by macro CONFIG_CMD_HISTORY, since if the user says N to CMD_HISTORY, the whole C file won't be compiled,

Re: [PATCH 1/2] cli: allow users to disable history if unused at all

2024-03-01 Thread hanyuan
me some hints about the broken tests? If it is a CI, could you please give me the link to the error information? Thanks! Regards, Hanyuan > 2024年3月2日 05:37,Tom Rini 写道: > > On Sat, Feb 17, 2024 at 09:54:43PM +0800, Hanyuan Zhao wrote: > >> This commit allows user to determi

[PATCH 2/2] cli: allow users to determine history buffer allocation method

2024-02-17 Thread Hanyuan Zhao
we provide the users with both the two options. Signed-off-by: Hanyuan Zhao --- cmd/Kconfig | 8 common/cli_readline.c | 23 --- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index af4dbc95fc..d0140b6cbe 100644

[PATCH 1/2] cli: allow users to disable history if unused at all

2024-02-17 Thread Hanyuan Zhao
the original CMD_HISTORY flag in Kconfig, users could unset the whole history function, and the memory usage could be eased, if the history function is not used at all. Signed-off-by: Hanyuan Zhao --- cmd/Kconfig | 1 + common/cli_readline.c | 44 --- 2