Skip to content

Commit 7fa3c36

Browse files
committed
x86/vdso: Add missing brackets in switch case
0-day reported: arch/x86/entry/vdso/vma.c:199:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] Add the missing brackets. Fixes: e93d252 ("x86/vdso: Split virtual clock pages into dedicated mapping") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Closes: https://lore.kernel.org/oe-kbuild-all/202411022359.fBPFTg2T-lkp@intel.com/
1 parent a812eee commit 7fa3c36

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/x86/entry/vdso/vma.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,26 @@ static vm_fault_t vvar_vclock_fault(const struct vm_special_mapping *sm,
196196
switch (vmf->pgoff) {
197197
#ifdef CONFIG_PARAVIRT_CLOCK
198198
case VDSO_PAGE_PVCLOCK_OFFSET:
199+
{
199200
struct pvclock_vsyscall_time_info *pvti =
200201
pvclock_get_pvti_cpu0_va();
202+
201203
if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK))
202204
return vmf_insert_pfn_prot(vma, vmf->address,
203205
__pa(pvti) >> PAGE_SHIFT,
204206
pgprot_decrypted(vma->vm_page_prot));
205207
break;
208+
}
206209
#endif /* CONFIG_PARAVIRT_CLOCK */
207210
#ifdef CONFIG_HYPERV_TIMER
208211
case VDSO_PAGE_HVCLOCK_OFFSET:
212+
{
209213
unsigned long pfn = hv_get_tsc_pfn();
210214

211215
if (pfn && vclock_was_used(VDSO_CLOCKMODE_HVCLOCK))
212216
return vmf_insert_pfn(vma, vmf->address, pfn);
213217
break;
218+
}
214219
#endif /* CONFIG_HYPERV_TIMER */
215220
}
216221

0 commit comments

Comments
 (0)