Commit 03027aa3 authored by Linus Torvalds's avatar Linus Torvalds

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`
parents 45d3291c cfd96726
...@@ -29,7 +29,7 @@ target with the same invocation used for compilation, e.g.:: ...@@ -29,7 +29,7 @@ target with the same invocation used for compilation, e.g.::
To read the docs locally in your web browser, run e.g.:: To read the docs locally in your web browser, run e.g.::
xdg-open rust/doc/kernel/index.html xdg-open Documentation/output/rust/rustdoc/kernel/index.html
To learn about how to write the documentation, please see coding-guidelines.rst. To learn about how to write the documentation, please see coding-guidelines.rst.
......
...@@ -1474,7 +1474,7 @@ endif # CONFIG_MODULES ...@@ -1474,7 +1474,7 @@ endif # CONFIG_MODULES
# Directories & files removed with 'make clean' # Directories & files removed with 'make clean'
CLEAN_FILES += vmlinux.symvers modules-only.symvers \ CLEAN_FILES += vmlinux.symvers modules-only.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \ modules.builtin modules.builtin.modinfo modules.nsdeps \
compile_commands.json .thinlto-cache rust/test rust/doc \ compile_commands.json .thinlto-cache rust/test \
rust-project.json .vmlinux.objs .vmlinux.export.c rust-project.json .vmlinux.objs .vmlinux.export.c
# Directories & files removed with 'make mrproper' # Directories & files removed with 'make mrproper'
......
...@@ -93,15 +93,14 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $< ...@@ -93,15 +93,14 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $<
# and then retouch the generated files. # and then retouch the generated files.
rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \ rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \
rustdoc-alloc rustdoc-kernel rustdoc-alloc rustdoc-kernel
$(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output) $(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output)/static.files/
$(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output) $(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output)/static.files/
$(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed -Ei \ $(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed -Ei \
-e 's:rust-logo\.svg:logo.svg:g' \ -e 's:rust-logo-[0-9a-f]+\.svg:logo.svg:g' \
-e 's:rust-logo\.png:logo.svg:g' \ -e 's:favicon-[0-9a-f]+\.svg:logo.svg:g' \
-e 's:favicon\.svg:logo.svg:g' \ -e 's:<link rel="alternate icon" type="image/png" href="[/.]+/static\.files/favicon-(16x16|32x32)-[0-9a-f]+\.png">::g'
-e 's:<link rel="alternate icon" type="image/png" href="[./]*favicon-(16x16|32x32)\.png">::g' $(Q)for f in $(rustdoc_output)/static.files/rustdoc-*.css; do \
$(Q)echo '.logo-container > img { object-fit: contain; }' \ echo ".logo-container > img { object-fit: contain; }" >> $$f; done
>> $(rustdoc_output)/rustdoc.css
rustdoc-macros: private rustdoc_host = yes rustdoc-macros: private rustdoc_host = yes
rustdoc-macros: private rustc_target_flags = --crate-type proc-macro \ 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=% \ ...@@ -290,6 +289,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
-fno-reorder-blocks -fno-allow-store-data-races -fasan-shadow-offset=% \ -fno-reorder-blocks -fno-allow-store-data-races -fasan-shadow-offset=% \
-fzero-call-used-regs=% -fno-stack-clash-protection \ -fzero-call-used-regs=% -fno-stack-clash-protection \
-fno-inline-functions-called-once -fsanitize=bounds-strict \ -fno-inline-functions-called-once -fsanitize=bounds-strict \
-fstrict-flex-arrays=% \
--param=% --param asan-% --param=% --param asan-%
# Derived from `scripts/Makefile.clang`. # Derived from `scripts/Makefile.clang`.
......
...@@ -37,7 +37,7 @@ macro_rules! declare_err { ...@@ -37,7 +37,7 @@ macro_rules! declare_err {
declare_err!(E2BIG, "Argument list too long."); declare_err!(E2BIG, "Argument list too long.");
declare_err!(ENOEXEC, "Exec format error."); declare_err!(ENOEXEC, "Exec format error.");
declare_err!(EBADF, "Bad file number."); declare_err!(EBADF, "Bad file number.");
declare_err!(ECHILD, "Exec format error."); declare_err!(ECHILD, "No child processes.");
declare_err!(EAGAIN, "Try again."); declare_err!(EAGAIN, "Try again.");
declare_err!(ENOMEM, "Out of memory."); declare_err!(ENOMEM, "Out of memory.");
declare_err!(EACCES, "Permission denied."); declare_err!(EACCES, "Permission denied.");
...@@ -133,7 +133,7 @@ pub fn to_errno(self) -> core::ffi::c_int { ...@@ -133,7 +133,7 @@ pub fn to_errno(self) -> core::ffi::c_int {
/// Returns the error encoded as a pointer. /// Returns the error encoded as a pointer.
#[allow(dead_code)] #[allow(dead_code)]
pub(crate) fn to_ptr<T>(self) -> *mut T { pub(crate) fn to_ptr<T>(self) -> *mut T {
// SAFETY: self.0 is a valid error due to its invariant. // SAFETY: `self.0` is a valid error due to its invariant.
unsafe { bindings::ERR_PTR(self.0.into()) as *mut _ } unsafe { bindings::ERR_PTR(self.0.into()) as *mut _ }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment