mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nick Andrew <nick@nick-andrew.net>
Cc: Joe Perches <joe@perches.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>, Takashi Iwai <tiwai@suse.de>
Subject: Re: [RFC] Recursive printk
Date: Sat, 6 Dec 2008 15:24:02 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0812061522120.3425@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20081206231626.GK5957@mail.local.tull.net>



On Sun, 7 Dec 2008, Nick Andrew wrote:
>
> I agree completely. I was hoping somebody could tell me how to include
> '%v' in gcc's acceptable list, but it seems impossible. The alternative
> then is to use '%pV%s' which gcc _should_ like (I haven't tested it,
> but it seems reasonable) and reverse the order of the fmt and args
> in the function call arguments.

Don't do %pV%s, do just %pV, and pass it a pointer to a struct, something 
like

	struct va_format {
		const char *fmt;
		va_list va;
	};

and make people who use this just always pass things around like that.

(Maybe use "va_list *va" to add another level of indirection if necessary)

		Linus

  reply	other threads:[~2008-12-06 23:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06  6:59 Nick Andrew
2008-12-06  6:59 ` [RFC PATCH v1 1/3] Split the vsnprintf function into two parts Nick Andrew
2008-12-06  7:00 ` [RFC PATCH v1 2/3] Add %v support to vsnprintf() Nick Andrew
2008-12-06 17:27   ` Linus Torvalds
2008-12-06  7:00 ` [RFC PATCH v1 3/3] Sample refactor of socket.c to use recursive printk Nick Andrew
2008-12-06  7:03   ` David Miller
2008-12-06  7:18   ` Valdis.Kletnieks
2008-12-06  7:40     ` Nick Andrew
2008-12-06  7:20 ` [RFC] Recursive printk Andrew Morton
2008-12-06  7:33   ` Willy Tarreau
2008-12-06  7:41     ` Andrew Morton
2008-12-06  8:16       ` Willy Tarreau
2008-12-06  9:43       ` Takashi Iwai
2008-12-06  7:42   ` Joe Perches
2008-12-06  8:40     ` Nick Andrew
2008-12-06  9:11       ` Joe Perches
2008-12-06 23:16         ` Nick Andrew
2008-12-06 23:24           ` Linus Torvalds [this message]
2008-12-06 19:35       ` Al Viro
2008-12-06  8:30   ` Nick Andrew
2008-12-08  1:42     ` Tejun Heo

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=alpine.LFD.2.00.0812061522120.3425@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@nick-andrew.net \
    --cc=tiwai@suse.de \
    --cc=tj@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

all inboxes | Powered by JetHome®