All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests: fix counting typo error
@ 2019-10-10 12:17 Tianjia Zhang
  2019-10-11 10:18 ` Stefan Hajnoczi
  2019-10-11 11:13 ` Markus Armbruster
  0 siblings, 2 replies; 3+ messages in thread
From: Tianjia Zhang @ 2019-10-10 12:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tianjia Zhang

Instead of global variables, local variables should be incrementing,
This is a typo fix.

Signed-off-by: Tianjia Zhang <77389867@qq.com>
---
 tests/test-rcu-list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c
index 6f076473e0..c0fc47ded4 100644
--- a/tests/test-rcu-list.c
+++ b/tests/test-rcu-list.c
@@ -219,7 +219,7 @@ static void *rcu_q_updater(void *arg)
             j++;
             if (target_el == j) {
                 struct list_element *new_el = g_new(struct list_element, 1);
-                n_nodes += n_nodes_local;
+                n_nodes_local++;
                 TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry);
                 break;
             }
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests: fix counting typo error
  2019-10-10 12:17 [PATCH] tests: fix counting typo error Tianjia Zhang
@ 2019-10-11 10:18 ` Stefan Hajnoczi
  2019-10-11 11:13 ` Markus Armbruster
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2019-10-11 10:18 UTC (permalink / raw)
  To: Tianjia Zhang; +Cc: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Thu, Oct 10, 2019 at 08:17:02PM +0800, Tianjia Zhang wrote:
> Instead of global variables, local variables should be incrementing,
> This is a typo fix.
> 
> Signed-off-by: Tianjia Zhang <77389867@qq.com>
> ---
>  tests/test-rcu-list.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

CCing Paolo Bonzini, author of the RCU code.

> 
> diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c
> index 6f076473e0..c0fc47ded4 100644
> --- a/tests/test-rcu-list.c
> +++ b/tests/test-rcu-list.c
> @@ -219,7 +219,7 @@ static void *rcu_q_updater(void *arg)
>              j++;
>              if (target_el == j) {
>                  struct list_element *new_el = g_new(struct list_element, 1);
> -                n_nodes += n_nodes_local;
> +                n_nodes_local++;
>                  TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry);
>                  break;
>              }
> -- 
> 2.17.1
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests: fix counting typo error
  2019-10-10 12:17 [PATCH] tests: fix counting typo error Tianjia Zhang
  2019-10-11 10:18 ` Stefan Hajnoczi
@ 2019-10-11 11:13 ` Markus Armbruster
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2019-10-11 11:13 UTC (permalink / raw)
  To: Tianjia Zhang; +Cc: qemu-devel

Tianjia Zhang <77389867@qq.com> writes:

> Instead of global variables, local variables should be incrementing,
> This is a typo fix.

Impact?

The commit message calls it a "typo", which suggests there is none.  The
patch makes me suspect the bug is more serious than that.

>
> Signed-off-by: Tianjia Zhang <77389867@qq.com>
> ---
>  tests/test-rcu-list.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c
> index 6f076473e0..c0fc47ded4 100644
> --- a/tests/test-rcu-list.c
> +++ b/tests/test-rcu-list.c
> @@ -219,7 +219,7 @@ static void *rcu_q_updater(void *arg)
>              j++;
>              if (target_el == j) {
>                  struct list_element *new_el = g_new(struct list_element, 1);
> -                n_nodes += n_nodes_local;
> +                n_nodes_local++;
>                  TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry);
>                  break;
>              }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-11 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 12:17 [PATCH] tests: fix counting typo error Tianjia Zhang
2019-10-11 10:18 ` Stefan Hajnoczi
2019-10-11 11:13 ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.