From nobody Sat Feb 7 23:23:09 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.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 699DC3382DE for ; Mon, 26 Jan 2026 13:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432731; cv=none; b=GnklOevVnafl2hY4Y0QUU/q/6uHvLaSMMBxtzzIT1Oz3kQpgwqqaKle7CdsGhWLiT4Nn5KSaEnxzl3MZ4+kgFZh1XzU2eDpDKnCttTK7JgaxgTE89Rh5FAsSoJdfHNXkzpQmY87f7i884pWRmLvmrhvKemfgzt2GB6gkhFFhvOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432731; c=relaxed/simple; bh=bXzZLukQXEbPWRHxObil5vyPCVlHq4BXTn8D2BTuTm8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=GshJCuoyPGvJCXIV9dFKCCfyZh6W1Oe5I2zdlPHKlRrkNS9UDwQ2WCaJT3ZbsYHoZksdmr+wy9Dpdt/eYFB0bdnZhts2HtIlrxvM6x9F9rT+YrKvfg8st3EejfYKH8eZz18Sf6Limti8Mb1FP/FzMFMmTglWX2T4phCTnf4FT8E= 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=TomOpbD0; arc=none smtp.client-ip=209.85.128.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="TomOpbD0" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-48025e12b5bso50238015e9.2 for ; Mon, 26 Jan 2026 05:05:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769432728; x=1770037528; 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=gN2t17/t1rDSBRJlYmD8L1PuCsoH1p/D10jNGeOcAjc=; b=TomOpbD04f6pwTQfko1b2fNKs5QM/zOYyq1xD9kM+y5QB1mdjgesxLyaLiiWW5YB4I sfD1YowHw9pXLrSTjS6b/v6Hf5jDIDdp6gy+npEe3K6lZHhQp0S17Ym9CYqhX20RJCxr tIyWF8w9FiZ1tI/1DCRZr6sYoMXSwMY7BNc6FBjegMEOMUt4DmZzLk2RSQPkxtzCctjc az5zNWooGsPdwYR6klBvQHABZULnsQr5gTT00gT2+VTXOnqCfnzKhBt8uckn742+RC+7 yP4K1m7+WaWV4EdqEc/BxZmz/Bq19da/b7gaFbDj45ARNUFWft2UhzAYV7Ve3I9LwMZJ PJSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769432728; x=1770037528; 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=gN2t17/t1rDSBRJlYmD8L1PuCsoH1p/D10jNGeOcAjc=; b=o1N3QjaKfhmbUn0QswOrnjemqjCSvvq3Ghd6ufsjiAdHttxQFkGY0OHhQdQnAtpc+D Wu4SBGzCEMd60Jtc8IVti7RBv45KF9KscTfXPFqVr5tbNErhkXrbrnFF7LNpDJPbxlkd n7TGD3gqXKPLMjgXbyJLb1UNJCkwYyWH/yBwFknIdsMoCfK/lOGLJIKLEIMmLgiml+9O 11cSZmWh3fRl2a0CAv0nMdJV1rUw3ACTJ8qIXu+s2Wi4ZHc+JKhzGK5omp6ASu8XFotr n5BTCkOozSTEQeRsDn6Ze4iA6A0uYEGPvXIRihEjVp8FF/4f4hpEkYMcNFMStgM+65jC K3UA== X-Forwarded-Encrypted: i=1; AJvYcCVnekHHKBjtO8ODjdzMYpLjdodFhw2ITRvVrPbgUq9Z0bWUMtb0LvaXGmycVX4ji92XLpWDMaIrdiJvmb0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9m54iakP3Jgw7CgICPBIXRq9f/0AjHflKbGE00loJdjQzCLO/ zHApgTQuhFFpQYGtY17PPdGgHx2xbltAGAl1HVvN9C+sUJiVVpzws6MyPK/OML10y2tDfXRpm8b nmVsPV9w+Zp84++Abgg== X-Received: from wmbjj21.prod.google.com ([2002:a05:600c:6a15:b0:46e:1e57:dbd6]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:470e:b0:477:9814:6882 with SMTP id 5b1f17b1804b1-4805ce3fcaemr63455715e9.5.1769432727799; Mon, 26 Jan 2026 05:05:27 -0800 (PST) Date: Mon, 26 Jan 2026 13:05:14 +0000 In-Reply-To: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=2428; i=aliceryhl@google.com; h=from:subject:message-id; bh=bXzZLukQXEbPWRHxObil5vyPCVlHq4BXTn8D2BTuTm8=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpd2aV4Lk3pJz0stKiMcxdwDpn8Kl1BIjlWX/rA aiAyQf03zGJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaXdmlQAKCRAEWL7uWMY5 RuoiEAC1swO+geQ+r+AjShO8mOnMB/d2DuExVIlaIuoxklXWLQXi30gIy/MzfAAkXa3MM0hHl2j hh53B8QTFDgYVxbfzUdlR2iiLv7JD9zdJXcQWboxTqRakN/Z8lhDdQz+tZXG4kDyEzuVhJVWTsp hEp1lNtWWRrT5sN52J9Rks+F/KbQwA3ZjqknlUJoIKuqffWbC3OeZ19nJTXQ+lNraopmiJ7/H2G 0fCUTS26dd6Di792kIMpyY0Kdy07GHev06L7g453oNygCHc7ksg+ROsK2girhonLkVBCdI7dj8a 4p7ZX6Z3Ovwc+//kovrIehqaaHeJoLWWBO+BfKZWjCF2N0GxPQRB5wgK3pCwfx9COnmo/rzNDsg m+Oria3AxIzwcgIKEXGXmDq6jKquJT+rFJD5VjswYLdQ8qMWYhZgpGRZjmLXc7AYfnBdHOLfe1J 3HSS/YNE9DyRhSqmFb6abGDjUl9MAdJfRT42gD/HSjhWJWu69722AcH3+84x2HFPv4xIHX/2iMF 8dC814QSrhnvf+jWFMe1hdzwSHZA09toEN1KnxglEjuBr3RhqTfxyR67J8ytsr3zOua92OXYI7e f8jiLcJOHbX6hfJiqVQ3Y+zUvI6yFB7lJ7tPyXp+x4I6NoPeIDdxiCATHZ/bcKxTEaEVltMOBxc s8T1/rN35j3ksVA== X-Mailer: b4 0.14.2 Message-ID: <20260126-zeroable-ffi-v1-1-0ef101d1ed85@google.com> Subject: [PATCH 1/4] rust: ffi: reexport Zeroable and related items From: Alice Ryhl To: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , "Rafael J. Wysocki" , Viresh Kumar , Igor Korotin , Daniel Almeida , Len Brown Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To implement FromBytes/AsBytes for bindings types, we need to move these traits to the ffi crate. For consistency, this means that Zeroable should also be available from the ffi crate. Thus, add the appropriate re-exports. Signed-off-by: Alice Ryhl --- rust/Makefile | 9 ++++++--- rust/ffi.rs | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rust/Makefile b/rust/Makefile index 5d357dce1704d15e43effc528be8f5a4d74d3d8d..701d64c2310858aca8f7f76d698= 549fa014f62bf 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -207,7 +207,8 @@ rustdoc-compiler_builtins: $(src)/compiler_builtins.rs = rustdoc-core FORCE +$(call if_changed,rustdoc) =20 rustdoc-ffi: private is-kernel-object :=3D y -rustdoc-ffi: $(src)/ffi.rs rustdoc-core FORCE +rustdoc-ffi: private rustc_target_flags =3D --extern pin_init +rustdoc-ffi: $(src)/ffi.rs rustdoc-pin_init rustdoc-core FORCE +$(call if_changed,rustdoc) =20 rustdoc-pin_init_internal: private rustdoc_host =3D yes @@ -249,7 +250,8 @@ quiet_cmd_rustc_test_library =3D $(RUSTC_OR_CLIPPY_QUIE= T) TL $< rusttestlib-build_error: $(src)/build_error.rs FORCE +$(call if_changed,rustc_test_library) =20 -rusttestlib-ffi: $(src)/ffi.rs FORCE +rusttestlib-ffi: private rustc_target_flags =3D --extern pin_init +rusttestlib-ffi: $(src)/ffi.rs rusttestlib-pin_init FORCE +$(call if_changed,rustc_test_library) =20 rusttestlib-proc_macro2: private rustc_target_flags =3D $(proc_macro2-flag= s) @@ -657,7 +659,8 @@ $(obj)/build_error.o: $(src)/build_error.rs $(obj)/comp= iler_builtins.o FORCE +$(call if_changed_rule,rustc_library) =20 $(obj)/ffi.o: private skip_gendwarfksyms =3D 1 -$(obj)/ffi.o: $(src)/ffi.rs $(obj)/compiler_builtins.o FORCE +$(obj)/ffi.o: private rustc_target_flags =3D --extern pin_init +$(obj)/ffi.o: $(src)/ffi.rs $(obj)/compiler_builtins.o $(obj)/pin_init.o F= ORCE +$(call if_changed_rule,rustc_library) =20 $(obj)/bindings.o: private rustc_target_flags =3D --extern ffi --extern pi= n_init diff --git a/rust/ffi.rs b/rust/ffi.rs index f961e9728f590fd2c52d4c03a1f715d654051d04..7218d4c535cbd7163d9aca52b05= 25c588a394d1b 100644 --- a/rust/ffi.rs +++ b/rust/ffi.rs @@ -48,3 +48,10 @@ macro_rules! alias { pub use core::ffi::c_void; =20 pub use core::ffi::CStr; + +pub use pin_init::{ + zeroed, + MaybeZeroable, + Zeroable, + ZeroableOption, // +}; --=20 2.52.0.457.g6b5491de43-goog From nobody Sat Feb 7 23:23:09 2026 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 E681C33859A for ; Mon, 26 Jan 2026 13:05:30 +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=1769432732; cv=none; b=lK+F6mK5JrVNwLIQxizc689ZB6Zd4cVh8L4eiwKMYiNlF7GmOhoNABgIYUX0cmBrFvN8s/L/3ROSmqtz4MurQBfeL37jNiBkvlbxYkeVFDDBxNk5tUclzRvrxgpXd0YUVhjbYK4/fUpsDI8whZ9BKr+GlQwQbaUWfsB8d99KsHc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432732; c=relaxed/simple; bh=quWSaogirGvSyGU+eYcO01e5dALGwdCFt63QGZ45xEw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=JSz+q3gR9K5JTcjnuzEtg1rEF1DOh8DZD1exWXs2bmqJBEUNpxj6OljdBQfDZNJrwM6pmlUyvAFdk1sSVM6Gnnj6gbtDiRM9ZVJme2gKvhWyi+SluUQ3ZyxfVREEsaA+hRgQfLPpba/hE2cP3qK0SEEH8vdEk7WNm2DXRUcubyM= 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=1fsj6QA/; 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="1fsj6QA/" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-b8735332877so502278166b.3 for ; Mon, 26 Jan 2026 05:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769432729; x=1770037529; 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=IZoKiHDA5dept7gPJfQdDlpAT5f6sSqPf63fb7QenF4=; b=1fsj6QA/AThlSVf3LHNvadyzWuWF46MBzkoxwbGAw6tb/3sqiskNir56a4YZE81bZC oeXiMCp3ggOJOKpyvhB+/H5wieBlVL89ZUHGNQozd8opy4dkU1jwHYeKnruGYN4uroy7 cWI8DUPBLV4bKfxurc2izGxs7oAJByV/+HDl/t/Z8jYMiO7Wta+Dyr8ywz3g4qwHti0K ZFYKbJPNxF3kfm3M3skjqAhoY/BcljvzBzaTqyHfiUYtIZmwAtxNOsRjAXhnfSkBB6q2 k+3z/WR5Tj8S/PqY8xqL/jAQ36Hts7mOUTFZ8Mb5QtLotCXWmQvzs6W+meQWR34c3B1r B2cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769432729; x=1770037529; 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=IZoKiHDA5dept7gPJfQdDlpAT5f6sSqPf63fb7QenF4=; b=QSfqMfyyzkZ/fAkrcvggFxDVqmI1/RcGeXonEC2+suywR2sLZD2BN0lHWx2+JI3j4M 3DL1APxA4daePRrueafuu7XA3M26ajRDQQbn3SgoWt/I4NqbTaClO2VNKR4Znb8XzeG4 61NX/JEumnRzvP8nndvhoWh1Ex88OgF4nH0ZOkJyyhVu7qme14jGQVNCaTNXUbQQh1AB mzBMhFACBSXocmh/Yd9Gez9sCcb/Uzjy9US/6+fCC2bpAIJHcFdlBpE9OJamA43a2EpG ldvnNTAxSqa14rR3lMVxM3KQaWoD5W+GiyJMEsxFhb3PvybozoqamJTX5/8TwKXs0DjH Ypuw== X-Forwarded-Encrypted: i=1; AJvYcCU+J/Gs65h2arlVytUGyvSWohUrrI1qHEJdZ5L3Rf1Rpj0ayEwFJt3VF4t9M/ksFTYtZ3H1MTsES50D17Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yyd1GdQ/UOFfurlB+/y30McsmdjUxDZ/lMdF5cO7NTTNTGrmbCp 3NqPn7TMWh5taJ6Bz7UpuTwABiCc0sNMWRRe9NATp38aTrxZzwS3HPxlPtirS1dYOMVJY4IaA2i C/YfBHwlfydYKB4Uwow== X-Received: from ejhn16.prod.google.com ([2002:a17:906:1d10:b0:b88:3e98:7d99]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:d54a:b0:b87:324b:9ae1 with SMTP id a640c23a62f3a-b8d20e44af9mr337635166b.40.1769432729392; Mon, 26 Jan 2026 05:05:29 -0800 (PST) Date: Mon, 26 Jan 2026 13:05:15 +0000 In-Reply-To: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=789; i=aliceryhl@google.com; h=from:subject:message-id; bh=quWSaogirGvSyGU+eYcO01e5dALGwdCFt63QGZ45xEw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpd2aVPY91/Wh1b8DTGNqjiDw+6siqYJgl44iNU ZJ/YjGRhBWJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaXdmlQAKCRAEWL7uWMY5 RpjZD/9oT5g0w6umhbzjmngZGfdzYK4fSuwfVAdqAFqLNnORfzh2XkXm/FEz81hC6vd3BwC7Tb+ +FSY7bADLbe9a55VbCs8IwS6nyDvuPsnHZoUNFGZCKH/KiIMmxveCI45pir8U26NetYXBMSNxah 8FRe92VKvomzJEnAmGYOTHEKgOqA3isyA5HZxEcoGEFyVpl5gXX4vnsqlsoF509WECoqz0hZBrp J7vxanApMeZearv6nwBMQllprc2tl/gZ4WvV9Ffpf4cKftKbLR3PGm54JX+i6BJXAiajgGBTHGM FVGUGXbjWroqFO0AKq8ycK5/JpgKvvTYXtM5nYt0ndi5EaUhvgXgd/5k2y3/QSyB73ZqGEuCTEL ayk6bh7Lda4IMguB6AMjMiSnXkBrKmbtJvuGvD37CcBBkfS8ZwGaPom92S8pISrhbKQetfnSKmY gXCe0lIf+tn7tU6gYEJD8GgTBX7PKlcWgDo/5cpjiS8dRP60vNYnQAvh1lG+YKC+uYWDZgRr9hS mxpBjKIZZOqcDktqjgjsAGu3s+ekO25F56FjtpyP4ONZwoVKmYn5KbAp7mK09XLnB+Oo4PBGz7e 4L21Y5HU4/4u5wMlM5/v7yV2h3+Diakzj8s37c3vxu5OPqxnlIF1zRwJY7hKAfAzB2FL7J35/6e jaK2+VtXfs+q8jw== X-Mailer: b4 0.14.2 Message-ID: <20260126-zeroable-ffi-v1-2-0ef101d1ed85@google.com> Subject: [PATCH 2/4] rust: cpufreq: import pin_init::zeroed() from ffi From: Alice Ryhl To: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , "Rafael J. Wysocki" , Viresh Kumar , Igor Korotin , Daniel Almeida , Len Brown Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The zeroed() helper was re-exported from the ffi crate. As this usage of zeroed() has nothing to do with pin-init, use the new re-export. Signed-off-by: Alice Ryhl Acked-by: Viresh Kumar --- rust/kernel/cpufreq.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/cpufreq.rs b/rust/kernel/cpufreq.rs index f968fbd22890546db1758d921e3374359ef9d00b..fadba8e669be33911a30be0254d= 3d4dcba9f4226 100644 --- a/rust/kernel/cpufreq.rs +++ b/rust/kernel/cpufreq.rs @@ -1012,7 +1012,7 @@ impl Registration { } else { None }, - ..pin_init::zeroed() + ..ffi::zeroed() }; =20 const fn copy_name(name: &'static CStr) -> [c_char; CPUFREQ_NAME_LEN] { --=20 2.52.0.457.g6b5491de43-goog From nobody Sat Feb 7 23:23:09 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.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 6F19D338921 for ; Mon, 26 Jan 2026 13:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432734; cv=none; b=fV+NviLIy4x+AKkzOZz9nZm9pTiGxTu7POnHHesLWZk78UYOiQft1wRXF2sHAszhZE6Y7zGiet+Y1VMZL98jjmHPkkC24FHQ/vhcnZC62opUYL4Fww/WKctdlGlcq+Aygk3jXdcxCru3bnJaiTlOO5bXxn7OxPuwYWDcebHeK8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432734; c=relaxed/simple; bh=LUQ8/ci9izP5J9/4y+2ltP+4wEzDDnOt0Trjo5chvYo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=aDJxVHMrKU8YJvFhgERLHDY53vn7uQ/h1oXXgLU0OdAUPaM1roTJfHUrU7aO7e70+X1xZ+6/KaF3wsmEn6cKdGuvbe+H+Ok0ghcjasQtzbO9Iax5FqFtZA5Wk07+/c18rJUI80D+vrRHB4EPUtmuPNs6yeIlwY7ymTHs1oe/6Uk= 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=YGlWRNbS; arc=none smtp.client-ip=209.85.128.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="YGlWRNbS" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47ee71f0244so36253915e9.0 for ; Mon, 26 Jan 2026 05:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769432731; x=1770037531; 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=f+RxVCguDzSbO7RZAiYTn6auR9kVUW4tmzLLXhLMJbM=; b=YGlWRNbS34nRsqVveuY//zUCTXKdGUziRUgrBN+uab6fgcQykqEkA9JKdQClh0R6FA 7Wb/qTxQDz56A3phif+jTiXVPyVTW6M9PetaUyBuhFZ1kd70tCP7aRtgNMsk6lNkiMAf 6cSESETyUUH76bRRceL9EvPVI3fAX6npoNtYodXTHieGBrKUub3MfOJKyvqtZCcxRAcl rAVYbsPLPo3pNA9ZqPu45jV+0pUAc2ee4IoBRbzGl572Mni/LtFVPWJpU+FF2es9b6NV zTOOiMsSXEdsZkPvbQ98tGqiRTM59ZxJYBGrQ7pMKZJEpYSeO+Z68hx00c2R1xP9r9EI CFEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769432731; x=1770037531; 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=f+RxVCguDzSbO7RZAiYTn6auR9kVUW4tmzLLXhLMJbM=; b=rPvtLjBSjNmEVdm09onGSj/jFH9x2b1FUJ7HVdNemvwQP3FWxg0ObiJEP/oW/mep1N 0J3FamUhFMazJqRPTweRrpiBk98ol54jqkXvUGjseLjoBLpbr8iTDBM2KkI4xdY1738Q NZDvT4IspI5Kj5yb63+X7xBQDpZgdi6mTNBpl39BCrC4FSJt++ImbPd1egDX/VlRSmFm Ma6WjAYMKzg36EAEdqlcSvXvkn7h5XMWWG+Z5ed4CHMJe95lKzg7B4hUTOvVdwCxggko aHRVJPVtyWCp/sIOCWR8SBvG5fNxzDegRL5/vpbdI9HK0J1ZCQCHS/IyC9iqK/ZZgqWn AyUg== X-Forwarded-Encrypted: i=1; AJvYcCX6gV53bsjxIARESdSali9s20T0hGOdp3Xhrl3NKHpVbTuDrs8CZcQ8eUt+rLKr/dYJiRxzJt9MCt1zVJo=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+XjHKn0vbi9cZUUy6YbO0blnr2Pou1a8t99PWINKSaEohlte/ FPigZCJORTtJKV2uTlmlE6k1/XMxRKQ5NU+af5DG42Qk6MX50K9kE6ATIn7aL/x5QxiJ8eNq+S/ yWCDUGDX7Ki8UdAS4tw== X-Received: from wmbjr13.prod.google.com ([2002:a05:600c:560d:b0:475:decb:4c4d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1f8f:b0:477:b642:9dc9 with SMTP id 5b1f17b1804b1-4805cf672c6mr73201695e9.28.1769432730846; Mon, 26 Jan 2026 05:05:30 -0800 (PST) Date: Mon, 26 Jan 2026 13:05:16 +0000 In-Reply-To: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1464; i=aliceryhl@google.com; h=from:subject:message-id; bh=LUQ8/ci9izP5J9/4y+2ltP+4wEzDDnOt0Trjo5chvYo=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpd2aVtIXd8lRq79A4IpzR63g6UepxqP3aP882H LHek6E8d/KJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaXdmlQAKCRAEWL7uWMY5 Rgj7D/9tTA8NIpQVPOoBpUOfXvxyJh7I9QqsPbk2lhfUJ91ylb4nQV11NUnJK+HIj5SflIxE7BF mYJngykVKsX7zuV50ZnIjT9IxkkCrrROw4lZxAHaBqt5Q8G6tQqfcH3z6106ZZNDbaGwrGK3Gtk cn48veOg7BNZbVACSBoznv1R7o++CfAiX9Zt7mWz7UdG1yaw8fdCXQkf4Fvh0Z63ocZ7lnt8Zag m8D0pmiQeqUCEggRpao5HxxEl+D0tg1vvLFti7/x8PrvyWG67qcyvhcRVpq6G9EbSLhYRUqJ+4u OBzvQYUSiHqaWQBMiyGB4GrxkDTY9f1FAnWQkUi9CtxbsHvbfN+IZ5DsTKHolhw21VOSCtZQMAr 3Ku6iXNp8qEypBEWEKUJ29NEBSIjkq5EMlV6sjnyu3hzkuwEH52lRaD/b7RZjdhv9RP1Q5e6ZY+ s6ZQq7/PhL1+egs84UXI+Mu8mdRrfsEJwWA35dX3uyf/Zfvbg0kQ8UuuSECJKXDgTLOq+WreF5b P179o69MSYJyGdQE5mNYWnlvKvl0RxTAly0LSMqlE8aV9W59ySJwyxwjT0lr0Y+pyeyddlkDYlU OQNk6DBi7IyrpFDrb9nC2wdv6RMMSwph1p9wOG38PmnTs9IxhNLUJTlAaxpszYzxv5xVNm5Xvia ByFjijCPk5RWTFA== X-Mailer: b4 0.14.2 Message-ID: <20260126-zeroable-ffi-v1-3-0ef101d1ed85@google.com> Subject: [PATCH 3/4] rust: i2c: import pin_init::zeroed() from ffi From: Alice Ryhl To: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , "Rafael J. Wysocki" , Viresh Kumar , Igor Korotin , Daniel Almeida , Len Brown Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The zeroed() helper was re-exported from the ffi crate. As this usage of zeroed() has nothing to do with pin-init, use the new re-export. Signed-off-by: Alice Ryhl --- rust/kernel/i2c.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/kernel/i2c.rs b/rust/kernel/i2c.rs index 491e6cc25cf42619ebfd88af731db47efb8db93c..731bacff0990c8b9b2fe8601f07= 470b68032f3e8 100644 --- a/rust/kernel/i2c.rs +++ b/rust/kernel/i2c.rs @@ -46,7 +46,7 @@ impl DeviceId { pub const fn new(id: &'static CStr) -> Self { let src =3D id.to_bytes_with_nul(); build_assert!(src.len() <=3D Self::I2C_NAME_SIZE, "ID exceeds 20 b= ytes"); - let mut i2c: bindings::i2c_device_id =3D pin_init::zeroed(); + let mut i2c: bindings::i2c_device_id =3D ffi::zeroed(); let mut i =3D 0; while i < src.len() { i2c.name[i] =3D src[i]; @@ -433,7 +433,7 @@ impl I2cBoardInfo { pub const fn new(type_: &'static CStr, addr: u16) -> Self { let src =3D type_.to_bytes_with_nul(); build_assert!(src.len() <=3D Self::I2C_TYPE_SIZE, "Type exceeds 20= bytes"); - let mut i2c_board_info: bindings::i2c_board_info =3D pin_init::zer= oed(); + let mut i2c_board_info: bindings::i2c_board_info =3D ffi::zeroed(); let mut i: usize =3D 0; while i < src.len() { i2c_board_info.type_[i] =3D src[i]; --=20 2.52.0.457.g6b5491de43-goog From nobody Sat Feb 7 23:23:09 2026 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 C744E3382C7 for ; Mon, 26 Jan 2026 13:05:33 +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=1769432735; cv=none; b=JsQ+qF2c6ktq2rEn2QZN+Vw8yEMtOFLup4plO5XP8jglrS7QePGawBy58MDDenWbet9O+h5KboIHy4cj9yjJHU0bWxiTVBxEL7ON46iG21IHqZyKd/FQEN4ygR78hFaZPohqdQqEbSH9e9ivB1oxpt9zjEI3R0Uyv9S4G3EX1y4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769432735; c=relaxed/simple; bh=xl8shNTbd3l7f1l/wIitQRKB1WOKnOl+vwXdD/w65TA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=htYEEdIvYlcZ3XIMmUKDHCXeXp/keSCZ/iRyZXFWseJnei4L7eG21HOZv2yjiGsUxYuOhZ6fmHXnTdgdGeBxk3fzS3g0On75OmUZVRssVq+HdkTQ/mJmvqjiYZ/KMYfpiYqFJjTNIQmIQH7K+j5MOigeIq2JrN6ISo+LEmfEbM8= 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=u8pxPmYN; 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="u8pxPmYN" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4801e3aab32so22050635e9.3 for ; Mon, 26 Jan 2026 05:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769432732; x=1770037532; 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=4nsmpG+AyhITKbCRZV0HvgvKMdSs0TbZAwbcGdtt0dY=; b=u8pxPmYNhV3nGjOr4Kzto6ZTmlOorqunLn9Gn+bBrAbSzwvQGZLAGLFh26vYI284sz nPu183EMMF2bYfvqBNn1Wla5wEw4ES3Vi3L/43ODY4seg0pzwEg8gVe5CxjkvJ8kFWlp XJhj+R40kokZ7e6+pD5H5lMh7KLYJT008I+pw+TDit8eKnXZ07heCeTNjB26i+gDTdPe mXYwl8jBQOKlHd1oTV/MV3Bk1Ky3DjmS4HtlL31OxqyftC1eDTmmasgcvrf9eJiMQjZ0 GtxrwQVrs3KmJA9oGCafWmRYyvbijmdJ0O7axZ0GhLU/4k8hz/ogziRWnf/sV0epC8LI lYcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769432732; x=1770037532; 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=4nsmpG+AyhITKbCRZV0HvgvKMdSs0TbZAwbcGdtt0dY=; b=jr1A+lq/G7AAyN+utfZVSQWJfa+LHfoClZT4CahNpXa/DMOL0rLRPrap3XHhSvk4lD Qj7Vb/uQNFURzLkwe12SI1A2jaZx6CEDChFa1ssz6EQcEHaAcKrxPEUQ5QRC4BObVlO1 JZDi/f4EICSwHn65AHnetWdO5/038cPJx1S1MpBJ6Sz4/w7APF9K0mptnzqzN9+IAYPd Tl04e996maLST3lDBPwM8ibpGpc2DliN4Nqmw9+sAd5vpxYX7AI12+/QfunzZG1kWzxg 1yFFsT2IZboab+BfbOFKM6MHAYnEYkovANR1ah7bviKYObRDPOgxPxUhPYANMMHxjFCR dsTA== X-Forwarded-Encrypted: i=1; AJvYcCUX7t7L8SpgAIzi8YFkFxjI5COIiSZ4iB6kkbZ9vvBaxU+Zh7AjN7kaijvEsmiETkv5Q06mDlFjR0StXxo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8ohbKM4s8oco0OrKd+tS/pK0FS9OE/lkBduFI84S4VGqpXucZ ZqqfRFQ84DOHCbZ+7GTfeDM027OPkpVSj9sNsfEFDLX7Y+oHUdpdRLJaKbyauUSvyFt7S6GEsPP l8AKjQHQm9+fbHszccA== X-Received: from wmbjw6.prod.google.com ([2002:a05:600c:5746:b0:480:3842:3532]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:310f:b0:475:da1a:53f9 with SMTP id 5b1f17b1804b1-4805ce4253cmr68763735e9.14.1769432732198; Mon, 26 Jan 2026 05:05:32 -0800 (PST) Date: Mon, 26 Jan 2026 13:05:17 +0000 In-Reply-To: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260126-zeroable-ffi-v1-0-0ef101d1ed85@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=959; i=aliceryhl@google.com; h=from:subject:message-id; bh=xl8shNTbd3l7f1l/wIitQRKB1WOKnOl+vwXdD/w65TA=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpd2aV9Vd1e2rwhMiupm4OaSyGzjJpM8HhP+PR+ NvrLp5mn++JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaXdmlQAKCRAEWL7uWMY5 RoYMEACWHZ40+tzZDKpX1QwIMIaXP7/OPrWwSWZcGG5u52wEuWcjYYRIttamuTP+CVDMdVNgA3Q whtnCJvnfgMe2SGBHXduT9gewGP8Mrp9BmF7027YyFSHwquzVTb1L4hCqaD2Bts6Nybq7a4YrEr xJ8h0HuxspeQmzMVt6Smb9Ywje9zO/5TFvGU43TZaQY0FAGTxkvkAKKkeu5egWE9IXsQpVNNR1j bJsjWFzfI6S/9+22xFDouHlpJ4MvyHBH9PxVupLuGK+tOVQh6XNTQ7wHeNHy/tPbYqF/2MtBd2N q4muezv0uOgBqMXjMq58Zbb5jwR38ts1AUPURoWQ8xrxtYGn9L9XNpnRA5MiO74juCwFyCJ3xbO 2a2SGnCLvP5budzPpQ7SK7mE12oNKIXYSrER1Kk9UHOoKEKw0cFvkdLBCKRYugln2oD28hQKJ/6 gO8cz6SdNsbb859FkYTN5sJy/7ap+LQ1memQq0u/Urjpdu7opqBhQOwvCnMxLhTyW5ikhwfui58 tppWZAc3nrH8QtHeQxbLtPV+Wg09sja2Sc1dqhXwVI5bBdESQoc/3Jw75UR1N7OMVcyY6TcIIBL YrrYBQE0DDmSgaiiGZGtfZqfedoL6C+JdCOMxNGutVpPsPOepM5xH2TwPqn0kcnCAU8ABzwtvRJ mfipw3tC70OW1jw== X-Mailer: b4 0.14.2 Message-ID: <20260126-zeroable-ffi-v1-4-0ef101d1ed85@google.com> Subject: [PATCH 4/4] rust: acpi: import pin_init::zeroed() from ffi From: Alice Ryhl To: Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , "Rafael J. Wysocki" , Viresh Kumar , Igor Korotin , Daniel Almeida , Len Brown Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The zeroed() helper was re-exported from the ffi crate. As this usage of zeroed() has nothing to do with pin-init, use the new re-export. Signed-off-by: Alice Ryhl --- rust/kernel/acpi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/acpi.rs b/rust/kernel/acpi.rs index 9b8efa623130c1f4256e36cc350caf5cef46d132..9ae0eca82c658a591b407c4f454= 9eda00b8d293c 100644 --- a/rust/kernel/acpi.rs +++ b/rust/kernel/acpi.rs @@ -39,7 +39,7 @@ impl DeviceId { pub const fn new(id: &'static CStr) -> Self { let src =3D id.to_bytes_with_nul(); build_assert!(src.len() <=3D Self::ACPI_ID_LEN, "ID exceeds 16 byt= es"); - let mut acpi: bindings::acpi_device_id =3D pin_init::zeroed(); + let mut acpi: bindings::acpi_device_id =3D ffi::zeroed(); let mut i =3D 0; while i < src.len() { acpi.id[i] =3D src[i]; --=20 2.52.0.457.g6b5491de43-goog