Skip to contentSkip to conversation

docs: housekeeping: Fix struct member access in code example

PATCH In review Costa Shulyupin 3 participants 4 messages May 1 – May 15 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: housekeeping: Fix struct member access in code example

No such array housekeeping_cpumasks

Fix to housekeeping.cpumasks.

---
 Documentation/core-api/housekeeping.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/core-api/housekeeping.rst +1 -1
index 92c6e53cea75..ccb0a88b9cb3 100644
@@ -99,7 +99,7 @@ the same RCU read side critical section.
 A typical layout example would look like this on the update side
 (``housekeeping_update()``)::
 
-	rcu_assign_pointer(housekeeping_cpumasks[type], trial);
+	rcu_assign_pointer(housekeeping.cpumasks[type], trial);
 	synchronize_rcu();
 	flush_workqueue(example_workqueue);
 
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 14 lines · Costa Shulyupin

No such array housekeeping_cpumasks

Fix to housekeeping.cpumasks.

---
 Documentation/core-api/housekeeping.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/core-api/housekeeping.rst +0 -0
index 92c6e53cea75..ccb0a88b9cb3 100644

Documentation/core-api/housekeeping.rst the same RCU read side critical section. · line 103

Quoted 6 lines
Documentation/core-api/housekeeping.rst +1 -1
@@ -99,7 +99,7 @@ the same RCU read side critical section.
 A typical layout example would look like this on the update side
 (``housekeeping_update()``)::
 
-	rcu_assign_pointer(housekeeping_cpumasks[type], trial);
+	rcu_assign_pointer(housekeeping.cpumasks[type], trial);
 	synchronize_rcu();

This looks actively wrong to me. I think it should be:

housekeeping_cpumask(type)

... Frederic ... ?

jon

#2 lore raw
Quoted 25 lines · Jonathan Corbet
Quoted 14 lines · Costa Shulyupin

No such array housekeeping_cpumasks

Fix to housekeeping.cpumasks.

---
 Documentation/core-api/housekeeping.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/core-api/housekeeping.rst +0 -0
index 92c6e53cea75..ccb0a88b9cb3 100644

Documentation/core-api/housekeeping.rst the same RCU read side critical section. · line 103

Quoted 6 lines
Documentation/core-api/housekeeping.rst +1 -1
@@ -99,7 +99,7 @@ the same RCU read side critical section.
 A typical layout example would look like this on the update side
 (``housekeeping_update()``)::
 
-	rcu_assign_pointer(housekeeping_cpumasks[type], trial);
+	rcu_assign_pointer(housekeeping.cpumasks[type], trial);
 	synchronize_rcu();

This looks actively wrong to me. I think it should be:

Quoted 3 lines

housekeeping_cpumask(type)

... Frederic ... ?

No, Costa is right, housekeeping.cpumasks[type] is where we store the pointer. housekeeping_cpumask(type) is only an accessor.

So:

Thanks!

Signature · 2 lines
Frederic Weisbecker
SUSE Labs
maintainer
#3 lore raw
Quoted 28 lines · Frederic Weisbecker
Quoted 27 lines · Jonathan Corbet
Quoted 14 lines · Costa Shulyupin

No such array housekeeping_cpumasks

Fix to housekeeping.cpumasks.

---
 Documentation/core-api/housekeeping.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/core-api/housekeeping.rst +0 -0
index 92c6e53cea75..ccb0a88b9cb3 100644

Documentation/core-api/housekeeping.rst the same RCU read side critical section. · line 103

Quoted 6 lines
Documentation/core-api/housekeeping.rst +1 -1
@@ -99,7 +99,7 @@ the same RCU read side critical section.
 A typical layout example would look like this on the update side
 (``housekeeping_update()``)::
 
-	rcu_assign_pointer(housekeeping_cpumasks[type], trial);
+	rcu_assign_pointer(housekeeping.cpumasks[type], trial);
 	synchronize_rcu();

This looks actively wrong to me. I think it should be:

housekeeping_cpumask(type)

Quoted 8 lines
Quoted 1 line

... Frederic ... ?

No, Costa is right, housekeeping.cpumasks[type] is where we store the pointer. housekeeping_cpumask(type) is only an accessor.

So:

OK, then, applied, thanks.

jon