From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 8D7563DB306 for ; Thu, 2 Jul 2026 11:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782990566; cv=none; b=AoBQtexCusMYQqwOC2ySTxk+Id+BJm4e06J0gYPJPgHUQzrVb9K6LS9lBoO2DINdg4nuV2Cgw8CNHotti7B4N5rRMqmxoscyXsnSzVQIjR9UKumi1teDSdRp6KxFd/SuZIyY2/i7RzbB5+TOn6kwWUNayjqIH4mi+nODGr2dmK4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782990566; c=relaxed/simple; bh=H7+MDSBOZd4JQF5N1xSQnYga2rWSArQZ7jzGQ1exNGg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KrAisc6NHV2MjZH+ZJnkltGTlzlCXwMObNAQ2DmImDsJ/6OZC0nqfyfkhhoKIzrKS78FwUkjS1f+0l7BtK2GYb00wzW58z2SagcreA72nO9ZHB80d6LsZE/XTfffq3jpyRVnnh4HTgsXLRHFTFzG7Qu31cq3R905e3JpWs6Mr9M= 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=qSOGm3do; arc=none smtp.client-ip=209.85.218.74 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="qSOGm3do" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-c1263968a24so144892766b.1 for ; Thu, 02 Jul 2026 04:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782990564; x=1783595364; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=Te4HA4w2tioRKQn5/3FcPTwYWbx1EGaNajEvJ+1ehUQ=; b=qSOGm3dotx8CB/BamO9s+zgWfUU94ytVKORBOMOi0zbBdHgHWbrmfU3GUK4Os9lhrF csOV698cVGzm23vReYUGpuMngGcqjTS8gJ6b8rrXftKL0sLcZbLllu+PYKgZtFvXDLB2 LNpZ3orrYAZ4ZShV7Fjv5/6u7WYRSDeV5+FKIsMsnDP2ZQCOHcAO75HV2s1F67/hoKPP XLknyy3zunyF5zpGgQYvhFb2UKDYi1MGDZr/jUrL6hd+M78tcpiwXBwztYVBklOxTCL3 FXfsy0keHC2YpICiNz1znP6KUHpkaDlmZMs2T/2O083PO7UyJhxjRacA7Nf+GImVHQT6 GJoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782990564; x=1783595364; h=content-transfer-encoding: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=Te4HA4w2tioRKQn5/3FcPTwYWbx1EGaNajEvJ+1ehUQ=; b=Ys5hQj8FTsNe5bHGYoESlIfw+uOAcECnPc97zBRCAYOQCNDrpDLZ63jx702jF/ZMZB O63X3GbRIoyucbJvXy+DOHKRZbUfQPs0BxXP/DagKl7mEroL/vXJgr/ur+YV2NWO+n+D xKchXiOR1s4Y0WYHqXhDxOzL6ZCad0rrrxPAJmyg3NuNzK6lNbeJ/ejIh3elyVDK48zS Q9FQK+nl+DvVKjwYRvcqRKMp4EJuV+5RkX9O35Aw3BNPhXuXiTL7Qlv5uQP927Ek0LAC IXZEMNPhzxPosjgKbPQ/knEViqru7XFgOBsZBqfTnv2VcnKH+1bgodt3MjnOMaQr7hP5 8F7Q== X-Forwarded-Encrypted: i=1; AHgh+RrlT04cSsa+khTiHL1YnVFZ8HTDHeFh1OYnKPloKJaDERCMdBI8SNlRginY0kC9Z0Dl4Ic7okuLvgLrrXM=@vger.kernel.org X-Gm-Message-State: AOJu0YztAjfRhQXj48oUjQenARvrxzKxox9PeyQDeoejivGQ+2IUYDLt dZsvlX6c/LT/xHDLup6w1LR2Tz0jcVzBdU5oYpzGanx8Dvl9Q+0Vc1+PX9fRxOQCX+o2d7E2TTG nbNnootWQf2V2zLVUQQ== X-Received: from ejyr1.prod.google.com ([2002:a17:906:a201:b0:c12:7b32:c50]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:3646:b0:c12:507d:40c3 with SMTP id a640c23a62f3a-c12ae89f339mr226088666b.63.1782990563650; Thu, 02 Jul 2026 04:09:23 -0700 (PDT) Date: Thu, 2 Jul 2026 11:09:22 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260626214404.852685-1-nico.antinori.7@gmail.com> Message-ID: Subject: Re: [PATCH] rust_binder: use pin_init::zeroed for file_operations initialization From: Alice Ryhl To: "=?utf-8?Q?Nicol=C3=A1s?= Antinori" Cc: Miguel Ojeda , Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , Carlos Llamas , Alexandre Courbot , Miguel Ojeda , Andreas Hindborg , Benno Lossin , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Boqun Feng , Daniel Almeida , Danilo Krummrich , Gary Guo , "Onur =?utf-8?B?w5Z6a2Fu?=" , Shuah Khan , Tamir Duberstein , Trevor Gross , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel-mentees@lists.linux.dev Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2026 at 12:43:25PM -0300, Nicol=C3=A1s Antinori wrote: > On Sun Jun 28, 2026 at 7:16 AM -03, Miguel Ojeda wrote: > > On Fri, Jun 26, 2026 at 11:44=E2=80=AFPM Nicol=C3=A1s Antinori > > wrote: > >> > >> - // SAFETY: All zeroes is safe for the `file_operations` type. > >> - let zeroed_ops =3D unsafe { core::mem::MaybeUninit::zeroed().assu= me_init() }; > >> + let zeroed_ops =3D pin_init::zeroed(); > > > > I would just remove the variable and put `zeroed()` directly in the > > fops initializer like we do in other cases, but it is fine of course. >=20 > I thought of that as well but I tried to touch as little as possible (I > assumed that was in a variable for a reason). I can send a v2 if that is= =20 > preferred! I think it was extracted to a variable for line length reasons. You can remove the variable if you want. Alice