From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEA45309EEC for ; Mon, 10 Nov 2025 11:54:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762775696; cv=none; b=bWQ1Iy3SoAOJoE1hGQZAouvNOfdCAEZyGx9Rtdysmrz90HUltfkHFX/rGHxuGneVlfc5kavJbrlnvgUpUtRu88ALGbqmmQ8G6UarFkg0L7t0aUxRod90O/S8ch/0TrWR/yM8tkS1WhW1FPyf3aZZ96K3R8crfW97ns6nHcav/Es= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762775696; c=relaxed/simple; bh=Wld7jp9tEQXuIh09SWUvMZLGcORmYH4LRprox5mayS4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Aj/KvZxrMC4r1qO7r3HmIIT0aClk37HP3dnFlPo04+ZrFwlW0TbX+Ohs2qcYefLrG3nOET3jSY67FQEhRs+6MeQazTvA20hw3Nz95UmUiSqODGW02jZVavQV5LIFPZ7l875tjJ/gnaiR6/8dSRPQKgWfRBq8WcpzkN//TcIW5Jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Yxe5My0q; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Yxe5My0q" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-6409605a485so2917500a12.0 for ; Mon, 10 Nov 2025 03:54:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762775693; x=1763380493; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=RQQBm4PwQuyI6yZ9AdqTjALBwiLdrNslKJZVi9Mtf9A=; b=Yxe5My0qzeQJg0PhWL6EKJGdRWXdvyWwA6GKEJBtTzxfccEC879ZHcA6PZIRHCwRG1 JQARHzpFvIWNeLAlK7WJR70EHZOhaBETWBmwU3lsGS+jYgrkp47cMSr71HVvxORvg6ry LEfQobC1E+pH58SKkK8cpdb+xofnjIyD8dpRbHKREEWMZ2Nj9ytEr6mAd99Bt648rWWs 6uH1w4mmjPOI7Ip3hP3V1G7UVTOXcU0BDEY3G9e/mSIRSdHz57ccrczAsrz6j/2yaeYr 3hE/T0rTw0LfuPbbnQC7TR54RFvl8k/rAbXiaNnXVbdA2ofwAsC9HySBeg2nyYQboonh LIpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762775693; x=1763380493; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RQQBm4PwQuyI6yZ9AdqTjALBwiLdrNslKJZVi9Mtf9A=; b=B4UjcVrZFq7utGlEc7/4UBA/DAr9jA63mM5VjLnky7VyBnuo19qums8+L2YrthliWF APqmg25+IaWPOlPWnBiVj6QARnZIDj5H5Sx78DVR1NbbSHrzvZy1O36ESS5T/pc2cQ4M UeH7ubgWZwtR9fBRzI0gSCBOJN5OdOM2p8T0Ll4RaPFpWN76Q66bTjnON1wIxPHcoAOP 3PIFXCS5n4qbEE1xxqK8+QZ11+0G2rOczAQjPM8+GOp+nqzgtd1+GURe3qeVqn74/c30 KL2NMFnBaBRm3SQUueK8pA98elQoIYI/qHj6B6QyrWASjCQdpssmlZ0P2qJYq7lmVC+q zUHg== X-Forwarded-Encrypted: i=1; AJvYcCUJZr+dj+q598LIQSU1K1CauFjlFcJqjQDjKsjboTAMOe8zlbtBArnEM2Gew1KgNmrYdukQ5MP0kfdey2EtMQ==@vger.kernel.org X-Gm-Message-State: AOJu0YyUNDOLtlx3n7bxjPCBQDteV9TcjD0eTW9FoftRRrY/nzZ8upv6 k+Uyf2BJmWWvWdos7mM5/TcWNnd16eQ4tv6Tr0OKz7gtbpqQ05H+IHeefAFO0Xgy1nHr5aTzmRG VTGZ60f1CBEEqIx7yuw== X-Google-Smtp-Source: AGHT+IF3M40dNIzNZkxr/1+aJ+nfeEg2fTctw3V8OcAEVxMO8ut0+MdQ2WzFfOK9xMLQ2EWoslAnSoMKLCyCugk= X-Received: from edaa20.prod.google.com ([2002:a05:6402:24d4:b0:640:949d:9bf8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:27d4:b0:640:fb00:9b0b with SMTP id 4fb4d7f45d1cf-6415e8565d6mr6321846a12.32.1762775693084; Mon, 10 Nov 2025 03:54:53 -0800 (PST) Date: Mon, 10 Nov 2025 11:54:52 +0000 In-Reply-To: <20251110113528.1658238-2-ojeda@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110113528.1658238-1-ojeda@kernel.org> <20251110113528.1658238-2-ojeda@kernel.org> Message-ID: Subject: Re: [PATCH 2/2] rust: device: make example buildable From: Alice Ryhl To: Miguel Ojeda Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Brendan Higgins , David Gow , Alex Gaynor , Rae Moar , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="utf-8" On Mon, Nov 10, 2025 at 12:35:28PM +0100, Miguel Ojeda wrote: > This example can easily be made buildable, thus do so. > > It would have triggered an `unreachable_pub` warning without the previous > commit. > > Signed-off-by: Miguel Ojeda Reviewed-by: Alice Ryhl > rust/kernel/device.rs | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs > index a849b7dde2fd..d00f4af507db 100644 > --- a/rust/kernel/device.rs > +++ b/rust/kernel/device.rs > @@ -67,7 +67,16 @@ > /// > /// A bus specific device should be defined as follows. > /// > -/// ```ignore > +/// ``` > +/// # use core::marker::PhantomData; > +/// # use kernel::{ > +/// # device, > +/// # types::Opaque, // > +/// # }; > +/// # mod bindings { > +/// # #[expect(non_camel_case_types)] > +/// # pub struct bus_device_type; > +/// # } > /// #[repr(transparent)] > /// pub struct Device( > /// Opaque, > -- > 2.51.2 >