linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
	joel@joelfernandes.org, mmpgouride@gmail.com, corbet@lwn.net,
	rcu@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] Docs/RCU/rculist_nulls: Fix hlist_head field name of 'obj'
Date: Thu, 15 Jun 2023 17:30:00 +0000	[thread overview]
Message-ID: <20230615173000.84885-1-sj@kernel.org> (raw)
In-Reply-To: <43943609-f80c-4b6a-9844-994eef800757@paulmck-laptop>

On Wed, 14 Jun 2023 09:36:50 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:

> On Tue, Jun 13, 2023 at 06:24:33PM +0000, SeongJae Park wrote:
> > The example code snippets on rculist_nulls.rst are assuming 'obj' to
> > have the 'hlist_head' field named 'obj_node', but a sentence is wrongly
> > mentioning 'obj->obj_node.next' as 'obj->obj_next'.  Fix it.
> > 
> > Signed-off-by: SeongJae Park <sj@kernel.org>
> > Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> > ---
> >  Documentation/RCU/rculist_nulls.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst
> > index 94a8bfe9f560..5cd6f3f8810f 100644
> > --- a/Documentation/RCU/rculist_nulls.rst
> > +++ b/Documentation/RCU/rculist_nulls.rst
> > @@ -86,7 +86,7 @@ Quoting Corey Minyard::
> >  2) Insertion algorithm
> >  ----------------------
> >  
> > -We need to make sure a reader cannot read the new 'obj->obj_next' value
> > +We need to make sure a reader cannot read the new 'obj->obj_node.next' value
> 
> I do like this being more specific, but if we are going do add this
> level of specificity, shouldn't we refer to a definition of ->obj_node?

Agreed, I will add the example definition in the next spin.  I also found we
would better to further fix wrong 'member' field assumption, like below:

-       ({ obj = hlist_entry(pos, typeof(*obj), member); 1; });
+       ({ obj = hlist_entry(pos, typeof(*obj), obj_node); 1; });



Thanks,
SJ

> 
> (I queued and pushed 1/4 and 2/4, thank you, and stopped here.)
> 
> 							Thanx, Paul
> 
> >  and previous value of 'obj->key'. Otherwise, an item could be deleted
> >  from a chain, and inserted into another chain. If new chain was empty
> >  before the move, 'next' pointer is NULL, and lockless reader can not
> > -- 
> > 2.25.1
> > 
> 

  reply	other threads:[~2023-06-15 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 18:24 [PATCH v2 0/4] Docs/RCU/rculist_nulls: Minor fixups SeongJae Park
2023-06-13 18:24 ` [PATCH v2 1/4] Docs/RCU/rculist_nulls: Fix trivial coding style SeongJae Park
2023-06-13 18:24 ` [PATCH v2 2/4] Docs/RCU/rculist_nulls: Assign 'obj' before use from the examples SeongJae Park
2023-06-13 18:24 ` [PATCH v2 3/4] Docs/RCU/rculist_nulls: Fix hlist_head field name of 'obj' SeongJae Park
2023-06-14 16:36   ` Paul E. McKenney
2023-06-15 17:30     ` SeongJae Park [this message]
2023-06-13 18:24 ` [PATCH v2 4/4] Docs/RCU/rculist_nulls: Fix wrong text about atomic_set_release() SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615173000.84885-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=corbet@lwn.net \
    --cc=joel@joelfernandes.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmpgouride@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).