* [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings
@ 2017-01-10 5:52 Julia Lawall
2017-01-10 9:29 ` Christian König
2017-01-10 9:38 ` Yu, Xiangliang
0 siblings, 2 replies; 4+ messages in thread
From: Julia Lawall @ 2017-01-10 5:52 UTC (permalink / raw)
To: Xiangliang Yu
Cc: Tom St Denis, dri-devel, Eric Huang, kbuild-all, Alex Deucher,
Flora Cui, Rex Zhu, Christian König, Monk Liu
Use BUG_ON instead of a if condition followed by BUG.
Generated by: scripts/coccinelle/misc/bugon.cocci
CC: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
gfx_v8_0.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -6623,8 +6623,7 @@ static void gfx_v8_0_ring_emit_fence_kiq
u64 seq, unsigned int flags)
{
/* we only allocate 32bit for each seq wb address */
- if (flags & AMDGPU_FENCE_FLAG_64BIT)
- BUG();
+ BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
/* write fence seq to the "addr" */
amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings
2017-01-10 5:52 [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings Julia Lawall
@ 2017-01-10 9:29 ` Christian König
2017-01-10 9:38 ` Yu, Xiangliang
1 sibling, 0 replies; 4+ messages in thread
From: Christian König @ 2017-01-10 9:29 UTC (permalink / raw)
To: Julia Lawall, Xiangliang Yu
Cc: Tom St Denis, dri-devel, Eric Huang, kbuild-all, Alex Deucher,
Flora Cui, Rex Zhu, Monk Liu
Am 10.01.2017 um 06:52 schrieb Julia Lawall:
> Use BUG_ON instead of a if condition followed by BUG.
>
> Generated by: scripts/coccinelle/misc/bugon.cocci
>
> CC: Xiangliang Yu <Xiangliang.Yu@amd.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>.
> ---
>
> gfx_v8_0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -6623,8 +6623,7 @@ static void gfx_v8_0_ring_emit_fence_kiq
> u64 seq, unsigned int flags)
> {
> /* we only allocate 32bit for each seq wb address */
> - if (flags & AMDGPU_FENCE_FLAG_64BIT)
> - BUG();
> + BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
>
> /* write fence seq to the "addr" */
> amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings
2017-01-10 5:52 [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings Julia Lawall
2017-01-10 9:29 ` Christian König
@ 2017-01-10 9:38 ` Yu, Xiangliang
2017-01-12 14:39 ` Alex Deucher
1 sibling, 1 reply; 4+ messages in thread
From: Yu, Xiangliang @ 2017-01-10 9:38 UTC (permalink / raw)
To: Julia Lawall
Cc: StDenis, Tom, dri-devel, Huang, JinHuiEric, kbuild-all, Deucher,
Alexander, Cui, Flora, Zhu, Rex, Koenig, Christian, Liu, Monk
> Use BUG_ON instead of a if condition followed by BUG.
>
> Generated by: scripts/coccinelle/misc/bugon.cocci
>
> CC: Xiangliang Yu <Xiangliang.Yu@amd.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> gfx_v8_0.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -6623,8 +6623,7 @@ static void gfx_v8_0_ring_emit_fence_kiq
> u64 seq, unsigned int flags)
> {
> /* we only allocate 32bit for each seq wb address */
> - if (flags & AMDGPU_FENCE_FLAG_64BIT)
> - BUG();
> + BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
>
> /* write fence seq to the "addr" */
> amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
Reviewd-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings
2017-01-10 9:38 ` Yu, Xiangliang
@ 2017-01-12 14:39 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2017-01-12 14:39 UTC (permalink / raw)
To: Yu, Xiangliang
Cc: StDenis, Tom, dri-devel, Julia Lawall, kbuild-all, Huang,
JinHuiEric, Deucher, Alexander, Cui, Flora, Zhu, Rex, Koenig,
Christian, Liu, Monk
On Tue, Jan 10, 2017 at 4:38 AM, Yu, Xiangliang <Xiangliang.Yu@amd.com> wrote:
>> Use BUG_ON instead of a if condition followed by BUG.
>>
>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>
>> CC: Xiangliang Yu <Xiangliang.Yu@amd.com>
>> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Applied. thanks!
Alex
>> ---
>>
>> gfx_v8_0.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
>> @@ -6623,8 +6623,7 @@ static void gfx_v8_0_ring_emit_fence_kiq
>> u64 seq, unsigned int flags)
>> {
>> /* we only allocate 32bit for each seq wb address */
>> - if (flags & AMDGPU_FENCE_FLAG_64BIT)
>> - BUG();
>> + BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
>>
>> /* write fence seq to the "addr" */
>> amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
>
> Reviewd-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-12 14:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 5:52 [PATCH] drm/amdgpu/gfx8: fix bugon.cocci warnings Julia Lawall
2017-01-10 9:29 ` Christian König
2017-01-10 9:38 ` Yu, Xiangliang
2017-01-12 14:39 ` Alex Deucher
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.