public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: dhowells@redhat.com, Joe Perches <joe@perches.com>,
	James Morris <jmorris@namei.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cred: Remove unnecessary kdebug atomic reads
Date: Wed, 26 Aug 2015 00:30:44 +0100	[thread overview]
Message-ID: <22331.1440545444@warthog.procyon.org.uk> (raw)
In-Reply-To: <20150825133925.654019415dbe3d2083e5f8c7@linux-foundation.org>

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

      parent reply	other threads:[~2015-08-25 23:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 16:53 [PATCH] cred: Remove unnecessary kdebug atomic reads Joe Perches
2015-08-25 20:39 ` Andrew Morton
2015-08-25 20:51   ` Joe Perches
2015-08-25 20:56     ` Andrew Morton
2015-08-25 21:10       ` Joe Perches
2015-08-25 23:30   ` David Howells [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22331.1440545444@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jmorris@namei.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox