[PATCH umr 03/17] Silence a warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function has a code path in which addr isn't set to a meaningful
value, but it is still written to the test log file. Write 0 instead of
garbage.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@xxxxxxx>
---
 src/lib/lowlevel/linux/read_gprwave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/lowlevel/linux/read_gprwave.c b/src/lib/lowlevel/linux/read_gprwave.c
index 86320f5..e861ee4 100644
--- a/src/lib/lowlevel/linux/read_gprwave.c
+++ b/src/lib/lowlevel/linux/read_gprwave.c
@@ -359,21 +359,21 @@ int umr_read_vgprs(struct umr_asic *asic, struct umr_wave_status *ws, uint32_t t
 			umr_grbm_select_index(asic, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
 		}
 		return 0;
 	}
 }
 
 int umr_get_wave_status(struct umr_asic *asic, unsigned se, unsigned sh, unsigned cu, unsigned simd, unsigned wave, struct umr_wave_status *ws)
 {
 	uint32_t buf[32];
 	int r;
-	uint64_t addr;
+	uint64_t addr = 0;
 	struct amdgpu_debugfs_gprwave_iocdata id;
 
 	memset(buf, 0, sizeof buf);
 
 	if (asic->fd.gprwave >= 0) {
 		memset(&id, 0, sizeof id);
 		id.gpr_or_wave = 0;
 		id.se = se;
 		id.sh = sh;
 		id.cu = cu;
-- 
2.40.0




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux