* [PATCH v4.4-rc8] radeon: r100: Silence 'may be used uninitialized' warnings
@ 2016-01-07 17:31 tim.gardner
2016-01-08 17:21 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: tim.gardner @ 2016-01-07 17:31 UTC (permalink / raw)
To: dri-devel, linux-kernel
Cc: Tim Gardner, Alex Deucher, Christian König, David Airlie
From: Tim Gardner <tim.gardner@canonical.com>
CC [M] drivers/gpu/drm/radeon/r100.o
In file included from drivers/gpu/drm/radeon/radeon_mode.h:37:0,
from drivers/gpu/drm/radeon/radeon.h:80,
from drivers/gpu/drm/radeon/r100.c:33:
drivers/gpu/drm/radeon/r100.c: In function 'r100_bandwidth_update':
include/drm/drm_fixed.h:64:13: warning: 'crit_point_ff.full' may be used uninitialized in this function [-Wmaybe-uninitialized]
u64 tmp = ((u64)A.full << 13);
^
drivers/gpu/drm/radeon/r100.c:3153:63: note: 'crit_point_ff.full' was declared here
fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
^
drivers/gpu/drm/radeon/r100.c:3583:42: warning: 'disp_drain_rate.full' may be used uninitialized in this function [-Wmaybe-uninitialized]
temp_ff.full = read_return_rate.full - disp_drain_rate.full;
gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
I think this warning is bogus, but I don't know how else to make gcc shut up.
drivers/gpu/drm/radeon/r100.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 9e7e2bf..5eae0a8 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3150,7 +3150,8 @@ void r100_bandwidth_update(struct radeon_device *rdev)
{
fixed20_12 trcd_ff, trp_ff, tras_ff, trbs_ff, tcas_ff;
fixed20_12 sclk_ff, mclk_ff, sclk_eff_ff, sclk_delay_ff;
- fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
+ fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff;
+ fixed20_12 crit_point_ff = {0};
uint32_t temp, data, mem_trcd, mem_trp, mem_tras;
fixed20_12 memtcas_ff[8] = {
dfixed_init(1),
@@ -3204,7 +3205,7 @@ void r100_bandwidth_update(struct radeon_device *rdev)
fixed20_12 min_mem_eff;
fixed20_12 mc_latency_sclk, mc_latency_mclk, k1;
fixed20_12 cur_latency_mclk, cur_latency_sclk;
- fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate,
+ fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate = {0},
disp_drain_rate2, read_return_rate;
fixed20_12 time_disp1_drop_priority;
int c;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v4.4-rc8] radeon: r100: Silence 'may be used uninitialized' warnings
2016-01-07 17:31 [PATCH v4.4-rc8] radeon: r100: Silence 'may be used uninitialized' warnings tim.gardner
@ 2016-01-08 17:21 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2016-01-08 17:21 UTC (permalink / raw)
To: Tim Gardner
Cc: Maling list - DRI developers, LKML, Alex Deucher, Christian König
On Thu, Jan 7, 2016 at 12:31 PM, <tim.gardner@canonical.com> wrote:
> From: Tim Gardner <tim.gardner@canonical.com>
>
> CC [M] drivers/gpu/drm/radeon/r100.o
> In file included from drivers/gpu/drm/radeon/radeon_mode.h:37:0,
> from drivers/gpu/drm/radeon/radeon.h:80,
> from drivers/gpu/drm/radeon/r100.c:33:
> drivers/gpu/drm/radeon/r100.c: In function 'r100_bandwidth_update':
> include/drm/drm_fixed.h:64:13: warning: 'crit_point_ff.full' may be used uninitialized in this function [-Wmaybe-uninitialized]
> u64 tmp = ((u64)A.full << 13);
> ^
> drivers/gpu/drm/radeon/r100.c:3153:63: note: 'crit_point_ff.full' was declared here
> fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
> ^
> drivers/gpu/drm/radeon/r100.c:3583:42: warning: 'disp_drain_rate.full' may be used uninitialized in this function [-Wmaybe-uninitialized]
> temp_ff.full = read_return_rate.full - disp_drain_rate.full;
>
> gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>
> I think this warning is bogus, but I don't know how else to make gcc shut up.
It's definitely bogus. It just showed up in a new version of gcc. Applied.
Thanks.
Alex
>
> drivers/gpu/drm/radeon/r100.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
> index 9e7e2bf..5eae0a8 100644
> --- a/drivers/gpu/drm/radeon/r100.c
> +++ b/drivers/gpu/drm/radeon/r100.c
> @@ -3150,7 +3150,8 @@ void r100_bandwidth_update(struct radeon_device *rdev)
> {
> fixed20_12 trcd_ff, trp_ff, tras_ff, trbs_ff, tcas_ff;
> fixed20_12 sclk_ff, mclk_ff, sclk_eff_ff, sclk_delay_ff;
> - fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
> + fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff;
> + fixed20_12 crit_point_ff = {0};
> uint32_t temp, data, mem_trcd, mem_trp, mem_tras;
> fixed20_12 memtcas_ff[8] = {
> dfixed_init(1),
> @@ -3204,7 +3205,7 @@ void r100_bandwidth_update(struct radeon_device *rdev)
> fixed20_12 min_mem_eff;
> fixed20_12 mc_latency_sclk, mc_latency_mclk, k1;
> fixed20_12 cur_latency_mclk, cur_latency_sclk;
> - fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate,
> + fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate = {0},
> disp_drain_rate2, read_return_rate;
> fixed20_12 time_disp1_drop_priority;
> int c;
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-08 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 17:31 [PATCH v4.4-rc8] radeon: r100: Silence 'may be used uninitialized' warnings tim.gardner
2016-01-08 17:21 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®