Commit ca0e972
committed
thermal: gov_power_allocator: Eliminate a redundant variable
Notice that the passive field in struct thermal_zone_device is not
used by the Power Allocator governor itself and so the ordering of
its updates with respect to allow_maximum_power() or allocate_power()
does not matter.
Accordingly, make power_allocator_manage() update that field right
before returning, which allows the current value of it to be passed
directly to allow_maximum_power() without using the additional update
variable that can be dropped.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>1 parent 41ddbcc commit ca0e972
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | 750 | | |
752 | 751 | | |
753 | 752 | | |
754 | 753 | | |
755 | | - | |
756 | | - | |
757 | 754 | | |
758 | | - | |
| 755 | + | |
| 756 | + | |
759 | 757 | | |
760 | 758 | | |
761 | 759 | | |
762 | | - | |
763 | | - | |
764 | 760 | | |
| 761 | + | |
765 | 762 | | |
766 | 763 | | |
767 | 764 | | |
| |||
0 commit comments