Commit a44d090
cpufreq: intel_pstate: Rearrange show_no_turbo() and store_no_turbo()
[ Upstream commit c626a43 ]
Now that global.turbo_disabled can only change at the cpufreq driver
registration time, initialize global.no_turbo at that time too so they
are in sync to start with (if the former is set, the latter cannot be
updated later anyway).
That allows show_no_turbo() to be simlified because it does not need
to check global.turbo_disabled and store_no_turbo() can be rearranged
to avoid doing anything if the new value of global.no_turbo is equal
to the current one and only return an error on attempts to clear
global.no_turbo when global.turbo_disabled.
While at it, eliminate the redundant ret variable from store_no_turbo().
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Stable-dep-of: 350cbb5 ("cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo()")
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 524ee26 commit a44d090
1 file changed
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1263 | 1263 | | |
1264 | 1264 | | |
1265 | 1265 | | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
| 1266 | + | |
1270 | 1267 | | |
1271 | 1268 | | |
1272 | 1269 | | |
| |||
1277 | 1274 | | |
1278 | 1275 | | |
1279 | 1276 | | |
1280 | | - | |
| 1277 | + | |
1281 | 1278 | | |
1282 | | - | |
1283 | | - | |
| 1279 | + | |
1284 | 1280 | | |
1285 | 1281 | | |
1286 | 1282 | | |
1287 | 1283 | | |
1288 | 1284 | | |
1289 | | - | |
1290 | | - | |
| 1285 | + | |
| 1286 | + | |
1291 | 1287 | | |
1292 | 1288 | | |
1293 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1294 | 1293 | | |
1295 | 1294 | | |
1296 | 1295 | | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
| 1296 | + | |
| 1297 | + | |
1300 | 1298 | | |
1301 | 1299 | | |
1302 | | - | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | | - | |
| 1316 | + | |
1317 | 1317 | | |
| 1318 | + | |
1318 | 1319 | | |
1319 | 1320 | | |
1320 | 1321 | | |
| |||
3113 | 3114 | | |
3114 | 3115 | | |
3115 | 3116 | | |
| 3117 | + | |
3116 | 3118 | | |
3117 | 3119 | | |
3118 | 3120 | | |
| |||
0 commit comments