From b9a90d444df5e027e7e8822405e666caec098e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E9=87=91?= Date: Thu, 6 Jun 2024 09:19:44 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E2=80=9Chilog=20buffer?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8Chilog=5Fdev.count=E4=B8=8D?= =?UTF-8?q?=E4=B8=BA0=E2=80=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 柳金 --- drivers/staging/hilog/hilog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/hilog/hilog.c b/drivers/staging/hilog/hilog.c index 178dcb6dd5b1..1c9deca41949 100644 --- a/drivers/staging/hilog/hilog.c +++ b/drivers/staging/hilog/hilog.c @@ -288,7 +288,8 @@ static void hilog_cover_old_log(size_t buf_len) drop_log_lines++; is_this_time_full = true; is_last_time_full = true; - hilog_buffer_dec(sizeof(header) + header.len); + hilog_buffer_dec(sizeof(header)); + hilog_buffer_dec(header.len); } if (is_last_time_full && !is_this_time_full) { /* so we can only print one log if hilog ring buffer is full in a short time */ -- Gitee