Skip to content

Commit 03027aa

Browse files
committed
Merge tag 'rust-fixes-6.6' of https://github.com/Rust-for-Linux/linux
Pull rust fixes from Miguel Ojeda: - GCC build: fix bindgen build error with '-fstrict-flex-arrays' - Error module: fix the description for 'ECHILD' and fix Markdown style nit - Code docs: fix logo replacement - Docs: update docs output path - Kbuild: remove old docs output path in 'cleandocs' target * tag 'rust-fixes-6.6' of https://github.com/Rust-for-Linux/linux: rust: docs: fix logo replacement kbuild: remove old Rust docs output path docs: rust: update Rust docs output path rust: fix bindgen build error with fstrict-flex-arrays rust: error: Markdown style nit rust: error: fix the description for `ECHILD`
2 parents 45d3291 + cfd9672 commit 03027aa

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Documentation/rust/general-information.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ target with the same invocation used for compilation, e.g.::
2929

3030
To read the docs locally in your web browser, run e.g.::
3131

32-
xdg-open rust/doc/kernel/index.html
32+
xdg-open Documentation/output/rust/rustdoc/kernel/index.html
3333

3434
To learn about how to write the documentation, please see coding-guidelines.rst.
3535

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ endif # CONFIG_MODULES
14741474
# Directories & files removed with 'make clean'
14751475
CLEAN_FILES += vmlinux.symvers modules-only.symvers \
14761476
modules.builtin modules.builtin.modinfo modules.nsdeps \
1477-
compile_commands.json .thinlto-cache rust/test rust/doc \
1477+
compile_commands.json .thinlto-cache rust/test \
14781478
rust-project.json .vmlinux.objs .vmlinux.export.c
14791479

14801480
# Directories & files removed with 'make mrproper'

rust/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,14 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $<
9393
# and then retouch the generated files.
9494
rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \
9595
rustdoc-alloc rustdoc-kernel
96-
$(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output)
97-
$(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output)
96+
$(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output)/static.files/
97+
$(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output)/static.files/
9898
$(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed -Ei \
99-
-e 's:rust-logo\.svg:logo.svg:g' \
100-
-e 's:rust-logo\.png:logo.svg:g' \
101-
-e 's:favicon\.svg:logo.svg:g' \
102-
-e 's:<link rel="alternate icon" type="image/png" href="[./]*favicon-(16x16|32x32)\.png">::g'
103-
$(Q)echo '.logo-container > img { object-fit: contain; }' \
104-
>> $(rustdoc_output)/rustdoc.css
99+
-e 's:rust-logo-[0-9a-f]+\.svg:logo.svg:g' \
100+
-e 's:favicon-[0-9a-f]+\.svg:logo.svg:g' \
101+
-e 's:<link rel="alternate icon" type="image/png" href="[/.]+/static\.files/favicon-(16x16|32x32)-[0-9a-f]+\.png">::g'
102+
$(Q)for f in $(rustdoc_output)/static.files/rustdoc-*.css; do \
103+
echo ".logo-container > img { object-fit: contain; }" >> $$f; done
105104

106105
rustdoc-macros: private rustdoc_host = yes
107106
rustdoc-macros: private rustc_target_flags = --crate-type proc-macro \
@@ -290,6 +289,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
290289
-fno-reorder-blocks -fno-allow-store-data-races -fasan-shadow-offset=% \
291290
-fzero-call-used-regs=% -fno-stack-clash-protection \
292291
-fno-inline-functions-called-once -fsanitize=bounds-strict \
292+
-fstrict-flex-arrays=% \
293293
--param=% --param asan-%
294294

295295
# Derived from `scripts/Makefile.clang`.

rust/kernel/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub mod code {
3737
declare_err!(E2BIG, "Argument list too long.");
3838
declare_err!(ENOEXEC, "Exec format error.");
3939
declare_err!(EBADF, "Bad file number.");
40-
declare_err!(ECHILD, "Exec format error.");
40+
declare_err!(ECHILD, "No child processes.");
4141
declare_err!(EAGAIN, "Try again.");
4242
declare_err!(ENOMEM, "Out of memory.");
4343
declare_err!(EACCES, "Permission denied.");
@@ -133,7 +133,7 @@ impl Error {
133133
/// Returns the error encoded as a pointer.
134134
#[allow(dead_code)]
135135
pub(crate) fn to_ptr<T>(self) -> *mut T {
136-
// SAFETY: self.0 is a valid error due to its invariant.
136+
// SAFETY: `self.0` is a valid error due to its invariant.
137137
unsafe { bindings::ERR_PTR(self.0.into()) as *mut _ }
138138
}
139139

0 commit comments

Comments
 (0)