From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 87CB4175A5; Tue, 21 Oct 2025 15:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761060049; cv=none; b=lEhGBdxwJwhXYlP9PqSa/16SWyOM6xnfdgXLmmMqd9MXVBWZLFY5TztGZojKR2omEEl8XeapCpPRcIOW/PheH9ZXWEB0YXpFLwzIDB+iSsD4tgNwPaibWqBIl1/HM4tkasNCocBQ44tHe6dxcswQVdonAdGXXGa7c3vDAJkz72k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761060049; c=relaxed/simple; bh=FlKhdSj18RuP+dRMPDXQQzSP9m3wGXtoNXCkiETpoIQ=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=fVi0qpZoRyffVeYFe21m4mSZSAWmXWwCfqHG576w8tnFEy2HX8dmr8WU+U4ut3f1520DEgtRrL10U9NBMSqUGivUfmhmWfzdSGYO/AgQem2J5JP3FqbbtuMKTP6cKpSM11sZjPUl5OuAkeegL+E3vrQwicf7moO2cer1pZXvUOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ihG4IOS3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ihG4IOS3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B566C4CEF5; Tue, 21 Oct 2025 15:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761060047; bh=FlKhdSj18RuP+dRMPDXQQzSP9m3wGXtoNXCkiETpoIQ=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=ihG4IOS3gUXNaTenMxIo9xU0NFu4B2EDiRLYXmz4/XV5PcBN1DoEiK3a/+ZS9NGB9 cDJryp9Mz5+I2X6/WH2hVUuVfynUFMqrDRZsm4AbtBH5fg61LttRF8EZlt0ION7p/W +KQpwqILyaaEiwPcw4cGlAFj5VbOPWInoPDvDBpc7WszNbXOp+hQcbnsmARueWHplF CpA1clWjJNVyx4orWIs3RO1emgNF7T5Wm6XVgzosu3YH5l9rfegyk/38oz/hpt3TtZ +qCQyRNqJS/6zQ+5x+pN6y0TiTs258qucgX/5e5m3H/AVmD04/aYDJY6pylbLfMgr0 ClDauD/ETO9yg== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 Oct 2025 17:20:41 +0200 Message-Id: Subject: Re: [PATCH v2 1/2] rust: add udelay() function Cc: "FUJITA Tomonori" , , , , , , , , , , , , , , , , , , , "Greg Kroah-Hartman" To: "Miguel Ojeda" From: "Danilo Krummrich" References: <20251021071146.2357069-1-fujita.tomonori@gmail.com> <20251021071146.2357069-2-fujita.tomonori@gmail.com> <54328318-c235-413a-a069-5ea93f1dcb2b@kernel.org> In-Reply-To: On Tue Oct 21, 2025 at 5:13 PM CEST, Miguel Ojeda wrote: > i.e. if they aren't sure what the value is, then I would prefer they > clamp it explicitly on the callee side (or we provide an explicitly > clamped version if it is a common case, but it seems to me runtime > values are already the minority). Absolutely! Especially given the context udelay() is introduced (read_poll_timeout_atomic()), the compile time checked version is what we r= eally want. Maybe we should even defer a runtime checked / clamped version until it is actually needed.