From nobody Sun Feb 8 10:21: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 99B5730C360; Sat, 1 Nov 2025 19:47:58 +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=1762026480; cv=none; b=Ajde4vWWFv67es2SnPiffytDbg2QCXTb2Me9MgoemHXElMzjtDpKYGleQyrh/EAFt35lgEubyTQlhMInNuHMcV5pZfu//QMAKEAHDrYjHURQo7U8+14syUApNdNjFV7CqljcVwZElY57kQrFycMcxxKm/HT4D0IxmhQTOta6yNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762026480; c=relaxed/simple; bh=DwOvqOLvy+tSccTI3LD2xFYP9QLFAMbTQaydAtoOhSg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KfWiJnoXegIKv2dlwW8PxQhS6LF8SKjpQWrq+PFHO0LvpLqu+C8R62G8lXgOf5PGjCbfAhhhskEmIl6i+e1HPp7XjbGoCX6cuhGbylC5EBbwN1ywDfGRU0JHE5ZWnGXD2ZrckdNpbnsaDs2Wux6GSxr7m8DvUXIONOGe5SUmn6w= 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=4c+4U1oN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=x+m443EU; 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="4c+4U1oN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="x+m443EU" Date: Sat, 01 Nov 2025 19:47:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1762026476; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=eZ4atywAYS+oQVd8VxvJOCmDE+q5X60j/MRX0zzvE3o=; b=4c+4U1oN0DLJtENM9cWyMjnDpET4FeZwG/1AHhQO7sN1JiKRdret8C0KDKcgMZ11aeRyDY xgGZ3E2Io05RbEWuAw7ugLjzvXGCP3KKOf9r0h/TPc0Yk9JjMArq7uB5j3r4goy7eDKOMw 3wSnbtlsmDb9gJcn266KyuSMeBA12L1u/vwqKB9xfy3TC3Lu/U6Z2tRK43N2R7C/0ep3MF OdjhRce+Gs8xffdXzFIEUU03ZA+gIqN6zO6zpgwBbLFcv6uMJhI3WKvIVKfXs8blU8HejU /9sii2DP0dzfWwhp38JPGN4VWRCFCKM9U0mv8eUYLNLedeDckM4Zd4RGy2rdyQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1762026476; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=eZ4atywAYS+oQVd8VxvJOCmDE+q5X60j/MRX0zzvE3o=; b=x+m443EU/I662NzuUTcTHq9qfR5BN7r8im1+cSNMIHXEzIgBiHRMBagu8BxHihp41JcROa /U3lP/i1IoogUvCw== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/vdso] random: vDSO: Remove ifdeffery Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , Andreas Larsson , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20251014-vdso-sparc64-generic-2-v4-17-e0607bf49dea@linutronix.de> References: <20251014-vdso-sparc64-generic-2-v4-17-e0607bf49dea@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <176202647550.2601451.6445885453710089648.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/vdso branch of tip: Commit-ID: 189163e207c49196e52e86737dc3048f37a8eee9 Gitweb: https://git.kernel.org/tip/189163e207c49196e52e86737dc3048f3= 7a8eee9 Author: Thomas Wei=C3=9Fschuh AuthorDate: Tue, 14 Oct 2025 08:49:03 +02:00 Committer: Thomas Gleixner CommitterDate: Sat, 01 Nov 2025 20:44:05 +01:00 random: vDSO: Remove ifdeffery Ifdeffery in C source files is discouraged. Use IS_ENABLED() instead. Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Thomas Gleixner Tested-by: Andreas Larsson Reviewed-by: Andreas Larsson Link: https://patch.msgid.link/20251014-vdso-sparc64-generic-2-v4-17-e0607b= f49dea@linutronix.de --- drivers/char/random.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 3860ddd..b0b88c6 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -56,9 +56,7 @@ #include #include #include -#ifdef CONFIG_VDSO_GETRANDOM #include -#endif #include #include #include @@ -274,7 +272,7 @@ static void crng_reseed(struct work_struct *work) if (next_gen =3D=3D ULONG_MAX) ++next_gen; WRITE_ONCE(base_crng.generation, next_gen); -#ifdef CONFIG_VDSO_GETRANDOM + /* base_crng.generation's invalid value is ULONG_MAX, while * vdso_k_rng_data->generation's invalid value is 0, so add one to the * former to arrive at the latter. Use smp_store_release so that this @@ -288,8 +286,9 @@ static void crng_reseed(struct work_struct *work) * because the vDSO side only checks whether the value changed, without * actually using or interpreting the value. */ - smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_gen= + 1); -#endif + if (IS_ENABLED(CONFIG_VDSO_GETRANDOM)) + smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_ge= n + 1); + if (!static_branch_likely(&crng_is_ready)) crng_init =3D CRNG_READY; spin_unlock_irqrestore(&base_crng.lock, flags); @@ -742,9 +741,8 @@ static void __cold _credit_init_bits(size_t bits) if (static_key_initialized && system_unbound_wq) queue_work(system_unbound_wq, &set_ready); atomic_notifier_call_chain(&random_ready_notifier, 0, NULL); -#ifdef CONFIG_VDSO_GETRANDOM - WRITE_ONCE(vdso_k_rng_data->is_ready, true); -#endif + if (IS_ENABLED(CONFIG_VDSO_GETRANDOM)) + WRITE_ONCE(vdso_k_rng_data->is_ready, true); wake_up_interruptible(&crng_init_wait); kill_fasync(&fasync, SIGIO, POLL_IN); pr_notice("crng init done\n");