Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/amd/powerplay: Fix missing break in switch" failed to apply to 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 13, 2019

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 2f10d823739680d2477ce34437e8a08a53117f40 Mon Sep 17 00:00:00 2001
From: "Gustavo A. R. Silva" <[email protected]>
Date: Fri, 25 Jan 2019 15:55:33 -0600
Subject: [PATCH] drm/amd/powerplay: Fix missing break in switch

Add missing break statement in order to prevent the code from falling through to the default case.

The resoning for this is that pclk_vol_table is an automatic variable. So, it makes no sense to update it just before falling through to the default case and return -EINVAL.

This bug was found thanks to the ongoing efforts to enabling -Wimplicit-fallthrough.

Fixes cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch")
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +1 -0
index f95c5f50eb0f..5273de3c5b98 100644
@@ -1033,6 +1033,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,
 		break;
 	case amd_pp_dpp_clock:
 		pclk_vol_table = pinfo->vdd_dep_on_dppclk;
+		break;
 	default:
 		return -EINVAL;
 	}