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 C0BF430216D; Tue, 11 Nov 2025 08:16:35 +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=1762848995; cv=none; b=Q9avLzrw6DOVTvdVQq3SjGhEPE8lTIxEtaZcMImGwVeaTz0ytKulwk0PjZA2x1WceSZeK0igcuu/6GEl6Vx+1SzrLFeCfNzl16NDxy9hlH0hxpavBHkWfmH7KHLXzH1J8nk6qqQ5cfoOXkptOqmDLRVHMOZObUYWTT3aZ1k7vs8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762848995; c=relaxed/simple; bh=i/34ey75nSIkV0QR/NEIq1NPpiVet7wGRPFjErBWSbs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=ZOS/W178tPWNrxYEPMGnhnOTWBtP9oRjm7pjjfJHQD8DEGiY0ayOn/BqHQkiIxpIIMuBF7iVaQeJIMhXy4Lh9hMaF2MAa+pbZ+BXNbKUrl+kL1KYzogCNUIam9YdUVsjoqRnyXlTQ+KBFdEKuHPkOIGwge10pnpWBO+b09ewMJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fc/ebSvD; 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="Fc/ebSvD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8561C116D0; Tue, 11 Nov 2025 08:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762848995; bh=i/34ey75nSIkV0QR/NEIq1NPpiVet7wGRPFjErBWSbs=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=Fc/ebSvDY8kWOBKFeo6BsDbC8dZCT5vdIlaXYOU3mzV5ueYqmBar4DunSxTJlAKAI xsJxXKib/1eSua2tprvTByaSRfaxpIPsCf6LAgKtzUiapKRGRda9gH3eM4+hEn1ElC 3l7DQQ7sQkeEKWCqmnQF9ROzVbMJ2CDqRNUexFMk4cWYYx0DfTSu7Oi++Z3z9zgKla 5xe1s1avHS2jciZHOxfqNkuwXkrvDJuKxI436qYv0X/TIq1YEuH7oM7tpj1+Bebu5l 9k7HZ9vAnAZmy2c0ACJCFPp1rZMaTmrkFNgQ7x9Ls7pj4uxD9FJi+LHfE7JWG0vGkV PzAQ5X3vo0lLg== 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, 11 Nov 2025 19:16:22 +1100 Message-Id: Subject: Re: [PATCH v7 3/4] samples: rust: add Rust I2C sample driver Cc: "Miguel Ojeda" , "Alex Gaynor" , "Wolfram Sang" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Greg Kroah-Hartman" , "Viresh Kumar" , "Asahi Lina" , "Wedson Almeida Filho" , "Alex Hung" , "Tamir Duberstein" , "Xiangfei Ding" , , , To: "Igor Korotin" From: "Danilo Krummrich" References: <20251110112437.50405-1-igor.korotin.linux@gmail.com> <20251110113116.51743-1-igor.korotin.linux@gmail.com> In-Reply-To: <20251110113116.51743-1-igor.korotin.linux@gmail.com> On Mon Nov 10, 2025 at 10:31 PM AEDT, Igor Korotin wrote: > diff --git a/samples/rust/rust_driver_i2c.rs b/samples/rust/rust_driver_i= 2c.rs > new file mode 100644 > index 000000000000..79d0055793d7 > --- /dev/null > +++ b/samples/rust/rust_driver_i2c.rs > @@ -0,0 +1,69 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +//! Rust I2C driver sample. > + > +use kernel::{acpi, c_str, device::Core, i2c, of, prelude::*, types::ARef= }; > + > +struct SampleDriver { > + _idev: ARef, > +} Let's just leave the struct empty if idev isn't used anyways. :)