drm/amd/pm: remove dead code in navi10_emit_clk_levels and navi10_print_clk_levels
authorJesse Zhang <jesse.zhang@amd.com>
Mon, 3 Jun 2024 05:16:36 +0000 (13:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 19:34:20 +0000 (15:34 -0400)
Since the range of the varibable i is 0 - 3.
So execution cannot reach this statement: default.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c

index cf556f1b5ed1b38cb9307bdb8769c9d539c555ff..076620fa3ef5a8c86ce10cbbf8273b0727ec7044 100644 (file)
@@ -1389,8 +1389,6 @@ static int navi10_emit_clk_levels(struct smu_context *smu,
                        case 2:
                                curve_settings = &od_table->GfxclkFreq3;
                                break;
-                       default:
-                               break;
                        }
                        *offset += sysfs_emit_at(buf, *offset, "%d: %uMHz %umV\n",
                                                  i, curve_settings[0],
@@ -1594,8 +1592,6 @@ static int navi10_print_clk_levels(struct smu_context *smu,
                        case 2:
                                curve_settings = &od_table->GfxclkFreq3;
                                break;
-                       default:
-                               break;
                        }
                        size += sysfs_emit_at(buf, size, "%d: %uMHz %umV\n",
                                              i, curve_settings[0],