From: Joe Perches <joe@perches.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
cocci <cocci@systeme.lip6.fr>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: printf vs. printk (was Re: Side-effect free printk?)
Date: Fri, 05 Dec 2014 07:24:54 -0800 [thread overview]
Message-ID: <1417793094.2721.51.camel@perches.com> (raw)
In-Reply-To: <20141205103248.GA6945@amd>
On Fri, 2014-12-05 at 11:32 +0100, Pavel Machek wrote:
> Hi!
>
> BTW... All the time I'm programming in kernel, I use printf(), and
> when hacking userspace, I use printk().
>
> Nasty.
>
> Given that printf() and printk() have exactly the same behaviour,
> could we allow printf() in kernel? Now... printk()s are usually
> removed before merging the driver, so code will not see much change,
> but it will certainly result in less 4-letter words while developing.
My preference would be to eventually eliminate printk
altogether but I don't see a real problem adding
#define printf printk
to include/linux/printk.h
but
next prev parent reply other threads:[~2014-12-05 15:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 17:50 Side-effect free printk? Joe Perches
2014-12-03 18:02 ` Julia Lawall
2014-12-03 18:05 ` Joe Perches
2014-12-05 10:32 ` printf vs. printk (was Re: Side-effect free printk?) Pavel Machek
2014-12-05 15:24 ` Joe Perches [this message]
2014-12-05 15:26 ` Joe Perches
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=1417793094.2721.51.camel@perches.com \
--to=joe@perches.com \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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
Powered by JetHome