<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Tom St Denis <tom.stdenis@amd.com><br>
<b>Sent:</b> Wednesday, July 22, 2020 7:40 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> StDenis, Tom <Tom.StDenis@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/amdgpu: Fix compiler warning in df driver</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Fix this warning:<br>
<br>
CC [M] drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.o<br>
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29,<br>
from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26,<br>
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43,<br>
from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23:<br>
drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function ‘df_v3_6_pmc_get_count’:<br>
./include/drm/drm_print.h:487:2: warning: ‘hi_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>
487 | __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)<br>
| ^~~~~~~~~<br>
drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:25: note: ‘hi_base_addr’ was declared here<br>
649 | uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;<br>
| ^~~~~~~~~~~~<br>
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29,<br>
from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26,<br>
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43,<br>
from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23:<br>
./include/drm/drm_print.h:487:2: warning: ‘lo_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>
487 | __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)<br>
| ^~~~~~~~~<br>
drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:11: note: ‘lo_base_addr’ was declared here<br>
649 | uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;<br>
<br>
Signed-off-by: Tom St Denis <tom.stdenis@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c<br>
index 1ab261836983..0aa1ac1accd6 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c<br>
@@ -646,7 +646,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,<br>
uint64_t config,<br>
uint64_t *count)<br>
{<br>
- uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0;<br>
+ uint32_t lo_base_addr = 0, hi_base_addr = 0, lo_val = 0, hi_val = 0;<br>
*count = 0;<br>
<br>
switch (adev->asic_type) {<br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C95d3961b50a743867b6c08d82e340fe9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637310148439516686&sdata=mkDp4Wqa3ZSS9T1Tr%2B0HvNhb0Il2RhD4RZ6WT%2BDXL9M%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C95d3961b50a743867b6c08d82e340fe9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637310148439516686&sdata=mkDp4Wqa3ZSS9T1Tr%2B0HvNhb0Il2RhD4RZ6WT%2BDXL9M%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>