From nobody Mon Apr 6 10:45:16 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8892B388379; Wed, 4 Mar 2026 07:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772610558; cv=none; b=LKE1Ti3qFote/lmj0McQknVVXgkIT1de3IzzHlB4B0NxAqv3Cbje9t5pTR3LnLBPijULpQtTkj2P5r0NS5lyUNYJiHkgVgbGvz1CAl5vdqP7oJQ/qHcKKaBuwxtmoyR8A/osZAdX8QvXQiXVFlYAmk0m6kxeIYYfW7hLEXLIPs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772610558; c=relaxed/simple; bh=6rb/ks5vA+PZYvcsn3/vAHKN0WZCZ2EWh3gRKAxxCTs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OXsCRqGEHhi4b4iv/LaIJV4y4qkgxRZnrHjofRYuJkL+TFr6b6SgEs0NBz2KtQ9mXJFG+WAZuZiP/nHF/Q1IAMiiq2sybES3VYK6uMrFa0L45iiV79jSWLnlR7qw1OYy5mwnrFAQjODQ6V7JVuKzmfjA4YBYsS/hDkseSd98mKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mXCcVxWf; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=QPlKgad7; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mXCcVxWf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="QPlKgad7" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772610551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLyyrQ8E3zgrcPegPvm1C9TrAhNcjCD2got6qjqs9rk=; b=mXCcVxWfr5BEVOUfCl+flDwT8W3JTfMG973lY3FqWKz/J2gh/PCAvZz87yF3WKPPpzK4fP cbjAM6gwY6UpVj++0uAP4BbDfiFUo6k8b43b6Ajdabto6K7i3f9fqlWexwI8dmzPcbLYBZ DgzUnEv9TIrczAVbfT8bQKcAYikDjM7LanpOstOBAZti7EXXa42fdMJjnTZTYUB+cZ+2aw Fkf+11FVl+Wn8nWaeU32NuDPkNyk3UzLDf//5XFq9XCZcgug7BRo96FDaDKydgmjc+/7EG Mhuump2lqyQOGSn2dFjhfyxAzMoQd1ZSEbIxAYwru8zSTQohITLsMRQPC+efgA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772610551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLyyrQ8E3zgrcPegPvm1C9TrAhNcjCD2got6qjqs9rk=; b=QPlKgad7K+cQyDTZf+yOmUsIAtqT+NCdRnQRLLN9141Rz+MVCU7hhcYg0NQTOK3GbrZGx1 68dA2qj4XqmhrEDQ== Date: Wed, 04 Mar 2026 08:48:58 +0100 Subject: [PATCH v6 01/14] vdso/datastore: Reduce scope of some variables in vvar_fault() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260304-vdso-sparc64-generic-2-v6-1-d8eb3b0e1410@linutronix.de> References: <20260304-vdso-sparc64-generic-2-v6-0-d8eb3b0e1410@linutronix.de> In-Reply-To: <20260304-vdso-sparc64-generic-2-v6-0-d8eb3b0e1410@linutronix.de> To: Andy Lutomirski , Vincenzo Frascino , Arnd Bergmann , "David S. Miller" , Andreas Larsson , Nick Alcock , John Stultz , Stephen Boyd , John Paul Adrian Glaubitz , Shuah Khan , Catalin Marinas , Will Deacon , Theodore Ts'o , "Jason A. Donenfeld" , Russell King , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Shannon Nelson , Thomas Gleixner , Christophe Leroy Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772610551; l=1240; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=6rb/ks5vA+PZYvcsn3/vAHKN0WZCZ2EWh3gRKAxxCTs=; b=ebgCPti7Ca1uQvRO5fjaqRSC0VPAzpzm8s6h7lWHrCvbtrC8Z2sR3f32JNrACGN3FKY/JSqML 11Pjp5qWkYdAWP0IDCJi7iAJx/vF8Q/4S/S6aEsoQ4vDrmQxcAIr6q4 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= These variables are only used inside a single branch. Move their declarations there. Signed-off-by: Thomas Wei=C3=9Fschuh Tested-by: Andreas Larsson Reviewed-by: Andreas Larsson Reviewed-by: Christophe Leroy (CS GROUP) --- lib/vdso/datastore.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vdso/datastore.c b/lib/vdso/datastore.c index a565c30c71a0..2cca4e84e5b5 100644 --- a/lib/vdso/datastore.c +++ b/lib/vdso/datastore.c @@ -41,8 +41,7 @@ static vm_fault_t vvar_fault(const struct vm_special_mapp= ing *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { struct page *timens_page =3D find_timens_vvar_page(vma); - unsigned long addr, pfn; - vm_fault_t err; + unsigned long pfn; =20 switch (vmf->pgoff) { case VDSO_TIME_PAGE_OFFSET: @@ -54,6 +53,9 @@ static vm_fault_t vvar_fault(const struct vm_special_mapp= ing *sm, * Fault in VVAR page too, since it will be accessed * to get clock data anyway. */ + unsigned long addr; + vm_fault_t err; + addr =3D vmf->address + VDSO_TIMENS_PAGE_OFFSET * PAGE_SIZE; err =3D vmf_insert_pfn(vma, addr, pfn); if (unlikely(err & VM_FAULT_ERROR)) --=20 2.53.0