summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-03-12 14:46:48 -0700
committerAlex Deucher <alexander.deucher@amd.com>2026-03-17 10:37:55 -0400
commiteb422f3bbdff4ef870b855b7252e60bb591ed85f (patch)
tree233a770640439f8df3b25fae7444917f84484581 /tools/perf/scripts/python
parenta0b2afa4c364499a43a58a007ba287e006b55521 (diff)
drm/amdgpu/discovery: Add braces to case statements in amdgpu_discovery_table_check()
When building with a version of clang that supports the narrower '-fms-anonymous-structs' (as opposed to the wider '-fms-extensions') along with the associated kernel support (such as in next-20260312 [1]), there are warnings (or errors with CONFIG_WERROR=y / W=e) from the switch statement added by commit 47ab777c16c7 ("drm/amdgpu/discovery: use common function to check discovery table"). drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:560:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 560 | struct ip_discovery_header *ihdr = | ^ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:568:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 568 | struct gpu_info_header *ghdr = | ^ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:576:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 576 | struct harvest_info_header *hhdr = | ^ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:584:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 584 | struct vcn_info_header *vhdr = | ^ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:592:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions] 592 | struct mall_info_header *mhdr = | ^ If '-fms-extensions' were not present, this would be a hard error in older clang versions. Add braces to the case statements that declare variables to clear up the warnings. Fixes: 47ab777c16c7 ("drm/amdgpu/discovery: use common function to check discovery table") Link: https://git.kernel.org/next/linux-next/c/0d3fccf68d9873a3c824fb70be0dbb2c4642aa90 [1] Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions