Linux Modules
 help / color / mirror / Atom feed
From: Petr Pavlu <petr.pavlu@suse.com>
To: Wenzhao Liao <wenzhaoliao@ruc.edu.cn>
Cc: mcgrof@kernel.org, da.gomez@kernel.org, samitolvanen@google.com,
	ojeda@kernel.org, linux-modules@vger.kernel.org,
	rust-for-linux@vger.kernel.org, atomlin@atomlin.com,
	boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com,
	lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
	tmgross@umich.edu, dakr@kernel.org, linux-kernel@vger.kernel.org,
	Greg KH <greg@kroah.com>
Subject: Re: [PATCH 1/1] rust: module_param: support bool parameters
Date: Fri, 10 Jul 2026 16:10:28 +0200	[thread overview]
Message-ID: <5b8b72b2-f832-4fb4-8fb4-9fd16b96b902@suse.com> (raw)
In-Reply-To: <20260411130254.3510128-2-wenzhaoliao@ruc.edu.cn>

On 4/11/26 3:02 PM, Wenzhao Liao wrote:
> Add support for parsing boolean module parameters in the Rust
> module! macro.
> 
> Currently, only integer types are supported by the `module_param!`
> macros. This patch implements the `ModuleParam` trait for `bool`
> by delegating the string parsing to the existing C implementation
> via `kstrtobool_bytes()`. It also wires up `PARAM_OPS_BOOL` so that
> the Rust parameter system correctly links to the C `param_ops_bool`
> structure.
> 
> For demonstration and verification, a boolean parameter is added
> to `samples/rust/rust_minimal.rs`.
> 
> Assisted-by: Codex:GPT-5
> Signed-off-by: Wenzhao Liao <wenzhaoliao@ruc.edu.cn>

I've queued the patch on modules-next for v7.3-rc1, with the following
minor changes:

* Added a short description of the motivation to the commit message:

  Support for boolean parameters will initially be used by the Rust
  null block driver [1].

  Link: https://lore.kernel.org/all/20260609-rnull-v6-19-rc5-send-v2-4-82c7404542e2@kernel.org/ [1]

* Rebased the patch on top of '[PATCH v2] rust: module_param: return
  value by copy from `value`' [1], which required removing the
  dereference from '*module_parameters::test_bool_parameter.value()' in
  samples/rust/rust_minimal.rs.

[1] https://lore.kernel.org/linux-modules/20260601-modules-value-ref-v2-1-12ebbf0510c9@kernel.org/

-- 
Thanks,
Petr

  parent reply	other threads:[~2026-07-10 14:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-11 13:02 [PATCH 0/1] rust: module_param: support bool parameters Wenzhao Liao
2026-04-11 13:02 ` [PATCH 1/1] " Wenzhao Liao
2026-04-27  8:04   ` Andreas Hindborg
2026-07-10 14:10   ` Petr Pavlu [this message]
2026-04-11 13:20 ` [PATCH 0/1] " Greg KH
2026-04-13 12:00   ` Andreas Hindborg
2026-04-13 12:25     ` Greg KH
2026-05-28 13:15       ` Andreas Hindborg

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=5b8b72b2-f832-4fb4-8fb4-9fd16b96b902@suse.com \
    --to=petr.pavlu@suse.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=atomlin@atomlin.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=da.gomez@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=tmgross@umich.edu \
    --cc=wenzhaoliao@ruc.edu.cn \
    /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