mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
soc: rockchip: fiq_debugger: move from strlcpy with unused retval to strscpy
Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: Icb9be4b3e53da7735e84d72dc02402a164aa6585
This commit is contained in:
@@ -420,7 +420,7 @@ static void fiq_debugger_schedule_work(struct fiq_debugger_state *state,
|
||||
return;
|
||||
}
|
||||
|
||||
strlcpy(state->work_cmd, cmd, sizeof(state->work_cmd));
|
||||
strscpy(state->work_cmd, cmd, sizeof(state->work_cmd));
|
||||
spin_unlock_irqrestore(&state->work_lock, flags);
|
||||
|
||||
schedule_work(&state->work);
|
||||
@@ -437,7 +437,7 @@ static void fiq_debugger_work(struct work_struct *work)
|
||||
|
||||
spin_lock_irqsave(&state->work_lock, flags);
|
||||
|
||||
strlcpy(work_cmd, state->work_cmd, sizeof(work_cmd));
|
||||
strscpy(work_cmd, state->work_cmd, sizeof(work_cmd));
|
||||
state->work_cmd[0] = '\0';
|
||||
|
||||
spin_unlock_irqrestore(&state->work_lock, flags);
|
||||
@@ -651,7 +651,7 @@ static bool fiq_debugger_fiq_exec(struct fiq_debugger_state *state,
|
||||
cmd++;
|
||||
if (*cmd) {
|
||||
char tmp_cmd[32];
|
||||
strlcpy(tmp_cmd, cmd, sizeof(tmp_cmd));
|
||||
strscpy(tmp_cmd, cmd, sizeof(tmp_cmd));
|
||||
machine_restart(tmp_cmd);
|
||||
} else {
|
||||
machine_restart(NULL);
|
||||
|
||||
Reference in New Issue
Block a user