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

drm/amd: Mark IP_BASE definition as __maybe_unused

Silences 166 compile-time warnings like:

warning: 'UVD0_BASE' defined but not used [-Wunused-const-variable=]
129 | static const struct IP_BASE UVD0_BASE ={ { { { 0x00007800, 0x00007E00, 0, 0, 0 } },
| ^~~~~~~~~
warning: 'UMC0_BASE' defined but not used [-Wunused-const-variable=]
123 | static const struct IP_BASE UMC0_BASE ={ { { { 0x00014000, 0, 0, 0, 0 } },
| ^~~~~~~~~

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Isabella Basso and committed by
Alex Deucher
0e2a82a3 85a774d9

+7 -7
+5 -5
drivers/gpu/drm/amd/include/cyan_skillfish_ip_offset.h
··· 25 25 #define MAX_SEGMENT 5 26 26 27 27 28 - struct IP_BASE_INSTANCE 28 + struct IP_BASE_INSTANCE 29 29 { 30 30 unsigned int segment[MAX_SEGMENT]; 31 - }; 32 - 33 - struct IP_BASE 31 + } __maybe_unused; 32 + 33 + struct IP_BASE 34 34 { 35 35 struct IP_BASE_INSTANCE instance[MAX_INSTANCE]; 36 - }; 36 + } __maybe_unused; 37 37 38 38 39 39 static const struct IP_BASE ATHUB_BASE ={ { { { 0x00000C00, 0, 0, 0, 0 } },
+2 -2
drivers/gpu/drm/amd/include/yellow_carp_offset.h
··· 9 9 struct IP_BASE_INSTANCE 10 10 { 11 11 unsigned int segment[MAX_SEGMENT]; 12 - }; 12 + } __maybe_unused; 13 13 14 14 struct IP_BASE 15 15 { 16 16 struct IP_BASE_INSTANCE instance[MAX_INSTANCE]; 17 - }; 17 + } __maybe_unused; 18 18 19 19 20 20 static const struct IP_BASE ACP_BASE = { { { { 0x02403800, 0x00480000, 0, 0, 0, 0 } },