From nobody Thu Apr 9 12:08:45 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 F3398332606 for ; Fri, 27 Feb 2026 06:47:41 +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=1772174863; cv=none; b=j6IoRjlHrBa9fvwXiD0CGkSyO4QC8Ias0XuiPOrojdAbqJxZ2bQcTeTR4osOS/sRqcl8cUeRmY/VoQY+cc9kcu4ZtDtIVDcsHYCZti4iHdJh53tYJTakw73VQFBdSeKMRkGoB7x0qAz0Cde6igOCwMf7rIP/8SnJbJBwZL6M2M0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772174863; c=relaxed/simple; bh=pU15FyCQ5ngvWIproYD4ohhif4YjdLqDiVQYNOLOpfQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Zf32Ur/AvioCKIpB3FobeRt05pJTRBIIA+ro4M/7DopF0BLwshMJPctujjkYmOoqDORXKDlZuAQ43G82oPwBJ1f9nwyxp3DqMWMb1fDI7qNZ7y81f7RitkWjWCoYTKaOXVHPxM9YmPh1Evw4sBf8Qk6rRLBYiVBp6psMat68cxE= 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=e19fkPbB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+EFnzikk; 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="e19fkPbB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+EFnzikk" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772174860; 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; bh=C9sUlRwBofscjKQv91D4lZFKZp0iuKFp2Wf9/JBO7vw=; b=e19fkPbB6Q0mrE3/dXBZO5z9dbKlKO8rttR+dJyG4lsdsFT/I69gV6hMLnuVdNc+PRzgM8 py+xTkbU+gjS2pXJo9AfkWExJ/CPMu8fEqwf5mkTzyGTyx8Q5it4Rv8PM9OyN03unghENK 9x5LEprmgb7x4GoSQWCm+MIpC4slKuMJGNnYIhFtYnq71YgJ7rWHaFRy+jGfRUInuKU+gE X4dJ2UwnT73tDeMulTM6sYWjc/CzJf26JrZptaZaYdel3Q5u0nN7BGhMxY2uhNjCoBOB8F ex4tFHFaLk6C2KRvIde75T+Vwwj4HlIOVCkwxm2go3nnD5FQz36a7yrxSe7hGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772174860; 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; bh=C9sUlRwBofscjKQv91D4lZFKZp0iuKFp2Wf9/JBO7vw=; b=+EFnzikk7tXnK2tXAek08vh9cl2VeEz20+vC/GzVOgIMBTkvH/7reE25ouvhLdxLddtvlZ C1rfJxXqR0aKa0Cg== Date: Fri, 27 Feb 2026 07:47:38 +0100 Subject: [PATCH] x86/vdso: Drop pointless ifdeffery in vvar_vclock_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: <20260227-vdso-x86-ifdef-v1-1-7bacf5073cf5@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x3MQQqAIBBA0avErBuwQUy6SrSwHGs2FgoihHdPW r7F/y9kTsIZluGFxEWy3LFjGgc4LhdPRvHdQIqMoomw+HxjtQYleA44B20Maee83aFHT+Ig9R+ uW2sfeEsNK2AAAAA= X-Change-ID: 20260212-vdso-x86-ifdef-7f46624aad8b To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1772174859; l=1910; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=pU15FyCQ5ngvWIproYD4ohhif4YjdLqDiVQYNOLOpfQ=; b=tglMOpWHow318xPNDYJi+ndG7PkXGVt44w0vZKS7iPOMnKct0wkRgy4MCd94Hz67vHLjiYSF2 qjdUqmSM9FyDHF2VJj9mSe+C3bH+Fob+v7OUFYu1kyFZj3Yvj3RIfaE X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Sparse complains rightfully when CONFIG_PARAVIRT_CLOCK and CONFIG_HYPERV_TIMER are both not set: arch/x86/entry/vdso/vma.c:94:9: warning: switch with no cases The ifdeffery is not actually necessary as the compiler can optimize away the branches already if these config options are not set. Remove the ifdeffery to make the code simpler and sparse happy. Reported-by: Thomas Gleixner Closes: https://lore.kernel.org/lkml/20260117215542.405790227@kernel.org/ Signed-off-by: Thomas Wei=C3=9Fschuh --- The other patch from the linked series will be handled in another series. --- arch/x86/entry/vdso/vma.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index e7fd7517370f..a6bfcc8243cd 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -88,7 +88,6 @@ static vm_fault_t vvar_vclock_fault(const struct vm_speci= al_mapping *sm, struct vm_area_struct *vma, struct vm_fault *vmf) { switch (vmf->pgoff) { -#ifdef CONFIG_PARAVIRT_CLOCK case VDSO_PAGE_PVCLOCK_OFFSET: { struct pvclock_vsyscall_time_info *pvti =3D @@ -100,8 +99,6 @@ static vm_fault_t vvar_vclock_fault(const struct vm_spec= ial_mapping *sm, pgprot_decrypted(vma->vm_page_prot)); break; } -#endif /* CONFIG_PARAVIRT_CLOCK */ -#ifdef CONFIG_HYPERV_TIMER case VDSO_PAGE_HVCLOCK_OFFSET: { unsigned long pfn =3D hv_get_tsc_pfn(); @@ -109,7 +106,6 @@ static vm_fault_t vvar_vclock_fault(const struct vm_spe= cial_mapping *sm, return vmf_insert_pfn(vma, vmf->address, pfn); break; } -#endif /* CONFIG_HYPERV_TIMER */ } =20 return VM_FAULT_SIGBUS; --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20260212-vdso-x86-ifdef-7f46624aad8b Best regards, --=20 Thomas Wei=C3=9Fschuh