summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@oss.qualcomm.com>2026-02-11 21:37:14 -0600
committerMark Brown <broonie@kernel.org>2026-02-12 11:55:48 +0000
commite243cdd87b911ce9968b62e4ab2b680dfadc4341 (patch)
tree749de9e9980a227b4919251e0f70da677ff7788b /tools/lib/python
parent1a4b0c999101b2532723f9bd9818b70ffa7580f4 (diff)
regulator: core: Remove regulator supply_name length limit
When creating the regulator object, associated with a consumer device, the supply_name is string formatted into a statically sized buffer on the stack, then strdup()'ed onto the heap. Not only is the dance on the stack unnecessary, but when the device's name is long we might not fit the constructed supply_name in the fixed 64 byte buffer on the stack. One such case can be seen on the Qualcomm Rb3Gen2 board, where we find a PCIe controller, with a PCIe switch, with a USB controller, with a USB hub, consuming a regulator. In this example the dev->kobj.name itself is 62 characters long. Drop the temporary buffer on the stack and kasprintf() the string directly on the heap, both to simplify the code, and to remove the length limitation. Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Link: https://patch.msgid.link/20260211-regulator-supply-name-length-v1-1-3875541c1576@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions