lkml.org 
[lkml]   [2017]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] Replace printf with fprintf for all the output functions
On Mon, Sep 18, 2017 at 01:55:22PM +0800, yuzhoujian wrote:

SNIP

> data->deepest_cstate, data->last_cstate,
> data->wake_reason);
> fprint_sample_pt_spacing(len, fp);
> @@ -1299,10 +1299,10 @@ static void fprint_sample_synth_cbr(struct perf_sample *sample, FILE *fp)
> return;
>
> freq = (le32_to_cpu(data->freq) + 500) / 1000;
> - len = printf(" cbr: %2u freq: %4u MHz ", data->cbr, freq);
> + len = fprintf(fp, " cbr: %2u freq: %4u MHz ", data->cbr, freq);
> if (data->max_nonturbo) {
> percent = (5 + (1000 * data->cbr) / data->max_nonturbo) / 10;
> - len += printf("(%3u%%) ", percent);
> + len += fprintf(fp, "(%3u%%) ", percent);
> }
> fprint_sample_pt_spacing(len, fp);
> }
> @@ -1377,7 +1377,7 @@ static size_t data_src__fprintf(u64 data_src, FILE *fp)
> if (maxlen < len)
> maxlen = len;
>
> - return printf("%-*s", maxlen, out);
> + return fprintf(fp, "%-*s", maxlen, out);

all these 'fp' adding changes should be in separate patch

jirka

\
 
 \ /
  Last update: 2017-09-22 11:04    [W:0.106 / U:35.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site