Re: [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set

2021-01-07 Thread Paolo Bonzini

On 06/01/21 08:17, Keqian Zhu wrote:

Correct sample code to avoid confusing readers.

Signed-off-by: Keqian Zhu 
Cc: qemu-triv...@nongnu.org
Reviewed-by: Paolo Bonzini 
Reviewed-by: Peter Xu 
---

v2:
  - Add Cc and R-b.

---
  docs/devel/rcu.txt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt
index cdf002edd8..2e6cc607a1 100644
--- a/docs/devel/rcu.txt
+++ b/docs/devel/rcu.txt
@@ -392,7 +392,7 @@ Instead, we store the size of the array with the array 
itself:
  
  /* Removal phase.  */

  old_array = global_array;
-qatomic_rcu_set(_array->data, new_array);
+qatomic_rcu_set(_array, new_array);
  synchronize_rcu();
  
  /* Reclamation phase.  */




Queued, thanks.

Paolo




Re: [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set

2021-01-06 Thread Stefan Hajnoczi
On Wed, Jan 06, 2021 at 03:17:10PM +0800, Keqian Zhu wrote:
> Correct sample code to avoid confusing readers.
> 
> Signed-off-by: Keqian Zhu 
> Cc: qemu-triv...@nongnu.org
> Reviewed-by: Paolo Bonzini 
> Reviewed-by: Peter Xu 
> ---
> 
> v2:
>  - Add Cc and R-b.
> 
> ---
>  docs/devel/rcu.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi 


signature.asc
Description: PGP signature


[PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set

2021-01-05 Thread Keqian Zhu
Correct sample code to avoid confusing readers.

Signed-off-by: Keqian Zhu 
Cc: qemu-triv...@nongnu.org
Reviewed-by: Paolo Bonzini 
Reviewed-by: Peter Xu 
---

v2:
 - Add Cc and R-b.

---
 docs/devel/rcu.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt
index cdf002edd8..2e6cc607a1 100644
--- a/docs/devel/rcu.txt
+++ b/docs/devel/rcu.txt
@@ -392,7 +392,7 @@ Instead, we store the size of the array with the array 
itself:
 
 /* Removal phase.  */
 old_array = global_array;
-qatomic_rcu_set(_array->data, new_array);
+qatomic_rcu_set(_array, new_array);
 synchronize_rcu();
 
 /* Reclamation phase.  */
-- 
2.19.1