Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] cred: Remove unnecessary kdebug atomic reads | Date | Wed, 26 Aug 2015 00:30:44 +0100 |
| |
Andrew Morton <akpm@linux-foundation.org> wrote:
> Did you consider doing this within no_printk()? That would break code > which is relying on side-effects in the evaluation of a printk arg but > that's pretty weird and I bet there isn't (and won't be) such code.
The reasons that no_printk() is like it is are (1) so that the side-effects stay intact and (2) you still get format warnings. If someone prints a device register, for example, it *must* work the same whether or not you use printk() or no_printk(). Of course, printing a device register like this is probably not a good idea...
David
| |