public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture
@ 2006-12-01  3:10 Josh Triplett
  2006-12-01 15:24 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2006-12-01  3:10 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Oleg Nesterov, Paul E. McKenney

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

The SRCU wrapper functions srcu_torture_read_lock and srcu_torture_read_unlock
in rcutorture intentionally change the SRCU context; annotate them
accordingly, to avoid a warning.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
 kernel/rcutorture.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index cd27547..ddafbbf 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void)
 	cleanup_srcu_struct(&srcu_ctl);
 }
 
-static int srcu_torture_read_lock(void)
+static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
 {
 	return srcu_read_lock(&srcu_ctl);
 }
@@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp)
 		schedule_timeout_interruptible(longdelay);
 }
 
-static void srcu_torture_read_unlock(int idx)
+static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
 {
 	srcu_read_unlock(&srcu_ctl, idx);
 }
-- 
1.4.4.1



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: [PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture
  2006-12-01  3:10 [PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture Josh Triplett
@ 2006-12-01 15:24 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2006-12-01 15:24 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-kernel, Andrew Morton, Oleg Nesterov

On Thu, Nov 30, 2006 at 07:10:37PM -0800, Josh Triplett wrote:
> The SRCU wrapper functions srcu_torture_read_lock and srcu_torture_read_unlock
> in rcutorture intentionally change the SRCU context; annotate them
> accordingly, to avoid a warning.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Signed-off-by: Josh Triplett <josh@freedesktop.org>
> ---
>  kernel/rcutorture.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
> index cd27547..ddafbbf 100644
> --- a/kernel/rcutorture.c
> +++ b/kernel/rcutorture.c
> @@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void)
>  	cleanup_srcu_struct(&srcu_ctl);
>  }
>  
> -static int srcu_torture_read_lock(void)
> +static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
>  {
>  	return srcu_read_lock(&srcu_ctl);
>  }
> @@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp)
>  		schedule_timeout_interruptible(longdelay);
>  }
>  
> -static void srcu_torture_read_unlock(int idx)
> +static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
>  {
>  	srcu_read_unlock(&srcu_ctl, idx);
>  }
> -- 
> 1.4.4.1
> 
> 



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

end of thread, other threads:[~2006-12-01 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01  3:10 [PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture Josh Triplett
2006-12-01 15:24 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox