Hmm, my compiler didn't sent a warning about this... Thanks. Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@xxxxxxx> Andrey On 8/26/19 2:54 PM, Alex Deucher wrote: > make sure reg is initialized in smu_v11_0_i2c_set_clock_gating. > > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c > index 4cfcef0feff8..7d0d4c57b315 100644 > --- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c > +++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c > @@ -50,7 +50,7 @@ > static void smu_v11_0_i2c_set_clock_gating(struct i2c_adapter *control, bool en) > { > struct amdgpu_device *adev = to_amdgpu_device(control); > - uint32_t reg; > + uint32_t reg = RREG32_SOC15(SMUIO, 0, mmSMUIO_PWRMGT); > > reg = REG_SET_FIELD(reg, SMUIO_PWRMGT, i2c_clk_gate_en, en ? 1 : 0); > WREG32_SOC15(SMUIO, 0, mmSMUIO_PWRMGT, reg); _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx