rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
To: a.hindborg@kernel.org, alex.gaynor@gmail.com,
	aliceryhl@google.com, apw@canonical.com, arnd@arndb.de,
	aswinunni01@gmail.com, axboe@kernel.dk, benno.lossin@proton.me,
	bhelgaas@google.com, bjorn3_gh@protonmail.com,
	boqun.feng@gmail.com, dakr@kernel.org, dwaipayanray1@gmail.com,
	ethan.twardy@gmail.com, fujita.tomonori@gmail.com,
	gary@garyguo.net, gregkh@linuxfoundation.org, joe@perches.com,
	lukas.bulwahn@gmail.com, ojeda@kernel.org, pbonzini@redhat.com,
	tmgross@umich.edu, walmeida@microsoft.com
Cc: trintaeoitogc@gmail.com, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH V4 0/2] author field in module! macro should be a array
Date: Fri, 21 Feb 2025 15:21:40 -0300	[thread overview]
Message-ID: <20250221182142.42134-1-trintaeoitogc@gmail.com> (raw)

In the module! macro, the author field is currently of type String.
Since modules can have multiple authors, this limitation prevents
specifying more than one.

- Change the author field to Option<Vec<String>> to allow creating
  modules with multiple authors.

- rename the field from author to authors to make it explicit that it
  can refer to multiple authors.

- In modules that use the author field, update its value to an array of
  strings, and also rename it from author to authors.

- Change the checkpatch.pl to find poorly formatted arrays in the macro
  module!

---
V4 changes 

- Improved checkpatch warning messages
- Improved shiftwidth
- Fixed the regex in checkpatch
---

Guilherme Giacomo Simoes (2):
  rust: module: change author to an array
  checkpatch: throw error for malformed arrays

 drivers/block/rnull.rs               |  2 +-
 rust/kernel/net/phy.rs               |  4 +--
 rust/kernel/pci.rs                   |  2 +-
 rust/macros/lib.rs                   |  6 ++--
 rust/macros/module.rs                | 12 ++++----
 samples/rust/rust_driver_faux.rs     |  2 +-
 samples/rust/rust_driver_pci.rs      |  2 +-
 samples/rust/rust_driver_platform.rs |  2 +-
 samples/rust/rust_minimal.rs         |  2 +-
 samples/rust/rust_misc_device.rs     |  2 +-
 samples/rust/rust_print_main.rs      |  2 +-
 scripts/checkpatch.pl                | 43 ++++++++++++++++++++++++++++
 12 files changed, 63 insertions(+), 18 deletions(-)

-- 
2.34.1


             reply	other threads:[~2025-02-21 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-21 18:21 Guilherme Giacomo Simoes [this message]
2025-02-21 18:21 ` [PATCH V4 1/2] rust: module: change author to an array Guilherme Giacomo Simoes
2025-02-21 18:21 ` [PATCH V4 2/2] checkpatch: throw error for malformed arrays Guilherme Giacomo Simoes
2025-02-22  9:22   ` Joe Perches
2025-02-22 13:30     ` Guilherme Giacomo Simoes

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=20250221182142.42134-1-trintaeoitogc@gmail.com \
    --to=trintaeoitogc@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apw@canonical.com \
    --cc=arnd@arndb.de \
    --cc=aswinunni01@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=benno.lossin@proton.me \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=ethan.twardy@gmail.com \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=walmeida@microsoft.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;
as well as URLs for NNTP newsgroup(s).