[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d67ed65313f3a1579c1cf88348e8853c5cca4598.camel@perches.com>
Date: Fri, 13 Mar 2020 05:57:37 -0700
From: Joe Perches <joe@...ches.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
Alex Deucher <alexdeucher@...il.com>
Cc: Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/amd/powerplay: Move fallthrough; into containing
#ifdef/#endif
The automated conversion of /* fallthrough */ comments converted
a comment outside of an #ifdef/#endif case block that should be
inside the block.
Move the fallthrough inside the block to silence the warning.
Signed-off-by: Joe Perches <joe@...ches.com>
---
On Fri, 2020-03-13 at 20:57 +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the amdgpu tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> In file included from include/linux/compiler_types.h:59,
> from <command-line>:
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_request_link_speed_change_before_state_change':
> include/linux/compiler_attributes.h:200:41: warning: statement will never be executed [-Wswitch-unreachable]
> 200 | # define fallthrough __attribute__((__fallthrough__))
> | ^~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:3706:4: note: in expansion of macro 'fallthrough'
> 3706 | fallthrough;
> | ^~~~~~~~~~~
>
> Introduced by commit
>
> e86efa063cd1 ("AMD POWERPLAY: Use fallthrough;")
This is also one of the #ifdef/#endif pairs
where the fallthrough is outside of the #endif.
https://lore.kernel.org/lkml/cover.1584040050.git.joe@perches.com/
Here is a delta patch for this.
Let me know if another form is needed.
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index fc5236c..774048 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -3702,8 +3702,8 @@ static int smu7_request_link_speed_change_before_state_change(
case PP_PCIEGen2:
if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))
break;
-#endif
fallthrough;
+#endif
default:
data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);
break;
--
2.24.0
Powered by blists - more mailing lists