Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with v7 #782

Merged
merged 14 commits into from
May 31, 2022
Merged

Sync with v7 #782

merged 14 commits into from
May 31, 2022

Conversation

ojeda
Copy link
Member

@ojeda ojeda commented May 31, 2022

Some small changes I did for the quick v7 round. Some further extra changes will go on top, but these are the ones that were in v7.

ojeda added 14 commits May 27, 2022 22:51
Since commit bf7fbee ("module: Cure the MODULE_LICENSE "GPL" vs.
"GPL v2" bogosity"), Documentation/process/license-rules.rst explains
that `MODULE_LICENSE` arguments can simply use `GPL` instead of `GPL v2`,
because it is not meant to replace the proper licensing information.

Since the `license:` field of the `module!` macro is the same as
`MODULE_LICENSE`, use the simpler form in Rust too.

Signed-off-by: Miguel Ojeda <[email protected]>
For Rust, the `module!` macro is best placed in the beginning
of the file, since it gives general information about the module,
nearby the documentation.

This also makes it consistent with the other samples.

Signed-off-by: Miguel Ojeda <[email protected]>
The list of `#include` files should be sorted according to
the comment above.

Furthermore, `linux/` should be preferred to `asm/`.

Signed-off-by: Miguel Ojeda <[email protected]>
Make the file a bit more `checkpatch.pl`-clean by fixing
a couple style issues and replace bad indentation (spaces).

Furthermore, re-sort the `#include`s too and prefer `linux/`
to `asm/`.

Signed-off-by: Miguel Ojeda <[email protected]>
Suggested-by: Petr Mladek <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Documentation should have `SPDX-License-Identifier`s too.

I was not sure if that was the case, since many files do not
have it yet and others use a different (but deprecated) license
meant for documentation -- Jonathan Corbet confirmed privately
they should.

Signed-off-by: Miguel Ojeda <[email protected]>
reST's list tables are quite hard to read when inspecting
the source of the documents.

There are other 3 ways to create tables in reST: grids tables,
CSV tables and simple tables. Plus, of course, the "manual"
way of using a code block with custom formatting.

Use simple tables since they are lightweight and we do not need
the features of the more complex tables.

Suggested-by: Akira Yokosawa <[email protected]>
Suggested-by: Jonathan Corbet <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
`F:` entries should be sorted, according to `checkpatch.pl`.

Signed-off-by: Miguel Ojeda <[email protected]>
To simplify the Rust patch series and the licensing of the logo,
let's use the Linux logo instead.

For the moment, there is no SVG version, so we use the GIF one.
When the SVG version gets merged [1], we can switch to that one instead.

This allows us to remove from the `rust` branch both the Linux SVG
logo and the Rust for Linux SVG logo, plus the `COPYING-logo` file.

Link: https://lore.kernel.org/lkml/[email protected]/ [1]
Signed-off-by: Miguel Ojeda <[email protected]>
The `%pA` format specifier is only intended to be used from Rust.

`checkpatch.pl` already gives a warning for invalid specificers:

    WARNING: Invalid vsprintf pointer extension '%pA'

With this change, we introduce an error message with further
explanation:

    ERROR: '%pA' is only intended to be used from Rust code

Suggested-by: Kees Cook <[email protected]>
Co-developed-by: Alex Gaynor <[email protected]>
Signed-off-by: Alex Gaynor <[email protected]>
Co-developed-by: Wedson Almeida Filho <[email protected]>
Signed-off-by: Wedson Almeida Filho <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Include Rust in the "source code files" category, so that
the language-independent tests are checked for Rust too,
and teach `checkpatch` about the comment style for Rust files.

This enables the malformed SPDX check, the misplaced SPDX license
tag check, the long line checks, the lines without a newline check
and the embedded filename check.

Co-developed-by: Alex Gaynor <[email protected]>
Signed-off-by: Alex Gaynor <[email protected]>
Co-developed-by: Wedson Almeida Filho <[email protected]>
Signed-off-by: Wedson Almeida Filho <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
@ojeda
Copy link
Member Author

ojeda commented May 31, 2022

Thanks @bjorn3 as usual!

@ojeda ojeda merged commit e0326eb into Rust-for-Linux:rust May 31, 2022
@ojeda ojeda deleted the sync-with-v7 branch May 31, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants