Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vdso/datastore: Reduce scope of some variables in vvar_fault()

These variables are only used inside a single branch.

Move their declarations there.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-1-d8eb3b0e1410@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
dc432ab7 62357a58

+4 -2
+4 -2
lib/vdso/datastore.c
··· 41 41 struct vm_area_struct *vma, struct vm_fault *vmf) 42 42 { 43 43 struct page *timens_page = find_timens_vvar_page(vma); 44 - unsigned long addr, pfn; 45 - vm_fault_t err; 44 + unsigned long pfn; 46 45 47 46 switch (vmf->pgoff) { 48 47 case VDSO_TIME_PAGE_OFFSET: ··· 53 54 * Fault in VVAR page too, since it will be accessed 54 55 * to get clock data anyway. 55 56 */ 57 + unsigned long addr; 58 + vm_fault_t err; 59 + 56 60 addr = vmf->address + VDSO_TIMENS_PAGE_OFFSET * PAGE_SIZE; 57 61 err = vmf_insert_pfn(vma, addr, pfn); 58 62 if (unlikely(err & VM_FAULT_ERROR))