From nobody Wed Apr 1 12:33: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 61DE538B7CD for ; Tue, 31 Mar 2026 07:59:29 +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=1774943970; cv=none; b=AV+5ScpZR2ALPY1F3ENggnIChz/qgOjb9K0A7jLkWQxoXgbBhkVdvsLcuMDDrBYfRCHhe6wwcogAB6iv5FX6MVSMQrvrkl6deCSoPSNq+twmqEXWoOR3eVzz5kLDXgerJe5PwC2drGJ+V/FDaYO0xpDCfW8ycjgBuvM6VHLmBEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774943970; c=relaxed/simple; bh=pU15FyCQ5ngvWIproYD4ohhif4YjdLqDiVQYNOLOpfQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=WjqQpezbsKzxrml7BBP4jgZTTUU5v0HsQbTPuq4cpcaniGHnwWX8NegIEzvK9sY7CYTKNXHaydBVVKxz2FH93kos/fso5tOtOpWk9xliwlHCZ0rWhznT1BZ45w8t/r97ZAn061iNajrfJasdBZD6RJ8Gv2G/q9ORqWsBjNQ0IP0= 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=4awL5piA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6hjZsUul; 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="4awL5piA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6hjZsUul" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774943967; 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=4awL5piArfo5UTYI9H1D9fpXJVU6SZZ8eijb3vi7nPBOErlXzumTp65ueSz8lX6yoCZuQg kP1eZPoKXYHB8vXJakRPRKBlNF1wtwug1nwtBrwv56827bsdHADRB0F1L4cq86W6yrYGMY tJCj6hQLDwP8UtNKZas7bfADFbIwcGTjezrIwyrNYqAasJtVp4+6BeA0AOycjHgknHGrYD 4q0ABDzhNV5TtXVLsVSd9cqKb9JB1nUdaXApTx7vvYqBG6mODl+zoKuKyrUia7zA3cvTSJ +i0k9zEDUndtvhdFYMcs2XdXeXJcA6bS16Iz5Eo6XdN8+ZeTp2e0uouot12NFQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774943967; 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=6hjZsUulDpOI+8QrYJZgRuO0ZqaYCfQVpjG7he/VQOKGZCX3oE+hFzrTlfijIQU0OdEZrv WsofPgs7yZVlcuAA== Date: Tue, 31 Mar 2026 09:58:54 +0200 Subject: [PATCH RESEND] 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: <20260331-vdso-x86-ifdef-v1-1-6be9a58b1e7e@linutronix.de> 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=1774943965; l=1910; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=pU15FyCQ5ngvWIproYD4ohhif4YjdLqDiVQYNOLOpfQ=; b=FLodXd+80BhC20DHRtmWyUuSRaNFZPlw18LAY2GVeOHue1CEyXChYsQGudYpzxLcDite3Iihr 6kh+/yPPScCC81I+jHpxp2g4kRsjUnGaTWdre9a5+hFNjZNAIbcm39S 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