regulator: Make constraint debug processing conditional on DEBUG
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 5 Oct 2020 13:15:46 +0000 (15:15 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 5 Oct 2020 15:18:36 +0000 (16:18 +0100)
commitc845f21ad86528f888db27849f2d315e08126816
tree4203079842ea41ea2bfd2644947e902b8794b283
parent0b5a21870694ab4c75a783f77b158840908f04a1
regulator: Make constraint debug processing conditional on DEBUG

If debugging is disabled, print_constraints() does not print the actual
constraints, but still performs some processing and string formatting,
only to throw away the result later.

Fix this by moving all constraint debug processing to a separate
function, and replacing it by a dummy when debugging is disabled.
This reduces kernel size by almost 800 bytes (on arm/arm64).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201005131546.22448-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c