From: Alex Deucher <alexdeucher@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amd/powerplay: Move fallthrough; into containing #ifdef/#endif
Date: Fri, 13 Mar 2020 10:22:45 -0400 [thread overview]
Message-ID: <CADnq5_MEFu+6Hgp4jZQJpskHbZmK=UiKtSJrdB92_NYZyyjtAg@mail.gmail.com> (raw)
In-Reply-To: <d67ed65313f3a1579c1cf88348e8853c5cca4598.camel@perches.com>
On Fri, Mar 13, 2020 at 8:59 AM Joe Perches <joe@perches.com> wrote:
>
> 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@perches.com>
Applied. Thanks!
Alex
> ---
>
> 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
>
>
prev parent reply other threads:[~2020-03-13 14:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 9:57 linux-next: build warning after merge of the amdgpu tree Stephen Rothwell
2020-03-13 12:57 ` [PATCH] drm/amd/powerplay: Move fallthrough; into containing #ifdef/#endif Joe Perches
2020-03-13 14:22 ` Alex Deucher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADnq5_MEFu+6Hgp4jZQJpskHbZmK=UiKtSJrdB92_NYZyyjtAg@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).