From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D5533BFE40 for ; Mon, 30 Mar 2026 14:14:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774880082; cv=none; b=Lp0AsVtl0lzIpnAOlmv6B5PsHkQU3erXL6dTdmVvAM+zTW9B7IlgKX3NyeQ31zoKyYlur9qgi4HYmSn1EZvcMQuBTR47/+JVe/oABlfZgCcVK9Mz4r+OkBXAVGTtAONnr2NCT2tyg8OJMWzoHE/Y3i0ZVavZOoRBjAg9wnWANFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774880082; c=relaxed/simple; bh=J3M/WnlA9g6LA9BQn2HJMPHhnvZopm7NXd1jYarV0xI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=THYz33y5lrJIEAlrE5fGYN/uVkMVmzXiBJYmrvYaMjBgAWOPk3HEhYBOMdzEXZVYqIWEwGztOzJKJ1HbJXQCvm8XHiWD6wOjDoxzW97WXHRv50h73HCCrj+EHFJ16eFgKZ15u3X5vvOSKo1Qxl3w0u4gXkHBAqosPjEo9bk0VtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CXzON6p2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=b2Repmf8; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CXzON6p2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="b2Repmf8" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774880079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ti2aq9O8CLL/bEdfZWh+64LDtA9UMrX8Q7RLsHAwHOA=; b=CXzON6p2IwU0P6Oi1m7iJFip71MTpH/+mj6SfuBiaU/e7a2DF0TYPqrdW0iCyTV8RsBj6d uiMpHqKCEcSu/BJX7wNlOVeUEGPVYVEccppd9ubdq8OPLa0mCXC0OWN094ahw2feQrhOEH vx9MyatEvEcfvXNzoVzpe01Ko/cbAWk2A5+R+XTqoONccBm986bJ590LTTmhS6gJR2bR1+ i03DKVwGJX8cIJzL6NFR+p7pYXacqnuVxW1qUeW6sC3BA8oLhSLMxDW9HhvBTOPfhFaOuZ iWKE7YvDk8BKG6Z7ylOVgUKigVDdyiiUgg9px9VY/oxZmC35TE9qltmQBY+2dw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774880079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ti2aq9O8CLL/bEdfZWh+64LDtA9UMrX8Q7RLsHAwHOA=; b=b2Repmf8e0BhT0mgcLA/1BuKhrjvgPU5fQmPAYQWhp2q3GuF5AYui3vWB9bPPYOt7bflXh pp4d4cFDlNMFH6Cw== To: Petr Mladek Cc: =?utf-8?Q?Lo=C3=AFc_Gr=C3=A9goire?= , Steven Rostedt , Sergey Senozhatsky , open list Subject: Re: [PATCH] printk: ringbuffer: fix error in comment In-Reply-To: References: <20260328021855.53956-1-loicgre@gmail.com> <87pl4ln3m7.fsf@jogness.linutronix.de> Date: Mon, 30 Mar 2026 16:20:39 +0206 Message-ID: <87mrzpmmk0.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2026-03-30, Petr Mladek wrote: > On Mon 2026-03-30 10:12:08, John Ogness wrote: >> On 2026-03-27, Lo=C3=AFc Gr=C3=A9goire wrote: >> > The printk ringbuffer implementation is described in the comment as >> > using three ringbuffers, but the current implementation uses two (desc >> > and data). Update the comment so it matches the code. >> > >> > Signed-off-by: Lo=C3=AFc Gr=C3=A9goire >>=20 >> Reviewed-by: John Ogness > > Reviewed-by: Petr Mladek > >> However, this is only a single fixup when there are other documentation >> errors that need fixing as well. Does it make sense to commit such tiny >> fixups separately? For example, below are needed fixes that I am aware >> of. >>=20 >> Perhaps we should fold these into a single doc-fixup patch? >> >> diff --git a/kernel/printk/printk_ringbuffer.c b/kernel/printk/printk_ri= ngbuffer.c >> index 56c8e3d031f49..3f019207d2688 100644 >> --- a/kernel/printk/printk_ringbuffer.c >> +++ b/kernel/printk/printk_ringbuffer.c >> @@ -224,7 +224,7 @@ >> * >> * prb_rec_init_rd(&r, &info, &text_buf[0], sizeof(text_buf)); >> * >> - * prb_for_each_record(0, &test_rb, &seq, &r) { >> + * prb_for_each_record(0, &test_rb, seq, &r) { >> * if (info.seq !=3D seq) >> * pr_warn("lost %llu records\n", info.seq - seq); >> * >> @@ -1365,7 +1365,7 @@ static struct prb_desc *desc_reopen_last(struct pr= b_desc_ring *desc_ring, >> * >> * WMB from _prb_commit:A to _prb_commit:B >> * matching >> - * MB If desc_reopen_last:A to prb_reserve_in_last:A >> + * MB from desc_reopen_last:A to prb_reserve_in_last:A >> */ >> if (!atomic_long_try_cmpxchg(&d->state_var, &prev_state_val, >> DESC_SV(id, desc_reserved))) { /* LMM(desc_reopen_last:A) */ >> @@ -1770,9 +1770,9 @@ static void _prb_commit(struct prb_reserved_entry = *e, unsigned long state_val) >> * >> * Relies on: >> * >> - * MB _prb_commit:B to prb_commit:A >> + * MB from _prb_commit:B to prb_commit:A >> * matching >> - * MB desc_reserve:D to desc_make_final:A >> + * MB from desc_reserve:D to desc_make_final:A >> */ >> if (!atomic_long_try_cmpxchg(&d->state_var, &prev_state_val, >> DESC_SV(e->id, state_val))) { /* LMM(_prb_commit:B) */ >> @@ -2035,7 +2035,7 @@ u64 prb_first_seq(struct printk_ringbuffer *rb) >> * >> * MB from desc_push_tail:B to desc_reserve:F >> * matching >> - * RMB prb_first_seq:B to prb_first_seq:A >> + * RMB from prb_first_seq:B to prb_first_seq:A >> */ >> smp_rmb(); /* LMM(prb_first_seq:C) */ >> } >> diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ri= ngbuffer.h >> index 1651b53ece34f..fb7d2ee29af23 100644 >> --- a/kernel/printk/printk_ringbuffer.h >> +++ b/kernel/printk/printk_ringbuffer.h >> @@ -388,7 +388,7 @@ for ((s) =3D from; prb_read_valid(rb, s, r); (s) =3D= (r)->info->seq + 1) >> * >> * This is a macro for conveniently iterating over a ringbuffer. >> * Note that @s may not be the sequence number of the record on each >> - * iteration. For the sequence number, @r->info->seq should be checked. >> + * iteration. For the sequence number, @i->seq should be checked. >> * >> * Context: Any context. >> */ > > All these changes look correct as well: > > Reviewed-by: Petr Mladek > > I could squash these changes into the original patch when comitting > into printk/linux.git. > > John, could I use your Signed-off-by to mark you as a co-author > and keep Lo=C3=AFc as the author of the patch? Sure. Signed-off-by: John Ogness