diff options
author | Mark Brown <broonie@kernel.org> | 2015-09-19 07:12:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-22 14:43:22 -0700 |
commit | 6340b49a7a0eade043c80a1c95842273e93eaa67 (patch) | |
tree | f2e9074c3c9dc4b867220d679c2e07f0393e51a2 /include | |
parent | 86d7065eada688b6b8d2687cbc045ef88c43973f (diff) | |
download | lwn-6340b49a7a0eade043c80a1c95842273e93eaa67.tar.gz lwn-6340b49a7a0eade043c80a1c95842273e93eaa67.zip |
regmap: debugfs: Don't bother actually printing when calculating max length
commit 176fc2d5770a0990eebff903ba680d2edd32e718 upstream.
The in kernel snprintf() will conveniently return the actual length of
the printed string even if not given an output beffer at all so just do
that rather than relying on the user to pass in a suitable buffer,
ensuring that we don't need to worry if the buffer was truncated due to
the size of the buffer passed in.
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions