lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] srcu: drop the needless initialization in srcu_gp_start()
Date
Commit 9c7ef4c30f12 ("srcu: Make Tree SRCU able to operate without snp_node
array") initializes the local variable sdp differently depending on the
srcu's state in srcu_gp_start().

Hence, the initialization of sdp with the variable definition is not used
before its second initialization.

Drop the needless initialization in srcu_gp_start() to have clear code.

No functional change. Some changes in the resulting object code due to
various rearrangements by the compiler.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
Paul, please pick this minor non-urgent clean-up patch.


kernel/rcu/srcutree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index 328dd9ba9037..470da67325d6 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -598,7 +598,7 @@ EXPORT_SYMBOL_GPL(__srcu_read_unlock);
*/
static void srcu_gp_start(struct srcu_struct *ssp)
{
- struct srcu_data *sdp = this_cpu_ptr(ssp->sda);
+ struct srcu_data *sdp;
int state;

if (smp_load_acquire(&ssp->srcu_size_state) < SRCU_SIZE_WAIT_BARRIER)
--
2.17.1
\
 
 \ /
  Last update: 2022-03-15 09:57    [W:0.328 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site