Commit 9ab06ab
drm/amd/pm/powerplay/smumgr: remove redundant ternary operators
For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code. Swap variable positions
on either side of '==' to enhance readability.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent fa740b1 commit 9ab06ab
4 files changed
Lines changed: 8 additions & 12 deletions
File tree
- drivers/gpu/drm/amd/pm/powerplay/smumgr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
2543 | | - | |
2544 | | - | |
2545 | | - | |
| 2543 | + | |
| 2544 | + | |
2546 | 2545 | | |
2547 | 2546 | | |
2548 | 2547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2655 | 2655 | | |
2656 | 2656 | | |
2657 | 2657 | | |
2658 | | - | |
2659 | | - | |
2660 | | - | |
| 2658 | + | |
| 2659 | + | |
2661 | 2660 | | |
2662 | 2661 | | |
2663 | 2662 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2578 | 2578 | | |
2579 | 2579 | | |
2580 | 2580 | | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
| 2581 | + | |
| 2582 | + | |
2584 | 2583 | | |
2585 | 2584 | | |
2586 | 2585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3139 | 3139 | | |
3140 | 3140 | | |
3141 | 3141 | | |
3142 | | - | |
3143 | | - | |
3144 | | - | |
| 3142 | + | |
| 3143 | + | |
3145 | 3144 | | |
3146 | 3145 | | |
3147 | 3146 | | |
| |||
0 commit comments