Re: [PATCH v2 17/16] xz: Remove XZ_EXTERN and extern from functions

From: Michael Ellerman
Date: Wed Jul 24 2024 - 08:44:28 EST


Lasse Collin <lasse.collin@xxxxxxxxxxx> writes:
> XZ_EXTERN was used to make internal functions static in the preboot code.
> However, in other decompressors this hasn't been done. On x86-64, this
> makes no difference to the kernel image size.
>
> Omit XZ_EXTERN and let some of the internal functions be extern in the
> preboot code. Omitting XZ_EXTERN from include/linux/xz.h fixes warnings
> in "make htmldocs" and makes the intradocument links to xz_dec functions
> work in Documentation/staging/xz.rst. The alternative would have been to
> add "XZ_EXTERN" to c_id_attributes in Documentation/conf.py but omitting
> XZ_EXTERN seemed cleaner.
>
> Link: https://lore.kernel.org/lkml/20240723205437.3c0664b0@kaneli/
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Cc: Jonathan Corbet <corbet@xxxxxxx>
> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
> Cc: linux-doc@xxxxxxxxxxxxxxx
> Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx>
> ---
>
> Notes:
> This touches xz_config.h in PowerPC boot code. I haven't tested it but
> zlib's functions are extern in the same context, thus this should be
> a safe change on PowerPC.

I gave it a quick build and boot, seems fine.

Tested-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc)

cheers