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 325623EBF1F; Thu, 12 Feb 2026 14:01:39 +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=1770904899; cv=none; b=nL1yv9+zeRlnCJdI4a5FtuemqSsTbativaygAwloPGuyYCYBJJHk6a0Qy2K3C7n2CvRPVfgKyya/mrgme17gVzHmnCoO7Q8zReuhoSKM9L1c5vcn+1nubYJTzW4ZWhI5xDuW6DGLcrqVy24XP9pfafgWphDVqQi4bRjzLW0nt4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770904899; c=relaxed/simple; bh=q255LW2NGXZnwgvkPm1VB5LcqPE0iLSjOErv9KPVwLg=; h=Mime-Version:Content-Type:Date:Message-Id:To:From:Subject:Cc: References:In-Reply-To; b=qIsgKvJzXZBCCNB/J8zG/KzudnqnL9TseE6LMf834R54iGtAVmeEC9+U4c5avlrI5/zHA2zV0WIxwcciq5iXrrllz7OAz8W15rqjxfVZ6VCUjBLOZunybCKT6EN2GmwfCkeUO48sBfNDE4DH1FYSgrsATpTrSNVZtmzJeDZ6U1M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IhB2vmVh; 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="IhB2vmVh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 816CDC4CEF7; Thu, 12 Feb 2026 14:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770904898; bh=q255LW2NGXZnwgvkPm1VB5LcqPE0iLSjOErv9KPVwLg=; h=Date:To:From:Subject:Cc:References:In-Reply-To:From; b=IhB2vmVh93ZzFpYfLyXgfCB1XI973SeOPjXHCjdMvT2tc/eMxFyIfieVCzaYm9z17 phvUwl525/GGPCwGxxssIVFbsLg9YhPKbEE3Q8vslSuE05Ax1ZJpEJPzzXHKmhnDjz GnNQ/5wPMCZA72tf8pP0BZ818qNi1T/mtVUVSj99ln+pejsM4nmFLFGEZLZffsvtb8 D1hs/Pcb5sezJw9Zk+jcqSLGODjIaeyrlE3lG7EIw7afLqgzfunbQPgLoxpUamwnjH wYtae+6pWDPbVZD80Fzzap5GAkaWR8AxZZWF6V0PBAZT/zqdZ+13TP1yt0RK5k96Bo sxC/eW4sbF2Zg== Precedence: bulk X-Mailing-List: linux-kernel@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: Thu, 12 Feb 2026 15:01:31 +0100 Message-Id: To: "Maxime Ripard" From: "Danilo Krummrich" Subject: Re: [PATCH v3 1/3] rust: clk: use the type-state pattern Cc: "Boris Brezillon" , "Daniel Almeida" , "Alice Ryhl" , "Rafael J. Wysocki" , "Viresh Kumar" , "Maarten Lankhorst" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Drew Fustini" , "Guo Ren" , "Fu Wei" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , "Michael Turquette" , "Stephen Boyd" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , , , , , , , References: <20260119-weightless-pelican-of-anger-190db0@houat> <20260122-majestic-masterful-jaguarundi-d0abde@houat> <2F3D3A40-6EF9-46FC-A769-E5A3AAF67E65@collabora.com> <20260204-nickel-seal-of-poetry-8fdefb@houat> <91A92D84-1F2E-45F3-82EC-6A97D32E2A78@collabora.com> <20260204-angelic-vermilion-beagle-fd1507@houat> <20260209105047.693f2515@fedora> <20260211-flawless-feathered-boar-0b87ad@houat> <20260212-obedient-faithful-koel-d8aaf6@houat> In-Reply-To: On Thu Feb 12, 2026 at 10:23 AM CET, Danilo Krummrich wrote: > In particular, I don't think we need an unsafe API until we see a concret= e > example where the proposed safe API does not work (and no other safe API = would > work either). One additional note for clarification, I'm not saying that I'm against an u= nsafe API if it is necessary. In fact, I have added an unsafe API for drivers myself with the dma::Device trait [1]. This was not an easy decision and I discussed this back and fort= h with a lot of people and, unfortunately, we had to come to the conclusion t= hat any attempt to make this safe from the Rust side of things would cause unreasonable overhead and can't be considered an overall improvement. But as I said, I am convinced that need clear evidence that an unsafe API i= s actually needed and that there is no reasonable alternative. [1] https://rust.docs.kernel.org/kernel/dma/trait.Device.html