The patch titled Subject: xz: fix comments and coding style has been added to the -mm mm-nonmm-unstable branch. Its filename is xz-fix-comments-and-coding-style.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/xz-fix-comments-and-coding-style.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Lasse Collin <lasse.collin@xxxxxxxxxxx> Subject: xz: fix comments and coding style Date: Sun, 21 Jul 2024 16:36:19 +0300 - Fix comments that were no longer in sync with the code below them. - Fix language errors. - Fix coding style. Link: https://lkml.kernel.org/r/20240721133633.47721-5-lasse.collin@xxxxxxxxxxx Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx> Reviewed-by: Sam James <sam@xxxxxxxxxx> Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Emil Renner Berthing <emil.renner.berthing@xxxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Cc: Joel Stanley <joel@xxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Jubin Zhong <zhongjubin@xxxxxxxxxx> Cc: Jules Maselbas <jmaselbas@xxxxxxxx> Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx> Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Rui Li <me@xxxxxxxxx> Cc: Simon Glass <sjg@xxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/decompress_unxz.c | 20 ++++++++++---------- lib/xz/Kconfig | 3 ++- scripts/Makefile.lib | 13 ++++++++----- 3 files changed, 20 insertions(+), 16 deletions(-) --- a/lib/decompress_unxz.c~xz-fix-comments-and-coding-style +++ a/lib/decompress_unxz.c @@ -102,7 +102,7 @@ #ifdef STATIC # define XZ_PREBOOT #else -#include <linux/decompress/unxz.h> +# include <linux/decompress/unxz.h> #endif #ifdef __KERNEL__ # include <linux/decompress/mm.h> @@ -219,7 +219,7 @@ void *memmove(void *dest, const void *sr #endif /* - * Since we need memmove anyway, would use it as memcpy too. + * Since we need memmove anyway, we could use it as memcpy too. * Commented out for now to avoid breaking things. */ /* @@ -389,17 +389,17 @@ error_alloc_state: } /* - * This macro is used by architecture-specific files to decompress + * This function is used by architecture-specific files to decompress * the kernel image. */ #ifdef XZ_PREBOOT -STATIC int INIT __decompress(unsigned char *buf, long len, - long (*fill)(void*, unsigned long), - long (*flush)(void*, unsigned long), - unsigned char *out_buf, long olen, - long *pos, - void (*error)(char *x)) +STATIC int INIT __decompress(unsigned char *in, long in_size, + long (*fill)(void *dest, unsigned long size), + long (*flush)(void *src, unsigned long size), + unsigned char *out, long out_size, + long *in_used, + void (*error)(char *x)) { - return unxz(buf, len, fill, flush, out_buf, pos, error); + return unxz(in, in_size, fill, flush, out, in_used, error); } #endif --- a/lib/xz/Kconfig~xz-fix-comments-and-coding-style +++ a/lib/xz/Kconfig @@ -5,7 +5,8 @@ config XZ_DEC help LZMA2 compression algorithm and BCJ filters are supported using the .xz file format as the container. For integrity checking, - CRC32 is supported. See Documentation/staging/xz.rst for more information. + CRC32 is supported. See Documentation/staging/xz.rst for more + information. if XZ_DEC --- a/scripts/Makefile.lib~xz-fix-comments-and-coding-style +++ a/scripts/Makefile.lib @@ -533,14 +533,17 @@ quiet_cmd_fit = FIT $@ # XZ # --------------------------------------------------------------------------- -# Use xzkern to compress the kernel image and xzmisc to compress other things. +# Use xzkern or xzkern_with_size to compress the kernel image and xzmisc to +# compress other things. # # xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage # of the kernel decompressor. A BCJ filter is used if it is available for -# the target architecture. xzkern also appends uncompressed size of the data -# using size_append. The .xz format has the size information available at -# the end of the file too, but it's in more complex format and it's good to -# avoid changing the part of the boot code that reads the uncompressed size. +# the target architecture. +# +# xzkern_with_size also appends uncompressed size of the data using +# size_append. The .xz format has the size information available at the end +# of the file too, but it's in more complex format and it's good to avoid +# changing the part of the boot code that reads the uncompressed size. # Note that the bytes added by size_append will make the xz tool think that # the file is corrupt. This is expected. # _ Patches currently in -mm which might be from lasse.collin@xxxxxxxxxxx are maintainers-add-xz-embedded-maintainer.patch licenses-add-0bsd-license-text.patch xz-switch-from-public-domain-to-bsd-zero-clause-license-0bsd.patch xz-fix-comments-and-coding-style.patch xz-fix-kernel-doc-formatting-errors-in-xzh.patch xz-improve-the-microlzma-kernel-doc-in-xzh.patch xz-documentation-staging-xzrst-revise-thoroughly.patch docs-add-xz_extern-to-c_id_attributes.patch xz-cleanup-crc32-edits-from-2018.patch xz-optimize-for-loop-conditions-in-the-bcj-decoders.patch xz-add-arm64-bcj-filter.patch xz-add-risc-v-bcj-filter.patch xz-use-128-mib-dictionary-and-force-single-threaded-mode.patch xz-adjust-arch-specific-options-for-better-kernel-compression.patch arm64-boot-add-imagexz-support.patch riscv-boot-add-imagexz-support.patch