]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: Discard unnecessary breaks
authorZhang Qilong <zhangqilong3@huawei.com>
Mon, 26 Oct 2020 11:59:30 +0000 (19:59 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Oct 2020 17:35:31 +0000 (13:35 -0400)
The 'break' is unnecessary because of previous
'return', discard it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

index 8339c8c3a328f7ff9bef199664b3c801f0123a7c..fa817ebff9804863882f123a6ef6d7fcf67b0c0f 100644 (file)
@@ -499,10 +499,8 @@ int amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder)
                } else {
                        return ATOM_ENCODER_MODE_DVI;
                }
-               break;
        case DRM_MODE_CONNECTOR_LVDS:
                return ATOM_ENCODER_MODE_LVDS;
-               break;
        case DRM_MODE_CONNECTOR_DisplayPort:
                dig_connector = amdgpu_connector->con_priv;
                if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
@@ -519,20 +517,16 @@ int amdgpu_atombios_encoder_get_encoder_mode(struct drm_encoder *encoder)
                } else {
                        return ATOM_ENCODER_MODE_DVI;
                }
-               break;
        case DRM_MODE_CONNECTOR_eDP:
                return ATOM_ENCODER_MODE_DP;
        case DRM_MODE_CONNECTOR_DVIA:
        case DRM_MODE_CONNECTOR_VGA:
                return ATOM_ENCODER_MODE_CRT;
-               break;
        case DRM_MODE_CONNECTOR_Composite:
        case DRM_MODE_CONNECTOR_SVIDEO:
        case DRM_MODE_CONNECTOR_9PinDIN:
                /* fix me */
                return ATOM_ENCODER_MODE_TV;
-               /*return ATOM_ENCODER_MODE_CV;*/
-               break;
        }
 }
 
index 5963cbe0d455c23e98de71a498d1748a0b83992d..34448df0ccf34f90dd1db22df54bc1bb1db20fac 100644 (file)
@@ -2202,22 +2202,18 @@ static int dce_v10_0_pick_dig_encoder(struct drm_encoder *encoder)
                        return 1;
                else
                        return 0;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
                if (dig->linkb)
                        return 3;
                else
                        return 2;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
                if (dig->linkb)
                        return 5;
                else
                        return 4;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
                return 6;
-               break;
        default:
                DRM_ERROR("invalid encoder_id: 0x%x\n", amdgpu_encoder->encoder_id);
                return 0;
index 1954472c8e8f678452d1cdef0d254373dea80ad6..eb16f75292237d1abd15d185bb47578dc65feec5 100644 (file)
@@ -2235,22 +2235,18 @@ static int dce_v11_0_pick_dig_encoder(struct drm_encoder *encoder)
                        return 1;
                else
                        return 0;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
                if (dig->linkb)
                        return 3;
                else
                        return 2;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
                if (dig->linkb)
                        return 5;
                else
                        return 4;
-               break;
        case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
                return 6;
-               break;
        default:
                DRM_ERROR("invalid encoder_id: 0x%x\n", amdgpu_encoder->encoder_id);
                return 0;
@@ -2304,19 +2300,16 @@ static u32 dce_v11_0_pick_pll(struct drm_crtc *crtc)
                                return ATOM_COMBOPHY_PLL1;
                        else
                                return ATOM_COMBOPHY_PLL0;
-                       break;
                case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
                        if (dig->linkb)
                                return ATOM_COMBOPHY_PLL3;
                        else
                                return ATOM_COMBOPHY_PLL2;
-                       break;
                case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
                        if (dig->linkb)
                                return ATOM_COMBOPHY_PLL5;
                        else
                                return ATOM_COMBOPHY_PLL4;
-                       break;
                default:
                        DRM_ERROR("invalid encoder_id: 0x%x\n", amdgpu_encoder->encoder_id);
                        return ATOM_PPLL_INVALID;