All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr
@ 2019-02-18 22:35 Alex Deucher
       [not found] ` <20190218223546.12581-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2019-02-18 22:35 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

This was noticed by Gustavo and his -Wimplicit-fallthrough
patches.  However, in this case, I believe we should have breaks
rather than falling though, that said, in practice we should
never fall through in the first place so there should be no
change in behavior.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
index 52abca065764..2d4cfe14f72e 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
@@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
 		case DRAM_LOG_BUFF_SIZE:
 			return offsetof(SMU74_SoftRegisters, DRAM_LOG_BUFF_SIZE);
 		}
+		break;
 	case SMU_Discrete_DpmTable:
 		switch (member) {
 		case UvdBootLevel:
@@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
 		case LowSclkInterruptThreshold:
 			return offsetof(SMU74_Discrete_DpmTable, LowSclkInterruptThreshold);
 		}
+		break;
 	}
 	pr_warn("can't get the offset of type %x member %x\n", type, member);
 	return 0;
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr
       [not found] ` <20190218223546.12581-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-21  3:01   ` Alex Deucher
       [not found]     ` <CADnq5_NqCJExqxhxPFLnX+PniE0hjHHOSEkJdReSi7Sm8XSKGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2019-02-21  3:01 UTC (permalink / raw)
  To: amd-gfx list; +Cc: Alex Deucher

Ping?

Alex

On Mon, Feb 18, 2019 at 5:35 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> This was noticed by Gustavo and his -Wimplicit-fallthrough
> patches.  However, in this case, I believe we should have breaks
> rather than falling though, that said, in practice we should
> never fall through in the first place so there should be no
> change in behavior.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> index 52abca065764..2d4cfe14f72e 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> @@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
>                 case DRAM_LOG_BUFF_SIZE:
>                         return offsetof(SMU74_SoftRegisters, DRAM_LOG_BUFF_SIZE);
>                 }
> +               break;
>         case SMU_Discrete_DpmTable:
>                 switch (member) {
>                 case UvdBootLevel:
> @@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t type, uint32_t member)
>                 case LowSclkInterruptThreshold:
>                         return offsetof(SMU74_Discrete_DpmTable, LowSclkInterruptThreshold);
>                 }
> +               break;
>         }
>         pr_warn("can't get the offset of type %x member %x\n", type, member);
>         return 0;
> --
> 2.20.1
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr
       [not found]     ` <CADnq5_NqCJExqxhxPFLnX+PniE0hjHHOSEkJdReSi7Sm8XSKGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-02-21  3:04       ` Quan, Evan
  0 siblings, 0 replies; 3+ messages in thread
From: Quan, Evan @ 2019-02-21  3:04 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx list; +Cc: Deucher, Alexander

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: 2019年2月21日 11:01
> To: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH] drm/amdgpu/powerplay: add missing breaks in
> polaris10_smumgr
> 
> Ping?
> 
> Alex
> 
> On Mon, Feb 18, 2019 at 5:35 PM Alex Deucher <alexdeucher@gmail.com>
> wrote:
> >
> > This was noticed by Gustavo and his -Wimplicit-fallthrough patches.
> > However, in this case, I believe we should have breaks rather than
> > falling though, that said, in practice we should never fall through in
> > the first place so there should be no change in behavior.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> >  drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> > b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> > index 52abca065764..2d4cfe14f72e 100644
> > --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> > +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
> > @@ -2330,6 +2330,7 @@ static uint32_t polaris10_get_offsetof(uint32_t
> type, uint32_t member)
> >                 case DRAM_LOG_BUFF_SIZE:
> >                         return offsetof(SMU74_SoftRegisters,
> DRAM_LOG_BUFF_SIZE);
> >                 }
> > +               break;
> >         case SMU_Discrete_DpmTable:
> >                 switch (member) {
> >                 case UvdBootLevel:
> > @@ -2339,6 +2340,7 @@ static uint32_t polaris10_get_offsetof(uint32_t
> type, uint32_t member)
> >                 case LowSclkInterruptThreshold:
> >                         return offsetof(SMU74_Discrete_DpmTable,
> LowSclkInterruptThreshold);
> >                 }
> > +               break;
> >         }
> >         pr_warn("can't get the offset of type %x member %x\n", type,
> member);
> >         return 0;
> > --
> > 2.20.1
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-21  3:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 22:35 [PATCH] drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr Alex Deucher
     [not found] ` <20190218223546.12581-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-02-21  3:01   ` Alex Deucher
     [not found]     ` <CADnq5_NqCJExqxhxPFLnX+PniE0hjHHOSEkJdReSi7Sm8XSKGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-02-21  3:04       ` Quan, Evan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.