[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b41236e-b4dc-43e1-922a-4bb9dcc318aa@igalia.com>
Date: Tue, 6 May 2025 20:45:06 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org
Cc: Darren Hart <dvhart@...radead.org>, Davidlohr Bueso <dave@...olabs.net>,
Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>, Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v12 05/21] futex: Create hb scopes
Em 16/04/2025 13:29, Sebastian Andrzej Siewior escreveu:
> From: Peter Zijlstra <peterz@...radead.org>
>
> Create explicit scopes for hb variables; almost pure re-indent.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> kernel/futex/core.c | 81 ++++----
> kernel/futex/pi.c | 282 +++++++++++++-------------
> kernel/futex/requeue.c | 433 ++++++++++++++++++++--------------------
> kernel/futex/waitwake.c | 193 +++++++++---------
> 4 files changed, 504 insertions(+), 485 deletions(-)
>
> diff --git a/kernel/futex/core.c b/kernel/futex/core.c
> index 7adc914878933..e4cb5ce9785b1 100644
> --- a/kernel/futex/core.c
> +++ b/kernel/futex/core.c
> @@ -944,7 +944,6 @@ static void exit_pi_state_list(struct task_struct *curr)
> {
> struct list_head *next, *head = &curr->pi_state_list;
> struct futex_pi_state *pi_state;
> - struct futex_hash_bucket *hb;
> union futex_key key = FUTEX_KEY_INIT;
>
> /*
> @@ -957,50 +956,54 @@ static void exit_pi_state_list(struct task_struct *curr)
> next = head->next;
> pi_state = list_entry(next, struct futex_pi_state, list);
> key = pi_state->key;
> - hb = futex_hash(&key);
> + if (1) {
Couldn't those explict scopes be achive without the if (1), just {}?
> + struct futex_hash_bucket *hb;
Powered by blists - more mailing lists