From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.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 DB1E9431E68 for ; Thu, 2 Jul 2026 11:08:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782990541; cv=none; b=dvwKD8X5JwEnP6a7XYSpefOyU1CMg+x9NMpaXwX/hJSQBGHeQ3Td5SSaZXLYy1MTzlvNkfEQ+lv3szRBGwaRQ7yiMWLqK8+6f2zmZPsZX4tFv1v+khSgQebxY3sxhcM39abT8EXNQLO624cJMN8/mkmZ/aHOB3SJy9zaziHtteE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782990541; c=relaxed/simple; bh=jVCZGfbP7HC+WzTxesl+YUJReLdqruEqQo/d3g5mQHQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=tM7+OZhrzISaFgWFixyCFKPeWTpSmQSb1Owhi1QQJztBqBarxx/T61P1u4kV02TSPESW5BtPe7lpWi9hK51zKgtzQJvt+IxerPVbImn2G1h0N+bBKdi6pSTl3uzqCStnGNBw2WW8NubM+ala34YT9NTcuN81rymG0Z4P1WaKNqA= 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=M7n+42nu; arc=none smtp.client-ip=209.85.128.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="M7n+42nu" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-492488f8583so25430605e9.2 for ; Thu, 02 Jul 2026 04:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782990538; x=1783595338; 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=jVCZGfbP7HC+WzTxesl+YUJReLdqruEqQo/d3g5mQHQ=; b=M7n+42nufjcqGgktC9jcmp3PzN8GZt7jEneo4FTbT6aIPZl0IlaPVbLi07MQgN0iKi adKdUSi8ikNvcdh4CfV2WAmm+xuHym0khLBX6acatcrZZwVkOJ0qqpYnQx1Z1btfjbWh LUtknxCRN0e04m3pDSH60MZtNCKrq+WSLRpRHVO51IdUAJX1TU6bUIe6vJ9bGi9WBBEb qZ5ZMa3xtAl8D5M/NxRqWaV6E04iIByRLjb2ow0oEjHy23sayb9fyvVnAWH/Zv+r82rt 00cfLmygXeN8t02DiUaVdrXJpJWpG8f4wiFyTYPplZgncUpiHPBQcpdLEqaz5U3ceNam JSew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782990538; x=1783595338; 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=jVCZGfbP7HC+WzTxesl+YUJReLdqruEqQo/d3g5mQHQ=; b=T/zBBPvJq417lBHavCZzFQSYq+RVZXzZtzyaIOnRNiiL1uLI1jKigY30kDnCNU485E NQWgJvPZZoTnZFywVMKYI0Xgx2CU9lgkT6ikSkAmT9thlN39qmymXZ5VyTwy6I6UBc+l qB8FcFOlPBmaTYTuMd2ap0UoNtm2PP69e4wAwz1bLj3oNKpQHWRoODzIeMFy7FyzOgV6 djBvjK4IXCYHwK5hhD7mS7L3nJFekQYYp8k7syyqpqJuqWpY6QgQx4Hu1tjQJ+7hPPLc aqSMdFCAYDvd3oJ8C6AolVOhw/46CQhsaO3XmN+e5JU+O9JLXGGwsrBZYYf8RBGikQQW fdAw== X-Forwarded-Encrypted: i=1; AFNElJ/qvoskMh+Of5WyjTy4pqyefUBdJQx1+1hSXb2zZQRByMKD3/Z97paOEN+glYB7ndxuFa43QaHn+h0Si0I=@vger.kernel.org X-Gm-Message-State: AOJu0YwwZbOlTvc2xX68AHBJ6weJ1NRVLkuHDUAvc08ba8QXvELZ158o Jr4XiUpPI/4vFaP272sUQYWZiKPfbJbq6OetjPCwD3HDxJ73drfX8rimEaTnEtswI3E9ZP4U8kf pEq+qIMjxZyd4+YE6pw== X-Received: from wmer11.prod.google.com ([2002:a05:600c:434b:b0:493:aecc:774a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:34d4:b0:493:bd2f:c5fc with SMTP id 5b1f17b1804b1-493c2b3d569mr78696805e9.15.1782990538252; Thu, 02 Jul 2026 04:08:58 -0700 (PDT) Date: Thu, 2 Jul 2026 11:08:56 +0000 In-Reply-To: <20260626214404.852685-1-nico.antinori.7@gmail.com> 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: 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 Fri, Jun 26, 2026 at 06:44:02PM -0300, Nicol=C3=A1s Antinori wrote: > All types in `bindings` implement `Zeroable` if they can. This enables > using `pin_init::zeroed()` for `file_operations` initialization instead > of relying on `unsafe { core::mem::MaybeUninit::zeroed().assume_init() }`= . >=20 > This change improves readability and removes an unnecessary unsafe > block. >=20 > Link: https://github.com/Rust-for-Linux/linux/issues/1189 > Suggested-by: Benno Lossin > Signed-off-by: Nicol=C3=A1s Antinori Reviewed-by: Alice Ryhl