Skip to content

Commit 2736615

Browse files
committed
rcutorture: Drop sparse lock-acquisition annotations
The sparse __acquires() and __releases() annotations provide very little value. The argument is ignored, so sparse cannot tell the differences between acquiring one lock and releasing another on the one hand and acquiring and releasing a given lock on the other. In addition, lockdep annotations provide much more precision, for but one example, actually knowing which lock is held. This commit therefore removes the __acquires() and __releases() annotations from rcutorture. Reported-by: Tejun Heo <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c24501b commit 2736615

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

kernel/rcu/rcutorture.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static int torture_readlock_not_held(void)
399399
return rcu_read_lock_bh_held() || rcu_read_lock_sched_held();
400400
}
401401

402-
static int rcu_torture_read_lock(void) __acquires(RCU)
402+
static int rcu_torture_read_lock(void)
403403
{
404404
rcu_read_lock();
405405
return 0;
@@ -441,7 +441,7 @@ rcu_read_delay(struct torture_random_state *rrsp, struct rt_read_seg *rtrsp)
441441
}
442442
}
443443

444-
static void rcu_torture_read_unlock(int idx) __releases(RCU)
444+
static void rcu_torture_read_unlock(int idx)
445445
{
446446
rcu_read_unlock();
447447
}
@@ -625,7 +625,7 @@ static struct srcu_struct srcu_ctld;
625625
static struct srcu_struct *srcu_ctlp = &srcu_ctl;
626626
static struct rcu_torture_ops srcud_ops;
627627

628-
static int srcu_torture_read_lock(void) __acquires(srcu_ctlp)
628+
static int srcu_torture_read_lock(void)
629629
{
630630
if (cur_ops == &srcud_ops)
631631
return srcu_read_lock_nmisafe(srcu_ctlp);
@@ -652,7 +652,7 @@ srcu_read_delay(struct torture_random_state *rrsp, struct rt_read_seg *rtrsp)
652652
}
653653
}
654654

655-
static void srcu_torture_read_unlock(int idx) __releases(srcu_ctlp)
655+
static void srcu_torture_read_unlock(int idx)
656656
{
657657
if (cur_ops == &srcud_ops)
658658
srcu_read_unlock_nmisafe(srcu_ctlp, idx);
@@ -814,13 +814,13 @@ static void synchronize_rcu_trivial(void)
814814
}
815815
}
816816

817-
static int rcu_torture_read_lock_trivial(void) __acquires(RCU)
817+
static int rcu_torture_read_lock_trivial(void)
818818
{
819819
preempt_disable();
820820
return 0;
821821
}
822822

823-
static void rcu_torture_read_unlock_trivial(int idx) __releases(RCU)
823+
static void rcu_torture_read_unlock_trivial(int idx)
824824
{
825825
preempt_enable();
826826
}

0 commit comments

Comments
 (0)