Re: [PATCH] x86: coco: mark cc_mask as __maybe_unused

From: Kirill A. Shutemov
Date: Wed Mar 05 2025 - 04:02:59 EST


On Tue, Mar 04, 2025 at 03:33:34PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When extra warnings are enabled, the cc_mask definition in asm/coco.h
> causes a build failure with gcc:
>
> arch/x86/include/asm/coco.h:28:18: error: 'cc_mask' defined but not used [-Werror=unused-const-variable=]
> 28 | static const u64 cc_mask = 0;
>
> Mark this one as __maybe_unused.
>
> Fixes: a0a8d15a798b ("x86/tdx: Preserve shared bit on mprotect()")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

--
Kiryl Shutsemau / Kirill A. Shutemov