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

Michael Ellerman mpe at ellerman.id.au
Wed Jul 24 22:44:10 AEST 2024


Lasse Collin <lasse.collin at tukaani.org> 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 at ellerman.id.au>
> Cc: Jonathan Corbet <corbet at lwn.net>
> Cc: linuxppc-dev at lists.ozlabs.org
> Cc: linux-doc at vger.kernel.org
> Signed-off-by: Lasse Collin <lasse.collin at tukaani.org>
> ---
>
> 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 at ellerman.id.au> (powerpc)

cheers


More information about the Linuxppc-dev mailing list