public inbox for linux-pwm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Wilczynski <m.wilczynski@samsung.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Drew Fustini" <fustini@kernel.org>,
	"Guo Ren" <guoren@kernel.org>, "Fu Wei" <wefu@redhat.com>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 0/4] Introduce import_ns support for Rust
Date: Wed, 29 Oct 2025 12:07:43 +0100	[thread overview]
Message-ID: <df1827bd-628b-424f-80a6-63cea6bf7a39@samsung.com> (raw)
In-Reply-To: <2dedlnknikkrwg5f6ocuvjrogdjuqyg4sg6zkkao4w4yyvvsje@dkt7rco3fen3>



On 10/29/25 11:04, Uwe Kleine-König wrote:
> Hello,
> 
> On Tue, Oct 28, 2025 at 01:22:31PM +0100, Michal Wilczynski wrote:
>> This series addresses build warnings reported by `modpost` for the Rust
>> PWM driver (`pwm_th1520`) in linux-next:
>>
>> WARNING: modpost: module pwm_th1520 uses symbol pwmchip_release from
>> namespace PWM, but does not import it.
>>
>> These warnings occur because Rust modules, like C modules, need to
>> declare their dependencies on C symbols exported to specific namespaces
>> (using `EXPORT_SYMBOL_NS` in C). This is done by embedding
>> "import_ns=<NAMESPACE>" tags into the module's `.modinfo` section, which
>> `modpost` verifies.  The C macro `MODULE_IMPORT_NS()` handles this, but
>> the Rust `module!` macro lacked equivalent functionality.
>>
>> This series introduces the necessary support:
>>
>> Patch 1 extends the core `module!` macro in `rust/macros/module.rs`
>> to parse an optional `imports_ns: [...]` field and generate the required
>> `import_ns` tags in the `.modinfo` section.
>>
>> Patch 2 adds a convenience macro `module_pwm_platform_driver!` to
>> `rust/kernel/pwm.rs`. This macro wraps the standard
>> `module_platform_driver!` and automatically adds `imports_ns: ["PWM"]`,
>> simplifying module declaration for PWM driver authors.
>>
>> Patch 3 updates the `pwm_th1520` driver to use the new helper macro,
>> fixing the build warnings.
> 
> Given that for now the pwm_th1520 driver is the only user, does it make
> sense to merge this series via my pwm tree? If it goes via a different
> tree, I'd like to have a tag to merge into my tree to hand over code
> which is free of warnings to Linus in the next merge window.

Hi,

I agree with you. Hopefully we can get an ack from the Rust maintainers
and the series can go through your tree.

> 
>> Patch 4 includes a minor clippy style fix for the `pwm_th1520` driver.
> 
> If you could mention the command that makes this warning visible, I'd be
> glad to add that to my repertoire of build checks.

I'm using the following command to compile the kernel:
$ make ARCH=riscv -j20 LLVM=1 CLIPPY=1

I guess you were missing the 'CLIPPY=1' part.

> 
> Thanks for addressing the issue
> Uwe

Best regards,
-- 
Michal Wilczynski <m.wilczynski@samsung.com>

  reply	other threads:[~2025-10-29 11:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20251028122315eucas1p159b65037cf6f3f710c1917e2464399b5@eucas1p1.samsung.com>
2025-10-28 12:22 ` [PATCH 0/4] Introduce import_ns support for Rust Michal Wilczynski
2025-10-28 12:22   ` [PATCH 1/4] rust: macros: Add support for 'imports_ns' to module! Michal Wilczynski
2025-10-28 22:32     ` Elle Rhumsaa
2025-10-29 12:47     ` Alice Ryhl
2025-10-31  7:47     ` Uwe Kleine-König
2025-10-31 12:57       ` Miguel Ojeda
2025-10-31 13:12         ` Daniel Gomez
2025-11-01  8:06           ` Uwe Kleine-König
2025-10-28 12:22   ` [PATCH 2/4] rust: pwm: Add module_pwm_platform_driver! macro Michal Wilczynski
2025-10-28 22:32     ` Elle Rhumsaa
2025-10-28 12:22   ` [PATCH 3/4] pwm: th1520: Use " Michal Wilczynski
2025-10-28 22:33     ` Elle Rhumsaa
2025-10-29  0:59     ` Troy Mitchell
2025-10-28 12:22   ` [PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init Michal Wilczynski
2025-10-28 22:33     ` Elle Rhumsaa
2025-10-30 22:05     ` Uwe Kleine-König
2025-10-29 10:04   ` [PATCH 0/4] Introduce import_ns support for Rust Uwe Kleine-König
2025-10-29 11:07     ` Michal Wilczynski [this message]
2025-10-29 18:18     ` Miguel Ojeda
2025-10-29 18:51       ` Michal Wilczynski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df1827bd-628b-424f-80a6-63cea6bf7a39@samsung.com \
    --to=m.wilczynski@samsung.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=fustini@kernel.org \
    --cc=gary@garyguo.net \
    --cc=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tmgross@umich.edu \
    --cc=ukleinek@kernel.org \
    --cc=wefu@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox