From nobody Mon Feb 9 04:27:41 2026 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 BE399313E1C for ; Tue, 28 Oct 2025 12:23:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654201; cv=none; b=Dr1lLJuXa5fphDWyB2fWPJxOlNvQfrOiVm16xQIB4dixBM93DeXxe5/z9gFmaVS4/eK8YyJygo4XLckwESgXi9OMHw5rMNd7XgC93ss/SwZ4LFeMxdYn6AH09DvWbYXXzbSBsZoiop/phB9Fj7fAA+9sD+6O/eWBe+5tcG2CO7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654201; c=relaxed/simple; bh=ilXtrzC3TR5zhx7isAOn4iceKAqSG1FEMM/Y2Bz7K1I=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=ASoiLu68spZBdy/vJX+EDudDZLrW6uoJ56GFk7Hc6cMDi9U33udG3Pr8pI+LOvP/Heg8LBiiP4d2ZlRszUCemvskxfZU1iZ6jyCkJQ1frqjKEqozpJiDx1EREh3S5/RTpNRxew1QwHvoEckGfjdpnxIRNBxM74JqkZui+UNlBgk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=W39YBq8g; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="W39YBq8g" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20251028122317euoutp021f1d3399f76e0895ce03c2805da0c9f9~ypyiowVyt3173531735euoutp02h for ; Tue, 28 Oct 2025 12:23:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20251028122317euoutp021f1d3399f76e0895ce03c2805da0c9f9~ypyiowVyt3173531735euoutp02h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1761654197; bh=S7Qb8GD7QtIdkNg1sJYTbyBiBhynyekDP/0KBPsG5fc=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=W39YBq8gRkSQRtmiqYbhAmCfOap53lZ4hkYWh/z6xZuBhkZ4AR5bJvtKO6Kip+d8h AMu6xTCU4OjpicB+jSJ/h6BmVSExYtvmu5N+KxQwjqGxlcfGSDHesf2OTIOgE/S2MQ 6bcTdPwtJmmGqXghLFxtr96X2pbe2jwJcZBY9e8s= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20251028122316eucas1p2733987cd4c1eb8f83d6572d542e76d2a~ypyh4s3HI0846208462eucas1p2I; Tue, 28 Oct 2025 12:23:16 +0000 (GMT) Received: from AMDC4942.eu.corp.samsungelectronics.net (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20251028122315eusmtip2aa7fbb6e4d59ddf58d1f0e5dabdc826e~ypyg2_QJ10792007920eusmtip2f; Tue, 28 Oct 2025 12:23:15 +0000 (GMT) From: Michal Wilczynski Date: Tue, 28 Oct 2025 13:22:32 +0100 Subject: [PATCH 1/4] rust: macros: Add support for 'imports_ns' to module! Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-pwm_fixes-v1-1-25a532d31998@samsung.com> In-Reply-To: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Michal Wilczynski , Drew Fustini , Guo Ren , Fu Wei , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: Stephen Rothwell , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-CMS-MailID: 20251028122316eucas1p2733987cd4c1eb8f83d6572d542e76d2a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251028122316eucas1p2733987cd4c1eb8f83d6572d542e76d2a X-EPHeader: CA X-CMS-RootMailID: 20251028122316eucas1p2733987cd4c1eb8f83d6572d542e76d2a References: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> Kernel modules that use C symbols exported via `EXPORT_SYMBOL_NS` must declare this dependency for `modpost` verification. C modules achieve this by using the `MODULE_IMPORT_NS(NAMESPACE)` macro, which embeds an `import_ns=3D` tag into the `.modinfo` section. The Rust `module!` macro lacked the ability to generate these tags, resulting in build warnings for Rust drivers (like the PWM driver) that call namespaced C functions. Modify the `module!` macro's internal parser (`ModuleInfo`) to accept a new optional field `imports_ns`, which takes an array of namespace strings. Update the code generator (`ModInfoBuilder::emit`) loop to iterate over these strings and emit the corresponding `import_ns=3D` tags into the `.modinfo` section using the existing `#[link_section]` mechanism. This provides the necessary infrastructure for Rust modules to correctly declare their C namespace dependencies. Signed-off-by: Michal Wilczynski Acked-by: Daniel Gomez Acked-by: Miguel Ojeda Reviewed-by: Alice Ryhl Reviewed-by: Elle Rhumsaa --- rust/macros/module.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/macros/module.rs b/rust/macros/module.rs index 5ee54a00c0b65699596e660b2d4d60e64be2a50c..408cd115487514c8be79724d901= c676435696376 100644 --- a/rust/macros/module.rs +++ b/rust/macros/module.rs @@ -98,6 +98,7 @@ struct ModuleInfo { description: Option, alias: Option>, firmware: Option>, + imports_ns: Option>, } =20 impl ModuleInfo { @@ -112,6 +113,7 @@ fn parse(it: &mut token_stream::IntoIter) -> Self { "license", "alias", "firmware", + "imports_ns", ]; const REQUIRED_KEYS: &[&str] =3D &["type", "name", "license"]; let mut seen_keys =3D Vec::new(); @@ -137,6 +139,7 @@ fn parse(it: &mut token_stream::IntoIter) -> Self { "license" =3D> info.license =3D expect_string_ascii(it), "alias" =3D> info.alias =3D Some(expect_string_array(it)), "firmware" =3D> info.firmware =3D Some(expect_string_array= (it)), + "imports_ns" =3D> info.imports_ns =3D Some(expect_string_a= rray(it)), _ =3D> panic!("Unknown key \"{key}\". Valid keys are: {EXP= ECTED_KEYS:?}."), } =20 @@ -195,6 +198,11 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream { modinfo.emit("firmware", &fw); } } + if let Some(imports) =3D info.imports_ns { + for ns in imports { + modinfo.emit("import_ns", &ns); + } + } =20 // Built-in modules also export the `file` modinfo string. let file =3D --=20 2.34.1 From nobody Mon Feb 9 04:27:41 2026 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 E160432D0E9 for ; Tue, 28 Oct 2025 12:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654201; cv=none; b=qGKxfWFOwASjMTxtJT1OZGD+kKtVWeGIShWMEse3dKXV3C76+3K1UfGyUiD+3H9+nFSmR6xy+d4CWwukiyUJ9gf453l0Rj1ur85n8vtzY+NIKUfLyaRyFcgVhljj9kfjsQlFucQPNTvQT3Eb5s9HvI6knd5oK/wSJSGBOeGYs8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654201; c=relaxed/simple; bh=IEvI35ov+XAqEtHcG8sOgZroRPI+evTW3+Prd+Jl19E=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=BEon2C66zAsgbCpzoxg5zh5iCZOFb8fntCBtwOqupltkVbeyj9WqjtyDuFiHZcNdgXmsXKqGprb1sBZRpxA6HK51WBc90YBvqdHm8SD6Ro7ELCifPWHkmXKjrkO1WpWGBt7SscvkQ2sXe0NHb8A2bKV6Os/R5JgBl0LngOhTexA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=O4TEa0ov; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="O4TEa0ov" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20251028122318euoutp0121484eaaec675c47e935c0c553ea0162~ypyjdYa_l0995109951euoutp01D for ; Tue, 28 Oct 2025 12:23:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20251028122318euoutp0121484eaaec675c47e935c0c553ea0162~ypyjdYa_l0995109951euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1761654198; bh=jGjkU3U0JLre9e/0ro7TQvedWMp8tpNdUoBxZXg3c10=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=O4TEa0ovaGQfOSHEhlZb7p626KKV02YzVfksnIiEeGHcvJ6l4dpa+TCS8NYK2BXhe 5vEx6KyJ/dzsgLbX6C6dDUvcFj0JA2osFsYgPWoT5CLbxbUKvtsiTVkW2TzgG/ccZ1 bl6rc2jiMWdvb2ot7Hc4vriSkKbJOkmnDgB3R4JU= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20251028122317eucas1p1e7c925502a83dd3324478c0209de08c3~ypyidlIXm1056510565eucas1p1E; Tue, 28 Oct 2025 12:23:17 +0000 (GMT) Received: from AMDC4942.eu.corp.samsungelectronics.net (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20251028122316eusmtip2a58bac4a211ef65df4d1d0fd332e1469~ypyhsC2tI3027130271eusmtip2Y; Tue, 28 Oct 2025 12:23:16 +0000 (GMT) From: Michal Wilczynski Date: Tue, 28 Oct 2025 13:22:33 +0100 Subject: [PATCH 2/4] rust: pwm: Add module_pwm_platform_driver! macro Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-pwm_fixes-v1-2-25a532d31998@samsung.com> In-Reply-To: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Michal Wilczynski , Drew Fustini , Guo Ren , Fu Wei , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: Stephen Rothwell , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-CMS-MailID: 20251028122317eucas1p1e7c925502a83dd3324478c0209de08c3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251028122317eucas1p1e7c925502a83dd3324478c0209de08c3 X-EPHeader: CA X-CMS-RootMailID: 20251028122317eucas1p1e7c925502a83dd3324478c0209de08c3 References: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> Rust PWM drivers using the abstractions in `kernel/pwm.rs` typically call C functions (like `pwmchip_alloc`, `__pwmchip_add`, etc.) that are exported to the `PWM` C symbol namespace. With the introduction of `imports_ns` support in the `module!` macro, every PWM driver would need to manually include `imports_ns: ["PWM"]` in its module declaration. To simplify this for driver authors and ensure consistency, introduce a new helper macro `module_pwm_platform_driver!` in `pwm.rs`. This macro wraps the standard `module_platform_driver!`, forwards all user provided arguments using the `($($user_args:tt)*)` pattern, and automatically injects the `imports_ns: ["PWM"]` declaration. This follows the pattern used in other subsystems (e.g., `module_pci_driver!`) to provide specialized module registration helpers. It makes writing PWM drivers slightly simpler and less error prone regarding namespace imports. Signed-off-by: Michal Wilczynski Reviewed-by: Elle Rhumsaa --- rust/kernel/pwm.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/rust/kernel/pwm.rs b/rust/kernel/pwm.rs index 79fbb13cd47f75681283648ddc4fffb7889be930..6f2f78c687d5b924739f59052e9= b3393c922540d 100644 --- a/rust/kernel/pwm.rs +++ b/rust/kernel/pwm.rs @@ -760,3 +760,26 @@ fn drop(&mut self) { unsafe { bindings::pwmchip_remove(chip_raw); } } } + +/// Declares a kernel module that exposes a single PWM driver. +/// +/// # Examples +/// +///```ignore +/// kernel::module_pwm_platform_driver! { +/// type: MyDriver, +/// name: "Module name", +/// authors: ["Author name"], +/// description: "Description", +/// license: "GPL v2", +/// } +///``` +#[macro_export] +macro_rules! module_pwm_platform_driver { + ($($user_args:tt)*) =3D> { + $crate::module_platform_driver! { + $($user_args)* + imports_ns: ["PWM"], + } + }; +} --=20 2.34.1 From nobody Mon Feb 9 04:27:41 2026 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 B9B7232D0EC for ; Tue, 28 Oct 2025 12:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654203; cv=none; b=t6fVY5K9cz/edB3no7iCHJkQMXEe/sffCkcDyffm+RFSRSrbKzGFdzc02Y52o5qL319gJDs59Sx7vlGg7WBwHSobU0tZ4suUXFVYNhkU1TvA4qaCxtPzL50OJmYaw3EaZo6XAaDhvx3bptT5RFyLjp6Nyj4i4gBYkiG2U2DAuyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654203; c=relaxed/simple; bh=CcfjXkudmcRMkM5k4FnFQVn2Pj1DpNZz1VwIHs0i84c=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=KA8I3ivb7Yv+eDixYl6RxoXebbT+qOP9jFpTYFaXFqBixe6xsbAbkox92vocojZYnKlFxCvnej/NTqcnD5v77b/7FOgFr1F4bx36BG7GMDL+uZmkqaSfsn3ulRD0WHD9CBvuMJBQjU3IV0G2G306gNucevUKygIY9C5Uic17DlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=LkN5orKn; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="LkN5orKn" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20251028122318euoutp0242cb6fb8f07ad3db4e735a6c61ace25c~ypyj0t17s0282502825euoutp02V for ; Tue, 28 Oct 2025 12:23:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20251028122318euoutp0242cb6fb8f07ad3db4e735a6c61ace25c~ypyj0t17s0282502825euoutp02V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1761654198; bh=uWMsqhhcsDbSWAzMcyI6QgsDz6D9C7w2POWICu7CupQ=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=LkN5orKn9XHXubVcNTl/1nuQvVq/uHBE3gmWBWr+njVfDGe1qwKGccWy7Qxfxhm73 49AfQbivz9L/BefYPWUM7iENdKJsXJn+iYMhWgpqv5OdVk9PjyvmIJ89YOoRJsA+UY s/oYE8G8ywiXZMSqRTFvuNEigb0hGQsnDHVhhI6c= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20251028122318eucas1p17161f0e1f2281c868688e8a4cc3d8f68~ypyjVyJo80564105641eucas1p1P; Tue, 28 Oct 2025 12:23:18 +0000 (GMT) Received: from AMDC4942.eu.corp.samsungelectronics.net (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20251028122317eusmtip2563abe71fe7499c4e71a7162653a7e76~ypyih3a7n2998829988eusmtip2H; Tue, 28 Oct 2025 12:23:17 +0000 (GMT) From: Michal Wilczynski Date: Tue, 28 Oct 2025 13:22:34 +0100 Subject: [PATCH 3/4] pwm: th1520: Use module_pwm_platform_driver! macro Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-pwm_fixes-v1-3-25a532d31998@samsung.com> In-Reply-To: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Michal Wilczynski , Drew Fustini , Guo Ren , Fu Wei , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: Stephen Rothwell , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-CMS-MailID: 20251028122318eucas1p17161f0e1f2281c868688e8a4cc3d8f68 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251028122318eucas1p17161f0e1f2281c868688e8a4cc3d8f68 X-EPHeader: CA X-CMS-RootMailID: 20251028122318eucas1p17161f0e1f2281c868688e8a4cc3d8f68 References: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> The `pwm_th1520` Rust driver calls C functions from the `PWM` namespace, triggering `modpost` warnings due to missing namespace import declarations in its `.modinfo` section. Fix these warnings and simplify the module declaration by switching from the generic `kernel::module_platform_driver!` macro to the newly introduced PWM-specific `kernel::module_pwm_platform_driver!` macro. The new macro automatically handles the required `imports_ns: ["PWM"]` declaration. Signed-off-by: Michal Wilczynski Reviewed-by: Elle Rhumsaa Reviewed-by: Troy Mitchell --- drivers/pwm/pwm_th1520.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs index 0ad38b78be854ab3c10268fb20763d9962f59c0f..5fb123f5e9c6dc3a8ee9a7a47fa= 778c23213e957 100644 --- a/drivers/pwm/pwm_th1520.rs +++ b/drivers/pwm/pwm_th1520.rs @@ -369,7 +369,7 @@ fn probe( } } =20 -kernel::module_platform_driver! { +kernel::module_pwm_platform_driver! { type: Th1520PwmPlatformDriver, name: "pwm-th1520", authors: ["Michal Wilczynski "], --=20 2.34.1 From nobody Mon Feb 9 04:27:41 2026 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 0C53632E135 for ; Tue, 28 Oct 2025 12:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654203; cv=none; b=ofA0Tice/AKtBApwACtjUG4Kp3JBVpVT/1IpjpHhMlkGsB/OxtN4ejDmoSeauhIGqUPRPxhc+Ew/ybF5rLuv9AUaemyVDl3tF8pxe1aSQJ0jAucFkR+e1fIqMGVGXLRyaEKXuIUAV+FZm1HtXfFcofgXwYHHrRLwnIYnvfYwSPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761654203; c=relaxed/simple; bh=yhgJHAx9fPc8H/lCyHycOlGU2mO1WZaQYsqIZeybbiw=; h=From:Date:Subject:MIME-Version:Message-Id:In-Reply-To:To:Cc: Content-Type:References; b=U8wIajh41LuQ1eU3q5ngH9dTD5VX7DyRTESLAqbKIJe5ZQvMVMra2mcXvmbinqcmMnf83RiHAdm3O3JGbBHrK4bdsdiMcSwPt63bqNZzh8Wyg8Z8hIfYdN7GLSIoUiBTTnrkml9e9yjxHzAd7h6Gp6BHQx5FnbL0XSetUyjgL+4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=BnIeIH5j; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="BnIeIH5j" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20251028122319euoutp0185a46675e5efe0ce14b393b2d292c4f1~ypyk7ZWq00496004960euoutp01k for ; Tue, 28 Oct 2025 12:23:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20251028122319euoutp0185a46675e5efe0ce14b393b2d292c4f1~ypyk7ZWq00496004960euoutp01k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1761654199; bh=Lm82DRGUZZTV1/beTKsFXySMTVqtnJxLBKgmXs1gVko=; h=From:Date:Subject:In-Reply-To:To:Cc:References:From; b=BnIeIH5jEm0VOKgBrzpMbb1uakOkoeayhb74hp0j9RjEqIYQ9EVWNhalDlmIwitFP jS/H83dsM39aXBHimHfxdD23J7JTzy4buroRirlXUeUAUlf6q/vqiqP1EPc/KOWpaR NpGDcXgj3sSnsomxoIMhIeOy5C8FJPrNfZFHVpd0= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20251028122318eucas1p1863a8b44efe27c28a1bcf427d2855c00~ypykGd4I41056510565eucas1p1H; Tue, 28 Oct 2025 12:23:18 +0000 (GMT) Received: from AMDC4942.eu.corp.samsungelectronics.net (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20251028122318eusmtip2cb42586905d3b5fd524bea75b0831884~ypyjWQEit0671406714eusmtip20; Tue, 28 Oct 2025 12:23:18 +0000 (GMT) From: Michal Wilczynski Date: Tue, 28 Oct 2025 13:22:35 +0100 Subject: [PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-pwm_fixes-v1-4-25a532d31998@samsung.com> In-Reply-To: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> To: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Michal Wilczynski , Drew Fustini , Guo Ren , Fu Wei , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: Stephen Rothwell , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org X-Mailer: b4 0.15-dev X-CMS-MailID: 20251028122318eucas1p1863a8b44efe27c28a1bcf427d2855c00 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251028122318eucas1p1863a8b44efe27c28a1bcf427d2855c00 X-EPHeader: CA X-CMS-RootMailID: 20251028122318eucas1p1863a8b44efe27c28a1bcf427d2855c00 References: <20251028-pwm_fixes-v1-0-25a532d31998@samsung.com> Clippy warns about redundant struct field initialization when the field name and the variable name are the same (e.g., `status: status`). No functional change. Signed-off-by: Michal Wilczynski Reviewed-by: Elle Rhumsaa --- drivers/pwm/pwm_th1520.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs index 5fb123f5e9c6dc3a8ee9a7a47fa778c23213e957..95a809af48eb16fe13125d4d9f4= ee5de20555e77 100644 --- a/drivers/pwm/pwm_th1520.rs +++ b/drivers/pwm/pwm_th1520.rs @@ -185,7 +185,7 @@ fn round_waveform_tohw( ); =20 Ok(pwm::RoundedWaveform { - status: status, + status, hardware_waveform: wfhw, }) } --=20 2.34.1