When printk-indexing is enabled, each printk() or dev_printk()
invocation emits a pi_entry structure. This is even true when the call
is protected by an always-false check: while the actual code to print
the message is optimized out by the compiler, the pi_entry structure is
still emitted.
Fix this by replacing "if (0) *printk(...)" constructs by calls to the
corresponding *no_printk() helpers.
Note that this has minimal impact, as most (all?) callers of
dynamic_{pr,dev}_debug() are protected by checks for DYNAMIC_DEBUG
anyway. Still, using the helpers serves as a good example to follow.