* [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
@ 2019-07-21 22:59 ` Gustavo A. R. Silva
0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-21 22:59 UTC (permalink / raw)
To: Philip Cox, Oded Gabbay, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter
Cc: dri-devel, amd-gfx, linux-kernel, Gustavo A. R. Silva
Add missing break statement in order to prevent the code from falling
through to case KFD_MQD_TYPE_COMPUTE.
This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.
Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
index 4f8a6ffc5775..1d8b13ad46f9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
switch (type) {
case KFD_MQD_TYPE_CP:
pr_debug("%s@%i\n", __func__, __LINE__);
+ break;
case KFD_MQD_TYPE_COMPUTE:
pr_debug("%s@%i\n", __func__, __LINE__);
mqd->allocate_mqd = allocate_mqd;
--
2.22.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
@ 2019-07-21 22:59 ` Gustavo A. R. Silva
0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-21 22:59 UTC (permalink / raw)
To: Philip Cox, Oded Gabbay, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter
Cc: Gustavo A. R. Silva, amd-gfx, dri-devel, linux-kernel
Add missing break statement in order to prevent the code from falling
through to case KFD_MQD_TYPE_COMPUTE.
This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.
Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
index 4f8a6ffc5775..1d8b13ad46f9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
switch (type) {
case KFD_MQD_TYPE_CP:
pr_debug("%s@%i\n", __func__, __LINE__);
+ break;
case KFD_MQD_TYPE_COMPUTE:
pr_debug("%s@%i\n", __func__, __LINE__);
mqd->allocate_mqd = allocate_mqd;
--
2.22.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
2019-07-21 22:59 ` Gustavo A. R. Silva
@ 2019-07-22 15:14 ` Liu, Shaoyun
-1 siblings, 0 replies; 7+ messages in thread
From: Liu, Shaoyun @ 2019-07-22 15:14 UTC (permalink / raw)
To: Gustavo A. R. Silva, Cox, Philip, Oded Gabbay, Deucher,
Alexander, Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: amd-gfx, dri-devel, linux-kernel
This one properly in purpose , The mqd init for CP and COMPUTE will
have the same routine .
Regard
sshaoyun.liu
On 2019-07-21 6:59 p.m., Gustavo A. R. Silva wrote:
> Add missing break statement in order to prevent the code from falling
> through to case KFD_MQD_TYPE_COMPUTE.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> index 4f8a6ffc5775..1d8b13ad46f9 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> @@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
> switch (type) {
> case KFD_MQD_TYPE_CP:
> pr_debug("%s@%i\n", __func__, __LINE__);
> + break;
> case KFD_MQD_TYPE_COMPUTE:
> pr_debug("%s@%i\n", __func__, __LINE__);
> mqd->allocate_mqd = allocate_mqd;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
@ 2019-07-22 15:14 ` Liu, Shaoyun
0 siblings, 0 replies; 7+ messages in thread
From: Liu, Shaoyun @ 2019-07-22 15:14 UTC (permalink / raw)
To: Gustavo A. R. Silva, Cox, Philip, Oded Gabbay, Deucher,
Alexander, Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
This one properly in purpose , The mqd init for CP and COMPUTE will
have the same routine .
Regard
sshaoyun.liu
On 2019-07-21 6:59 p.m., Gustavo A. R. Silva wrote:
> Add missing break statement in order to prevent the code from falling
> through to case KFD_MQD_TYPE_COMPUTE.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> index 4f8a6ffc5775..1d8b13ad46f9 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> @@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
> switch (type) {
> case KFD_MQD_TYPE_CP:
> pr_debug("%s@%i\n", __func__, __LINE__);
> + break;
> case KFD_MQD_TYPE_COMPUTE:
> pr_debug("%s@%i\n", __func__, __LINE__);
> mqd->allocate_mqd = allocate_mqd;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
[not found] ` <c735a1cc-a545-50fb-44e7-c0ad93ee8ee7-5C7GfCeVMHo@public.gmane.org>
@ 2019-07-22 15:58 ` Deucher, Alexander
2019-07-22 16:13 ` Gustavo A. R. Silva
0 siblings, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2019-07-22 15:58 UTC (permalink / raw)
To: Liu, Shaoyun, Gustavo A. R. Silva, Cox, Philip, Oded Gabbay,
Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 2434 bytes --]
We need to add a /*fall through */ comment then.
Alex
________________________________
From: Liu, Shaoyun <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
Sent: Monday, July 22, 2019 11:14 AM
To: Gustavo A. R. Silva <gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>; Cox, Philip <Philip.Cox@amd.com>; Oded Gabbay <oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>; Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>; Koenig, Christian <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>; Zhou, David(ChunMing) <David1.Zhou-5C7GfCeVMHo@public.gmane.org>; David Airlie <airlied-cv59FeDIM0c@public.gmane.org>; Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; dri-devel@lists.freedesktop.org <dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; linux-kernel@vger.kernel.org <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
This one properly in purpose , The mqd init for CP and COMPUTE will
have the same routine .
Regard
sshaoyun.liu
On 2019-07-21 6:59 p.m., Gustavo A. R. Silva wrote:
> Add missing break statement in order to prevent the code from falling
> through to case KFD_MQD_TYPE_COMPUTE.
>
> This bug was found thanks to the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Gustavo A. R. Silva <gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> index 4f8a6ffc5775..1d8b13ad46f9 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
> @@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
> switch (type) {
> case KFD_MQD_TYPE_CP:
> pr_debug("%s@%i\n", __func__, __LINE__);
> + break;
> case KFD_MQD_TYPE_COMPUTE:
> pr_debug("%s@%i\n", __func__, __LINE__);
> mqd->allocate_mqd = allocate_mqd;
[-- Attachment #1.2: Type: text/html, Size: 4216 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
2019-07-22 15:58 ` Deucher, Alexander
@ 2019-07-22 16:13 ` Gustavo A. R. Silva
2019-07-22 17:43 ` Liu, Shaoyun
0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-22 16:13 UTC (permalink / raw)
To: Deucher, Alexander, Liu, Shaoyun, Cox, Philip, Oded Gabbay,
Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: amd-gfx, dri-devel, linux-kernel
On 7/22/19 10:58 AM, Deucher, Alexander wrote:
> We need to add a /*fall through */ comment then.
>
It might be better to remove the call to pr_debug() in KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_CP:
case KFD_MQD_TYPE_COMPUTE:
pr_debug("%s@%i\n", __func__, __LINE__);
mqd->allocate_mqd = allocate_mqd;
Thanks
--
Gustavo
> Alex
> ________________________________
> From: Liu, Shaoyun <Shaoyun.Liu@amd.com>
> Sent: Monday, July 22, 2019 11:14 AM
> To: Gustavo A. R. Silva <gustavo@embeddedor.com>; Cox, Philip <Philip.Cox@amd.com>; Oded Gabbay <oded.gabbay@gmail.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
>
> This one properly in purpose , The mqd init for CP and COMPUTE will
> have the same routine .
>
> Regard
>
> sshaoyun.liu
>
> On 2019-07-21 6:59 p.m., Gustavo A. R. Silva wrote:
>> Add missing break statement in order to prevent the code from falling
>> through to case KFD_MQD_TYPE_COMPUTE.
>>
>> This bug was found thanks to the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>> index 4f8a6ffc5775..1d8b13ad46f9 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>> @@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
>> switch (type) {
>> case KFD_MQD_TYPE_CP:
>> pr_debug("%s@%i\n", __func__, __LINE__);
>> + break;
>> case KFD_MQD_TYPE_COMPUTE:
>> pr_debug("%s@%i\n", __func__, __LINE__);
>> mqd->allocate_mqd = allocate_mqd;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
2019-07-22 16:13 ` Gustavo A. R. Silva
@ 2019-07-22 17:43 ` Liu, Shaoyun
0 siblings, 0 replies; 7+ messages in thread
From: Liu, Shaoyun @ 2019-07-22 17:43 UTC (permalink / raw)
To: Gustavo A. R. Silva, Deucher, Alexander, Cox, Philip,
Oded Gabbay, Koenig, Christian, Zhou, David(ChunMing),
David Airlie, Daniel Vetter
Cc: amd-gfx, dri-devel, linux-kernel
That sounds good to me .
Regards
shaoyun.liu
On 2019-07-22 12:13 p.m., Gustavo A. R. Silva wrote:
>
> On 7/22/19 10:58 AM, Deucher, Alexander wrote:
>> We need to add a /*fall through */ comment then.
>>
> It might be better to remove the call to pr_debug() in KFD_MQD_TYPE_CP:
>
> case KFD_MQD_TYPE_CP:
> case KFD_MQD_TYPE_COMPUTE:
> pr_debug("%s@%i\n", __func__, __LINE__);
> mqd->allocate_mqd = allocate_mqd;
>
> Thanks
> --
> Gustavo
>
>
>> Alex
>> ________________________________
>> From: Liu, Shaoyun <Shaoyun.Liu@amd.com>
>> Sent: Monday, July 22, 2019 11:14 AM
>> To: Gustavo A. R. Silva <gustavo@embeddedor.com>; Cox, Philip <Philip.Cox@amd.com>; Oded Gabbay <oded.gabbay@gmail.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>
>> Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
>> Subject: Re: [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement
>>
>> This one properly in purpose , The mqd init for CP and COMPUTE will
>> have the same routine .
>>
>> Regard
>>
>> sshaoyun.liu
>>
>> On 2019-07-21 6:59 p.m., Gustavo A. R. Silva wrote:
>>> Add missing break statement in order to prevent the code from falling
>>> through to case KFD_MQD_TYPE_COMPUTE.
>>>
>>> This bug was found thanks to the ongoing efforts to enable
>>> -Wimplicit-fallthrough.
>>>
>>> Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
>>> Cc: stable@vger.kernel.org
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> ---
>>> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>>> index 4f8a6ffc5775..1d8b13ad46f9 100644
>>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
>>> @@ -430,6 +430,7 @@ struct mqd_manager *mqd_manager_init_v10(enum KFD_MQD_TYPE type,
>>> switch (type) {
>>> case KFD_MQD_TYPE_CP:
>>> pr_debug("%s@%i\n", __func__, __LINE__);
>>> + break;
>>> case KFD_MQD_TYPE_COMPUTE:
>>> pr_debug("%s@%i\n", __func__, __LINE__);
>>> mqd->allocate_mqd = allocate_mqd;
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-22 17:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-21 22:59 [PATCH] drm/amdkfd/kfd_mqd_manager_v10: Fix missing break in switch statement Gustavo A. R. Silva
2019-07-21 22:59 ` Gustavo A. R. Silva
2019-07-22 15:14 ` Liu, Shaoyun
2019-07-22 15:14 ` Liu, Shaoyun
[not found] ` <c735a1cc-a545-50fb-44e7-c0ad93ee8ee7-5C7GfCeVMHo@public.gmane.org>
2019-07-22 15:58 ` Deucher, Alexander
2019-07-22 16:13 ` Gustavo A. R. Silva
2019-07-22 17:43 ` Liu, Shaoyun
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.