aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds2023-03-17 11:02:26 -0700
committerLinus Torvalds2023-03-17 11:02:26 -0700
commit02ef7d39fd552cf9e1de58a3003f77e743d1fb6b (patch)
treecba6e71d749ebc531e83117ef7d0ec2c829f370b /tools
parentabb02a824555c160dccc316971cbb802b3ebf4f7 (diff)
parent1fa9d47baa9e61ff973e03f0ef26f5b78d545e37 (diff)
Merge tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These fix an error code path issue in a cpuidle driver and make the sleepgraph utility more robust against unexpected input. Specifics: - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle driver (Shawn Guo) - Modify the sleepgraph utility so it does not crash on binary data in device names (Todd Brandt)" * tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: pm-graph: sleepgraph: Avoid crashing on binary data in device names cpuidle: psci: Iterate backwards over list in psci_pd_remove()
Diffstat (limited to 'tools')
-rwxr-xr-xtools/power/pm-graph/sleepgraph.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py
index 82c09cd25cc2..bf4ac24a1c7a 100755
--- a/tools/power/pm-graph/sleepgraph.py
+++ b/tools/power/pm-graph/sleepgraph.py
@@ -5556,9 +5556,8 @@ def executeSuspend(quiet=False):
if not quiet:
pprint('CAPTURING TRACE')
op = sv.writeDatafileHeader(sv.ftracefile, testdata)
- fp = open(tp+'trace', 'r')
- for line in fp:
- op.write(line)
+ fp = open(tp+'trace', 'rb')
+ op.write(ascii(fp.read()))
op.close()
sv.fsetVal('', 'trace')
sv.platforminfo(cmdafter)