* [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
@ 2026-04-27 8:11 Andreas Hindborg
2026-04-27 11:28 ` Daniel Gomez
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Andreas Hindborg @ 2026-04-27 8:11 UTC (permalink / raw)
To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich
Cc: linux-modules, linux-kernel, rust-for-linux, Andreas Hindborg
Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
the macro is available.
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
rust/kernel/module_param.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
index 6a8a7a875643..dd6d663a0a3c 100644
--- a/rust/kernel/module_param.rs
+++ b/rust/kernel/module_param.rs
@@ -62,8 +62,7 @@ pub trait ModuleParam: Sized + Copy {
// NOTE: If we start supporting arguments without values, val _is_ allowed
// to be null here.
if val.is_null() {
- // TODO: Use pr_warn_once available.
- crate::pr_warn!("Null pointer passed to `module_param::set_param`");
+ crate::pr_warn_once!("Null pointer passed to `module_param::set_param`");
return EINVAL.to_errno();
}
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260427-params-pr-once-481c03df3e2a
Best regards,
--
Andreas Hindborg <a.hindborg@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
@ 2026-04-27 11:28 ` Daniel Gomez
2026-04-27 13:36 ` Gary Guo
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Daniel Gomez @ 2026-04-27 11:28 UTC (permalink / raw)
To: Andreas Hindborg, Luis Chamberlain, Petr Pavlu, Sami Tolvanen,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich
Cc: linux-modules, linux-kernel, rust-for-linux
On 27/04/2026 10.11, Andreas Hindborg wrote:
> Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> the macro is available.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Available since v7.0-rc1. LGTM,
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
2026-04-27 11:28 ` Daniel Gomez
@ 2026-04-27 13:36 ` Gary Guo
2026-04-29 23:21 ` Aaron Tomlin
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Gary Guo @ 2026-04-27 13:36 UTC (permalink / raw)
To: Andreas Hindborg, Luis Chamberlain, Petr Pavlu, Daniel Gomez,
Sami Tolvanen, Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich
Cc: linux-modules, linux-kernel, rust-for-linux
On Mon Apr 27, 2026 at 9:11 AM BST, Andreas Hindborg wrote:
> Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> the macro is available.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
> ---
> rust/kernel/module_param.rs | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
2026-04-27 11:28 ` Daniel Gomez
2026-04-27 13:36 ` Gary Guo
@ 2026-04-29 23:21 ` Aaron Tomlin
2026-05-18 17:43 ` Miguel Ojeda
2026-05-26 23:40 ` Sami Tolvanen
4 siblings, 0 replies; 11+ messages in thread
From: Aaron Tomlin @ 2026-04-29 23:21 UTC (permalink / raw)
To: Andreas Hindborg
Cc: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
linux-modules, linux-kernel, rust-for-linux
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
On Mon, Apr 27, 2026 at 10:11:35AM +0200, Andreas Hindborg wrote:
> Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> the macro is available.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
> ---
> rust/kernel/module_param.rs | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
> index 6a8a7a875643..dd6d663a0a3c 100644
> --- a/rust/kernel/module_param.rs
> +++ b/rust/kernel/module_param.rs
> @@ -62,8 +62,7 @@ pub trait ModuleParam: Sized + Copy {
> // NOTE: If we start supporting arguments without values, val _is_ allowed
> // to be null here.
> if val.is_null() {
> - // TODO: Use pr_warn_once available.
> - crate::pr_warn!("Null pointer passed to `module_param::set_param`");
> + crate::pr_warn_once!("Null pointer passed to `module_param::set_param`");
> return EINVAL.to_errno();
> }
>
>
> ---
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> change-id: 20260427-params-pr-once-481c03df3e2a
>
> Best regards,
> --
> Andreas Hindborg <a.hindborg@kernel.org>
LGTM.
The rust macro was available since v6.19-rc6-60-g46c40f938f5f.
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
--
Aaron Tomlin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
` (2 preceding siblings ...)
2026-04-29 23:21 ` Aaron Tomlin
@ 2026-05-18 17:43 ` Miguel Ojeda
2026-05-18 21:47 ` Sami Tolvanen
2026-05-26 23:40 ` Sami Tolvanen
4 siblings, 1 reply; 11+ messages in thread
From: Miguel Ojeda @ 2026-05-18 17:43 UTC (permalink / raw)
To: Andreas Hindborg
Cc: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux
On Mon, Apr 27, 2026 at 10:13 AM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>
> Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> the macro is available.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
This seems to be:
https://lore.kernel.org/rust-for-linux/20260226120848.82891-3-adarshdas950@gmail.com/
Another one was also sent a few moments ago:
https://lore.kernel.org/rust-for-linux/20260518134107.4114-1-cppcoffee@gmail.com/
Is modules going to pick the original one? Otherwise, I am happy to do so.
I guess we can assume the reviews here to apply there.
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-05-18 17:43 ` Miguel Ojeda
@ 2026-05-18 21:47 ` Sami Tolvanen
0 siblings, 0 replies; 11+ messages in thread
From: Sami Tolvanen @ 2026-05-18 21:47 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Andreas Hindborg, Luis Chamberlain, Petr Pavlu, Daniel Gomez,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux
Hi Miguel,
On Mon, May 18, 2026 at 10:43 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Apr 27, 2026 at 10:13 AM Andreas Hindborg <a.hindborg@kernel.org> wrote:
> >
> > Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> > the macro is available.
> >
> > Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
>
> This seems to be:
>
> https://lore.kernel.org/rust-for-linux/20260226120848.82891-3-adarshdas950@gmail.com/
>
> Another one was also sent a few moments ago:
>
> https://lore.kernel.org/rust-for-linux/20260518134107.4114-1-cppcoffee@gmail.com/
>
> Is modules going to pick the original one? Otherwise, I am happy to do so.
Yes, this is on my list for v7.2.
Sami
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
` (3 preceding siblings ...)
2026-05-18 17:43 ` Miguel Ojeda
@ 2026-05-26 23:40 ` Sami Tolvanen
2026-05-26 23:46 ` Miguel Ojeda
4 siblings, 1 reply; 11+ messages in thread
From: Sami Tolvanen @ 2026-05-26 23:40 UTC (permalink / raw)
To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Aaron Tomlin,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Andreas Hindborg
Cc: linux-modules, linux-kernel, rust-for-linux
On Mon, 27 Apr 2026 10:11:35 +0200, Andreas Hindborg wrote:
> Replace `pr_warn!` and the accompanying TODO with `pr_warn_once!`, now that
> the macro is available.
>
>
Applied to modules-next, thanks!
[1/1] rust: module_param: use `pr_warn_once!` for null pointer warning
commit: 8d2a562b7efe98fdea57d10caaced911fca46a3f
Best regards,
Sami
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-05-26 23:40 ` Sami Tolvanen
@ 2026-05-26 23:46 ` Miguel Ojeda
2026-05-26 23:59 ` Sami Tolvanen
0 siblings, 1 reply; 11+ messages in thread
From: Miguel Ojeda @ 2026-05-26 23:46 UTC (permalink / raw)
To: Sami Tolvanen
Cc: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Aaron Tomlin,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Andreas Hindborg, linux-modules, linux-kernel, rust-for-linux
On Wed, May 27, 2026 at 1:40 AM Sami Tolvanen <samitolvanen@google.com> wrote:
>
> Applied to modules-next, thanks!
>
> [1/1] rust: module_param: use `pr_warn_once!` for null pointer warning
> commit: 8d2a562b7efe98fdea57d10caaced911fca46a3f
Even if we pick this one, should we credit Adarsh Das?
https://lore.kernel.org/rust-for-linux/20260226120848.82891-3-adarshdas950@gmail.com/
Or did Andreas send it earlier than that?
Cheers,
Miguel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning
2026-05-26 23:46 ` Miguel Ojeda
@ 2026-05-26 23:59 ` Sami Tolvanen
0 siblings, 0 replies; 11+ messages in thread
From: Sami Tolvanen @ 2026-05-26 23:59 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Aaron Tomlin,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Andreas Hindborg, linux-modules, linux-kernel, rust-for-linux
On Tue, May 26, 2026 at 4:46 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Wed, May 27, 2026 at 1:40 AM Sami Tolvanen <samitolvanen@google.com> wrote:
> >
> > Applied to modules-next, thanks!
> >
> > [1/1] rust: module_param: use `pr_warn_once!` for null pointer warning
> > commit: 8d2a562b7efe98fdea57d10caaced911fca46a3f
>
> Even if we pick this one, should we credit Adarsh Das?
>
> https://lore.kernel.org/rust-for-linux/20260226120848.82891-3-adarshdas950@gmail.com/
>
> Or did Andreas send it earlier than that?
Ah, that series was never sent to linux-modules, so it wasn't on my
list. I agree that Adarsh seems to have sent the same patch first
though. Happy to credit him unless someone objects.
Sami
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rust: module_param: use pr_warn_once! for null pointer warning
2026-06-06 18:24 [PATCH] rust: module_param: use pr_warn_once! " Maurice Hieronymus
@ 2026-06-06 20:15 ` Miguel Ojeda
0 siblings, 0 replies; 11+ messages in thread
From: Miguel Ojeda @ 2026-06-06 20:15 UTC (permalink / raw)
To: Maurice Hieronymus
Cc: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich, linux-modules, linux-kernel,
rust-for-linux
On Sat, Jun 6, 2026 at 8:24 PM Maurice Hieronymus <mhi@mailbox.org> wrote:
>
> This resolves the existing TODO that asked for pr_warn_once! once
> it became available.
>
> Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Thanks for the patch!
This was already sent and applied, please see commit:
ac2f40107cf1 ("rust: module_param: use `pr_warn_once!` for null
pointer warning")
in linux-next.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] rust: module_param: use pr_warn_once! for null pointer warning
@ 2026-06-06 18:24 Maurice Hieronymus
2026-06-06 20:15 ` Miguel Ojeda
0 siblings, 1 reply; 11+ messages in thread
From: Maurice Hieronymus @ 2026-06-06 18:24 UTC (permalink / raw)
To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich
Cc: linux-modules, linux-kernel, rust-for-linux, Maurice Hieronymus
This resolves the existing TODO that asked for pr_warn_once! once
it became available.
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
---
rust/kernel/module_param.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
index 6a8a7a875643..dd6d663a0a3c 100644
--- a/rust/kernel/module_param.rs
+++ b/rust/kernel/module_param.rs
@@ -62,8 +62,7 @@ pub trait ModuleParam: Sized + Copy {
// NOTE: If we start supporting arguments without values, val _is_ allowed
// to be null here.
if val.is_null() {
- // TODO: Use pr_warn_once available.
- crate::pr_warn!("Null pointer passed to `module_param::set_param`");
+ crate::pr_warn_once!("Null pointer passed to `module_param::set_param`");
return EINVAL.to_errno();
}
---
base-commit: 838a0871cb3cf5988560d17afaaf57592bdb486b
change-id: 20260606-module-param-pr-warn-once-ed2f548ea741
Best regards,
--
Maurice Hieronymus <mhi@mailbox.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-06-06 20:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-27 8:11 [PATCH] rust: module_param: use `pr_warn_once!` for null pointer warning Andreas Hindborg
2026-04-27 11:28 ` Daniel Gomez
2026-04-27 13:36 ` Gary Guo
2026-04-29 23:21 ` Aaron Tomlin
2026-05-18 17:43 ` Miguel Ojeda
2026-05-18 21:47 ` Sami Tolvanen
2026-05-26 23:40 ` Sami Tolvanen
2026-05-26 23:46 ` Miguel Ojeda
2026-05-26 23:59 ` Sami Tolvanen
2026-06-06 18:24 [PATCH] rust: module_param: use pr_warn_once! " Maurice Hieronymus
2026-06-06 20:15 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome