diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2024-07-10 11:36:37 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-10 18:45:02 +0100 |
commit | bff92858dfb9897e4c06c11aab0322e1aab822f7 (patch) | |
tree | bd6dc47d0957a6520d9e80340814543b68b09df9 /scripts/gdb/linux/stackdepot.py | |
parent | 680e126ec0400f6daecf0510c5bb97a55779ff03 (diff) |
firmware: cs_dsp: Don't allocate temporary buffer for info text
Don't allocate a temporary buffer to hold a NUL-terminated copy
of the NAME/INFO string from the wmfw/bin. It can be printed
directly to the log. Also limit the maximum number of characters
that will be logged from this string.
The NAME/INFO blocks in the firmware files are an array of
characters with a length, not a NUL-terminated C string. The
original code allocated a temporary buffer to make a
NUL-terminated copy of the string and then passed that to
dev_info(). There's no need for this: printf formatting can
use "%.*s" to print a character array of a given length.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240710103640.78197-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/stackdepot.py')
0 files changed, 0 insertions, 0 deletions