]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xmon: Fiddle xmon_depth_to_print logic in xmon_show_stack()
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 9 Oct 2012 04:20:36 +0000 (04:20 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 15 Nov 2012 01:59:59 +0000 (12:59 +1100)
commit89e7a79d241c6c9549482ea5d9998ee14c75b24c
treeb6bc759e85a2bd98c1f61c5f96235d64c4c111c5
parent97c34fa48edcff14a80c56afc4523e321707becb
powerpc/xmon: Fiddle xmon_depth_to_print logic in xmon_show_stack()

Currently xmon_depth_to_print is static and global, but it's only
ever used in xmon_show_stack().

At least with a modern compiler it's inlined, so there's no point
in it being static, we could #define it but it's only used in one
place.

By reworking the logic we can drop count and just decrement the
max value as a loop counter. Also switch to a while loop so we
actually print no more than 64 frames as you'd expect based on the
variable name.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/xmon/xmon.c