From: Ernst Sjöstrand Date: Sun, 19 Nov 2017 17:52:42 +0000 (+0100) Subject: drm/amd/powerplay: Minor fixes in processpptables.c (v2) X-Git-Tag: v4.19~1610^2~33^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19fef71cd1f4928b958913bfee38662471f04faf;p=platform%2Fkernel%2Flinux-rpi3.git drm/amd/powerplay: Minor fixes in processpptables.c (v2) Reported by smatch: init_overdrive_limits() error: uninitialized symbol 'result'. get_clock_voltage_dependency_table() warn: inconsistent indenting v2: set result to 0 (Alex) Reviewed-by: Alex Deucher Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c index afae32e..c3e7e34 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c @@ -394,8 +394,8 @@ static int get_clock_voltage_dependency_table(struct pp_hwmgr *hwmgr, dep_table->entries[i].clk = ((unsigned long)table->entries[i].ucClockHigh << 16) | le16_to_cpu(table->entries[i].usClockLow); - dep_table->entries[i].v = - (unsigned long)le16_to_cpu(table->entries[i].usVoltage); + dep_table->entries[i].v = + (unsigned long)le16_to_cpu(table->entries[i].usVoltage); } *ptable = dep_table; @@ -1042,7 +1042,7 @@ static int init_overdrive_limits_V2_1(struct pp_hwmgr *hwmgr, static int init_overdrive_limits(struct pp_hwmgr *hwmgr, const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table) { - int result; + int result = 0; uint8_t frev, crev; uint16_t size;