* drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition
@ 2017-03-27 10:07 David Binderman
2017-03-29 22:09 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: David Binderman @ 2017-03-27 10:07 UTC (permalink / raw)
To: alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo,
airlied-cv59FeDIM0c, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Hello there,
linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true.
Source code is
} else if (rdev->family == CHIP_RV350 ||
rdev->family <= CHIP_RV380) {
Also in the same file:
[drivers/gpu/drm/radeon/r100.c:2550]: (style) Variable 'tmp' is assigned a value
that is never used.
[drivers/gpu/drm/radeon/r100.c:2875]: (style) Variable 'tmp' is assigned a value
that is never used.
Regards
David Binderman
_______________________________________________
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: drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition
@ 2017-03-29 22:09 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2017-03-29 22:09 UTC (permalink / raw)
To: David Binderman
Cc: alexander.deucher, christian.koenig, airlied, amd-gfx, dri-devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
On Mon, Mar 27, 2017 at 6:07 AM, David Binderman <dcb314@hotmail.com> wrote:
>
> Hello there,
>
> linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true.
>
> Source code is
>
> } else if (rdev->family == CHIP_RV350 ||
> rdev->family <= CHIP_RV380) {
>
Fixed in the attached patch.
> Also in the same file:
>
> [drivers/gpu/drm/radeon/r100.c:2550]: (style) Variable 'tmp' is assigned a value
> that is never used.
> [drivers/gpu/drm/radeon/r100.c:2875]: (style) Variable 'tmp' is assigned a value
> that is never used.
These are intended. The registers are read back to to post the previous write.
Alex
[-- Attachment #2: 0001-drm-radeon-fix-typo-in-bandwidth-calculation.patch --]
[-- Type: text/x-diff, Size: 1043 bytes --]
From bc02be56efa4c147622c69cfc2772b9a116ab5f9 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Wed, 29 Mar 2017 18:03:27 -0400
Subject: [PATCH] drm/radeon: fix typo in bandwidth calculation
The RV3xx settings were getting applied to all older asics
rather than just RV3xx.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/radeon/r100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index e339931..8344945 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3301,7 +3301,7 @@ void r100_bandwidth_update(struct radeon_device *rdev)
mem_trp = ((temp >> 8) & 0x7) + 1;
mem_tras = ((temp >> 11) & 0xf) + 4;
} else if (rdev->family == CHIP_RV350 ||
- rdev->family <= CHIP_RV380) {
+ rdev->family == CHIP_RV380) {
/* rv3x0 */
mem_trcd = (temp & 0x7) + 3;
mem_trp = ((temp >> 8) & 0x7) + 3;
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition
@ 2017-03-29 22:09 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2017-03-29 22:09 UTC (permalink / raw)
To: David Binderman
Cc: airlied-cv59FeDIM0c, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
On Mon, Mar 27, 2017 at 6:07 AM, David Binderman <dcb314-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:
>
> Hello there,
>
> linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true.
>
> Source code is
>
> } else if (rdev->family == CHIP_RV350 ||
> rdev->family <= CHIP_RV380) {
>
Fixed in the attached patch.
> Also in the same file:
>
> [drivers/gpu/drm/radeon/r100.c:2550]: (style) Variable 'tmp' is assigned a value
> that is never used.
> [drivers/gpu/drm/radeon/r100.c:2875]: (style) Variable 'tmp' is assigned a value
> that is never used.
These are intended. The registers are read back to to post the previous write.
Alex
[-- Attachment #2: 0001-drm-radeon-fix-typo-in-bandwidth-calculation.patch --]
[-- Type: text/x-diff, Size: 1043 bytes --]
From bc02be56efa4c147622c69cfc2772b9a116ab5f9 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Wed, 29 Mar 2017 18:03:27 -0400
Subject: [PATCH] drm/radeon: fix typo in bandwidth calculation
The RV3xx settings were getting applied to all older asics
rather than just RV3xx.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/radeon/r100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index e339931..8344945 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3301,7 +3301,7 @@ void r100_bandwidth_update(struct radeon_device *rdev)
mem_trp = ((temp >> 8) & 0x7) + 1;
mem_tras = ((temp >> 11) & 0xf) + 4;
} else if (rdev->family == CHIP_RV350 ||
- rdev->family <= CHIP_RV380) {
+ rdev->family == CHIP_RV380) {
/* rv3x0 */
mem_trcd = (temp & 0x7) + 3;
mem_trp = ((temp >> 8) & 0x7) + 3;
--
2.5.5
[-- Attachment #3: Type: text/plain, Size: 154 bytes --]
_______________________________________________
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
end of thread, other threads:[~2017-03-29 22:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 10:07 drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition David Binderman
2017-03-29 22:09 ` Alex Deucher
2017-03-29 22:09 ` 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.