summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorMiquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>2026-07-16 12:51:12 +0200
committerRob Herring (Arm) <robh@kernel.org>2026-07-22 08:48:18 -0500
commita4673d68a0a212e4160df309a8bc7dd6354a16c1 (patch)
tree1992bc3a4342c5ffd4118f30aea57bb172e47eb8 /tools/perf/scripts/python/flamegraph.py
parent1404bf347918587b8f252e3fdd65d8d7d9083445 (diff)
of: base: Handle optional argument in of_parse_phandle_with_args_map()
The kernel doc claims out_args is optional. In practice, the function unconditionally dereferences it. It feels like calling this function with a NULL out_args argument may be a valid use case (in order to know if the lookup would work, even though we might not care about the result), even though in practice there seem to be no actual user of that possibility. All callers give an on-stack object to fill. There are two ways out: either we drop the "optional" wording from the kernel doc, or we handle the NULL case properly. Since handling this case goes in favor of more harmonization of the semantics and since of_parse_phandle_with_args() actually do handle that situation correctly, let's handle it in the _map() case as well. Use a local on-stack object in case no argument is passed. This way, we actually go through the same logic as if there was an argument. We may however return rather early, since the second part of the function is dedicated at filling that argument. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/20260710183359.61D3A1F000E9@smtp.kernel.org/ Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260716-schneider-v7-2-rc1-eip-of-fix-v1-1-9b9383f936c6@bootlin.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions