From patchwork Thu Dec 29 13:43:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 37407 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2411066wrt; Thu, 29 Dec 2022 05:54:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXuQTNtH+bUtWNNUaQz48v9xGp3BgvlxAatqumsL40wR3H02YXHerwURrY0M5xKP+j21M493 X-Received: by 2002:a05:6a20:a682:b0:b2:c76:dc71 with SMTP id ba2-20020a056a20a68200b000b20c76dc71mr42276772pzb.49.1672322062501; Thu, 29 Dec 2022 05:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672322062; cv=none; d=google.com; s=arc-20160816; b=Vgru5f3+TioB8VGZvgYrtjy8gmBCpC08CtQImndcd8Dl/FVpPxLXU9splYlfQzWyPv 5zFgQwduqnaL2658AAxlwC6QlQrZvXI3Fr3l+MK+1me+0PTvYwccPeZamjayNRVCtnFE J5VOmyzJtTnkE3vKL0islXfm9yiw3ObqlrCYtlmsQo8qnLbsFYF1zx7T2zA6+olhoSOa xa6C+1gfTIRlLaO+OWiPNSiIs1uFPSrKogfyDU4fd83DtjhO7yaImsuscXTNxJnNavQ5 tdidxziHHD7v7wJMsgjaBbmLPtca7/u3qU+PUPPsB66aCBYDC8Ipz5s+NZF2pK2MNL9k wRsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=Rv6P/GuqNnG/oFiVKbH+fNta/ZvUQ0RvVbdnV3wyZaEAe+9RvB5rEfVkHNkV50mWAr 2h8RnbjQZ0h9Q0uf7CklKknlu6IMzMvmpfe/okFRsOnuhoV9QBtzJXtR8ZvpSH69NaNE fnSpGeh+pSf6Nj6hDYXLMT2x4GP9ZCamK77V3inuNj+kMRPH8CbDj06UZFDr+8bkKcSH UnJeql+S+Ont4v0/6ZwLc/Z+ajj0xncw2bA7U71Eog1k+AZRYfnYWNl/Gb+oErfL8LAh JQ1VXL8mg7rNbtaUxQFHyg/oivO3Utm0XK/G6S/ZmJ1dKcK43PkXhVGmAOWuherwXk6N JxiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TXVDMhPJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DB3b0cWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 84-20020a630257000000b00477ff64b022si20204231pgc.19.2022.12.29.05.54.10; Thu, 29 Dec 2022 05:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TXVDMhPJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DB3b0cWA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233403AbiL2Not (ORCPT + 99 others); Thu, 29 Dec 2022 08:44:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbiL2NoS (ORCPT ); Thu, 29 Dec 2022 08:44:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EC5280; Thu, 29 Dec 2022 05:44:16 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672321453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=TXVDMhPJGL1QCQYUmQxrJxkU/cypzAG1uj6UUvbwCzsXTADl0sr21wzpVAog+QM9x2iJo4 P+4oDQub8fT4ZCwg74hqVrTA1HXclyuPqL+Qhrz9vXHJ1N0m+Zz31b9t8e382J+34Oy7Ct saOOgoK8aqg4YdOYU7lbfG4MUTmC+tJZ/khpoRJuvQwsU4GPbu8J8vn8eZfzuJJ5x7oGMl 02RHJ23JJ6x/sfVcX2dlYTiWVFTp6J71bOtOoVKgkGMYQbtzEJMJkP6gQUoh0lDy6rVm8l 2vShLjYpSiVzioTj9ycGy7eoFmN8DGyF7OEb+GcuJ2cDfO+jc0lNE8qbm3GQ7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672321453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ONVoAOSV4R74Fcc+S7klnQwitE7KOgWX9DTWXdoRQo0=; b=DB3b0cWA02D46fic+goYCvu+45MlQLaUlbBt0nfXLXaSAlWlRPKVkCxgo3+sXPj+TLlwCI gAz9sAAlYmgnGsAg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, Baoquan He , Vivek Goyal , Dave Young , Jonathan Corbet , kexec@lists.infradead.org, linux-doc@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] docs: gdbmacros: print newest record Date: Thu, 29 Dec 2022 14:49:39 +0106 Message-Id: <20221229134339.197627-1-john.ogness@linutronix.de> MIME-Version: 1.0 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753556779139140326?= X-GMAIL-MSGID: =?utf-8?q?1753556779139140326?= @head_id points to the newest record, but the printing loop exits when it increments to this value (before printing). Exit the printing loop after the newest record has been printed. The python-based function in scripts/gdb/linux/dmesg.py already does this correctly. Fixes: e60768311af8 ("scripts/gdb: update for lockless printk ringbuffer") Cc: stable@vger.kernel.org Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- Documentation/admin-guide/kdump/gdbmacros.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 diff --git a/Documentation/admin-guide/kdump/gdbmacros.txt b/Documentation/admin-guide/kdump/gdbmacros.txt index 82aecdcae8a6..030de95e3e6b 100644 --- a/Documentation/admin-guide/kdump/gdbmacros.txt +++ b/Documentation/admin-guide/kdump/gdbmacros.txt @@ -312,10 +312,10 @@ define dmesg set var $prev_flags = $info->flags end - set var $id = ($id + 1) & $id_mask if ($id == $end_id) loop_break end + set var $id = ($id + 1) & $id_mask end end document dmesg