diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2023-04-20 09:47:18 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-04-27 19:37:36 +0200 |
commit | a78032e94bf16e9c53238cd83c82095b4a251d4b (patch) | |
tree | e13e00543484fcee9919e245d61e36c4f9e7d2cd /net/dsa | |
parent | 91048ce4227868000bfe624707e42274ef2198aa (diff) |
intel_idle: clean up intel_idle_init_cstates_icpu()
The intel_idle_init_cstates_icpu() function includes a loop that iterates
over every C-state. Inside the loop, the same C-state data is referenced 2
ways:
1. as cpuidle_state_table[cstate]
2. as drv->states[drv->state_count] (but it is a copy of #1, not the same
object).
Make the code be more consistent and easier to read by using only the 2nd
way. So the code structure would be as follows:
1. Use cpuidle_state_table[cstate]
2. Copy cpuidle_state_table[cstate] to drv->states[drv->state_count]
3. Use only drv->states[drv->state_count] from this point.
Note, this change introduces a checkpatch.pl warning (too long line), but it
will be addressed in the next patch.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions