[lkml]   [2022]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCHv4 01/30] x86/mm: Fix warning on build with X86_MEM_ENCRYPT=y
On Thu, Feb 24, 2022 at 06:56:01PM +0300, Kirill A. Shutemov wrote:
> So far, AMD_MEM_ENCRYPT is the only user of X86_MEM_ENCRYPT. TDX will be
> the second. It will make mem_encrypt.c build without AMD_MEM_ENCRYPT,
> which triggers a warning:
> arch/x86/mm/mem_encrypt.c:69:13: warning: no previous prototype for
> function 'mem_encrypt_init' [-Wmissing-prototypes]
> Fix it by moving mem_encrypt_init() declaration outside of #ifdef
> Signed-off-by: Kirill A. Shutemov <>
> Fixes: 20f07a044a76 ("x86/sev: Move common memory encryption code to mem_encrypt.c")
> Acked-by: David Rientjes <>

The patch title, warning, and "Fixes" tag tend to give the impression
this is fixing a real user-visible bug. But the bug is theoretical, as
it's not possible to enable X86_MEM_ENCRYPT without AMD_MEM_ENCRYPT,
until patch 27.

IMO it would be preferable to just squash this change with patch 27.

Having it as a separate patch is also fine, but it shouldn't be
described as a fix or use the Fixes tag. It's more of a preparatory


 \ /
  Last update: 2022-02-27 23:01    [W:0.619 / U:2.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site