Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: fips - annotate fips_enable() with __init to free init memory after boot

The fips_enable() function is only invoked early during kernel boot via the
__setup() macro ("fips=" command line parameter), and is never used again
after initialization completes.

Annotating it with __init places the function in the .init.text section,
allowing the kernel to free its memory after init (when freeing_initmem()
runs), reducing runtime memory footprint.

This is a standard practice for setup/early-parse functions and has no
functional impact — the parsing logic, return values, and fips mode
setting behavior remain unchanged.

Signed-off-by: Can Peng <pengcan@kylinos.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Can Peng and committed by
Herbert Xu
97282e2c e6bba609

+1 -1
+1 -1
crypto/fips.c
··· 22 22 EXPORT_SYMBOL_GPL(fips_fail_notif_chain); 23 23 24 24 /* Process kernel command-line parameter at boot time. fips=0 or fips=1 */ 25 - static int fips_enable(char *str) 25 + static int __init fips_enable(char *str) 26 26 { 27 27 if (kstrtoint(str, 0, &fips_enabled)) 28 28 return 0;