public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	"Andreas Larsson" <andreas@gaisler.com>,
	"Nick Alcock" <nick.alcock@oracle.com>,
	"John Stultz" <jstultz@google.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	"Shuah Khan" <shuah@kernel.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>, "Theodore Ts'o" <tytso@mit.edu>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"WANG Xuerui" <kernel@xen0n.name>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>,
	"Shannon Nelson" <sln@onemain.com>,
	"Thomas Gleixner" <tglx@kernel.org>
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
Subject: Re: [PATCH v6 01/14] vdso/datastore: Reduce scope of some variables in vvar_fault()
Date: Wed, 4 Mar 2026 09:10:31 +0100	[thread overview]
Message-ID: <21ee2f0b-ae8e-40b6-ab13-e46f55c34254@kernel.org> (raw)
In-Reply-To: <20260304-vdso-sparc64-generic-2-v6-1-d8eb3b0e1410@linutronix.de>



Le 04/03/2026 à 08:48, Thomas Weißschuh a écrit :
> These variables are only used inside a single branch.
> 
> Move their declarations there.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Tested-by: Andreas Larsson <andreas@gaisler.com>
> Reviewed-by: Andreas Larsson <andreas@gaisler.com>

Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>

> ---
>   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_mapping *sm,
>   			     struct vm_area_struct *vma, struct vm_fault *vmf)
>   {
>   	struct page *timens_page = find_timens_vvar_page(vma);
> -	unsigned long addr, pfn;
> -	vm_fault_t err;
> +	unsigned long pfn;
>   
>   	switch (vmf->pgoff) {
>   	case VDSO_TIME_PAGE_OFFSET:
> @@ -54,6 +53,9 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,
>   			 * Fault in VVAR page too, since it will be accessed
>   			 * to get clock data anyway.
>   			 */
> +			unsigned long addr;
> +			vm_fault_t err;
> +
>   			addr = vmf->address + VDSO_TIMENS_PAGE_OFFSET * PAGE_SIZE;
>   			err = vmf_insert_pfn(vma, addr, pfn);
>   			if (unlikely(err & VM_FAULT_ERROR))
> 



  reply	other threads:[~2026-03-04  8:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  7:48 [PATCH v6 00/14] sparc64: vdso: Switch to the generic vDSO library Thomas Weißschuh
2026-03-04  7:48 ` [PATCH v6 01/14] vdso/datastore: Reduce scope of some variables in vvar_fault() Thomas Weißschuh
2026-03-04  8:10   ` Christophe Leroy (CS GROUP) [this message]
2026-03-04  7:48 ` [PATCH v6 02/14] vdso/datastore: Drop inclusion of linux/mmap_lock.h Thomas Weißschuh
2026-03-04  8:11   ` Christophe Leroy (CS GROUP)
2026-03-04  7:49 ` [PATCH v6 03/14] vdso/datastore: Allocate data pages dynamically Thomas Weißschuh
2026-03-04  8:49   ` Christophe Leroy (CS GROUP)
2026-03-04  7:49 ` [PATCH v6 04/14] sparc64: vdso: Link with -z noexecstack Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 05/14] sparc64: vdso: Remove obsolete "fake section table" reservation Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 06/14] sparc64: vdso: Replace code patching with runtime conditional Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 07/14] sparc64: vdso: Move hardware counter read into header Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 08/14] sparc64: vdso: Move syscall fallbacks " Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 09/14] sparc64: vdso: Introduce vdso/processor.h Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 10/14] sparc64: vdso: Switch to the generic vDSO library Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 11/14] sparc64: vdso2c: Drop sym_vvar_start handling Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 12/14] sparc64: vdso2c: Remove symbol handling Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 13/14] sparc64: vdso: Implement clock_gettime64() Thomas Weißschuh
2026-03-04  7:49 ` [PATCH v6 14/14] clocksource: remove ARCH_CLOCKSOURCE_DATA Thomas Weißschuh
2026-03-05 15:17 ` [PATCH v6 00/14] sparc64: vdso: Switch to the generic vDSO library Nathaniel Roach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21ee2f0b-ae8e-40b6-ab13-e46f55c34254@kernel.org \
    --to=chleroy@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=agordeev@linux.ibm.com \
    --cc=andreas@gaisler.com \
    --cc=arnd@arndb.de \
    --cc=borntraeger@linux.ibm.com \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=davem@davemloft.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=jstultz@google.com \
    --cc=kernel@xen0n.name \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=nick.alcock@oracle.com \
    --cc=npiggin@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=shuah@kernel.org \
    --cc=sln@onemain.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=tytso@mit.edu \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox