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

drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

Silencing the compiler from below compilation error:

drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c:704:23: error: variable 'mmhub_v1_8_mmea_err_status_reg' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {
^
1 error generated.

Mark the variable as __maybe_unused to make it clear to clang that this
is expected, so there is no more warning.

Cc: Christian König <christian.koenig@amd.com>
Cc: Lijo Lazar <lijo.lazar@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Srinivasan Shanmugam and committed by
Alex Deucher
3034983d 70a62677

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
··· 701 701 mmhub_v1_8_inst_reset_ras_error_count(adev, i); 702 702 } 703 703 704 - static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = { 704 + static const u32 mmhub_v1_8_mmea_err_status_reg[] __maybe_unused = { 705 705 regMMEA0_ERR_STATUS, 706 706 regMMEA1_ERR_STATUS, 707 707 regMMEA2_ERR_STATUS,