From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 84FF2211A15 for ; Tue, 18 Mar 2025 18:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742323031; cv=none; b=Jbmbhnqawm90EVfgmB+R+CProPRXORX1OYzg0qymGZbj+iDLuIePB+l5aWc1tbThRQmPrH7gLN4kcuuYKyEyiWprDHliaQI1mJZh3hrX0sBgrn9NKrM7qh1yKoeccP3vpaRqs1fnwwB2QytGHkNiSUGzoPnY5xhbRVvF2E5fdcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742323031; c=relaxed/simple; bh=i7GuafmWBBFxpauQdZaROHEcBUjPAdboz1fmHtgeylA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WJ4bxDAlhHm68d2oex05Wv5btUmTC0wWt4Jxjk9RtmyfiFenNrxktSv+xeysH6jZvhYri9hmt3aie3PQzoEeFWi0uJHtRRmHcP3d+CBiPfd30bs+3qr287ufzwoAfnbgVjETxWpVMg9TB5zNknRwRfQLkdfe+LlfRx6X6VRd8Rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=CKZkYIQR; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="CKZkYIQR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1742323020; x=1742582220; bh=Yqjw4oYBMyP+agQT2xlzF7ZEejJZSYZaTAXHjkwEyvo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=CKZkYIQRmel8zrpAeShCHV6LCC0P/elui7Y3GMW/++qszLvbDeng9caIx05kWj5Yr A+q74S/EgDyd7gCsL3PgS2lV+gjaR5GgZz6GFu0iHzX0H97W3Xk6gBwykbRj+lZP2e 4RPoVYtWFIFkQtnwJqor2fLgX8LmsW15HzHeaNy5oioCZnCsIjy3wdY+mJ8M9HOTlf ltvqT37p5z/397VQpODCVK9O8k9Lz6I3Mj2SsVpCizqYGGsAweyPZ4sLI9gjceBR4e PrLQsdrlkfa/SI3rmgAJ4c+2ALZYHsQqFw59/wBwoQDXSCYgU7/Zf3Log2i6I6XYT8 dqjiQhroS3ZuA== Date: Tue, 18 Mar 2025 18:36:52 +0000 To: =?utf-8?Q?Beno=C3=AEt_du_Garreau?= , Danilo Krummrich From: Benno Lossin Cc: gregkh@linuxfoundation.org, rafael@kernel.org, ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu, airlied@gmail.com, acourbot@nvidia.com, jhubbard@nvidia.com, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH v2 3/4] rust: auxiliary: add auxiliary registration Message-ID: In-Reply-To: <20250317204310.7804-1-benoit@dugarreau.fr> References: <20250317204310.7804-1-benoit@dugarreau.fr> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: 52341dd8e7b999e11b7fcbcd4b0fa06e7b6ef2d4 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon Mar 17, 2025 at 9:42 PM CET, Beno=C3=AEt du Garreau wrote: > On Thu, 13 Mar 2025 03:23:52 +0100 Danilo Krummrich wro= te: >> Implement the `auxiliary::Registration` type, which provides an API to >> +impl Registration { >> + /// Create and register a new auxiliary device. >> + pub fn new(parent: &device::Device, name: &CStr, id: u32, modname: = &CStr) -> Result { >> + let boxed =3D KBox::new(Opaque::::z= eroed(), GFP_KERNEL)?; > > You can use `KBox::init(kernel::init::zeroed(), GFP_KERNEL)` here. It avo= ids > the need for the first patch. We probably should have the zeroed function on the `Zeroable` trait... --- Cheers, Benno