All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/3] perf diff: color the Ratio column
Date: Wed, 4 Dec 2013 09:59:04 -0300	[thread overview]
Message-ID: <20131204125904.GB6359@ghostprotocols.net> (raw)
In-Reply-To: <CALkWK0nBDqHSWxCVYtU5NMZ4J4=DHGXqk0ZHzM2z8rS1ohjwRw@mail.gmail.com>

Em Wed, Dec 04, 2013 at 03:40:25PM +0530, Ramkumar Ramachandra escreveu:
> Arnaldo Carvalho de Melo wrote:
> > static inline percent_color_snprintf(...)
> > {
> >         return value_color_snprintf(...);
> > }
> 
> The issue with this suggestion is that the prototype of
> percent_color_snprintf() is:
> 
>   int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...)
> 
> So, I can only pass value_color_snprintf() a va_list, making its prototype:
> 
>   int value_color_snprintf(char *bf, size_t size, const char *fmt, va_list args)
> 
> Is this worth the minor rename?

That is ok, I'd say. Or if that would be a problem one could consider
using a macro, perhaps.
 
> On a related note, does percent_color_snprintf() need to be a variadic
> function? It only seems to process one percent value.

I think that there are places where it is passed as a pointer that
expects it to have that prototype, this is from memory, so please check.

- Arnaldo

  reply	other threads:[~2013-12-04 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 13:36 [PATCH v4 0/3] More color in 'perf diff' Ramkumar Ramachandra
2013-11-29 13:36 ` [PATCH v4 1/3] perf diff: color the Delta column Ramkumar Ramachandra
2013-12-01 19:48   ` Jiri Olsa
2013-11-29 13:36 ` [PATCH v4 2/3] perf diff: color the Ratio column Ramkumar Ramachandra
2013-12-01 19:56   ` Jiri Olsa
     [not found]     ` <20131202193502.GA3706@infradead.org>
2013-12-04 10:10       ` Ramkumar Ramachandra
2013-12-04 12:59         ` Arnaldo Carvalho de Melo [this message]
2013-12-04 13:11           ` Ramkumar Ramachandra
2013-11-29 13:36 ` [PATCH v4 3/3] perf diff: color the Weighted Diff column Ramkumar Ramachandra

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=20131204125904.GB6359@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=artagnon@gmail.com \
    --cc=jolsa@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.