Messages in this thread | | | Date | Tue, 9 Apr 2024 19:57:42 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH v3 01/14] x86/sev: Rename snp_init() in the boot/compressed/sev.c file |
| |
On Tue, Apr 09, 2024 at 12:44:13PM -0500, Tom Lendacky wrote: > When it's not static and has the name snp_init(), then it has to match the > definition in arch/x86/include/asm/sev.h, which is really intended for the > snp_init() in arch/x86/kernel/sev.c when called from > arch/x86/mm/mem_encrypt_identity.c. > > So, yes, changing the name would be enough except then it remains not a > static and you can get a compiler warning about not having a prototype for > it if the -Wmissing-prototypes option is ever applied to that file (I don't > believe it is today because it is in the decompressor code, but that can > change). And since nothing calls the snp_init() in > arch/x86/boot/compressed/sev.c from outside of that file, making it static > was appropriate.
Yes, then please remove all that text about what could potentially happen from the commit message so that it is not confusing as to what the situation *currently* is.
The two functions are independent right now. It is enough to say that you want to differentiate which one is called when, in order to avoid confusion.
Thx.
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |