lkml.org 
[lkml]   [2016]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 6/6] IA64-sn2_smp: Combine two seq_printf() calls into one call in sn2_ptc_seq_show()
    From
    Date
    >> @@ -494,12 +494,11 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
    >> int cpu;
    >>
    >> cpu = *(loff_t *) data;
    >> -
    >> - if (!cpu) {
    >> + if (!cpu)
    >> seq_printf(file,
    >> - "# cpu ptc_l newrid ptc_flushes nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max not_my_mm deadlock2 ipi_fluches ipi_nsec\n");
    >> - seq_printf(file, "# ptctest %d, flushopt %d\n", sn2_ptctest, sn2_flush_opt);
    >> - }
    >> + "# cpu ptc_l newrid ptc_flushes nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max not_my_mm deadlock2 ipi_fluches ipi_nsec\n"
    >> + "# ptctest %d, flushopt %d\n",
    >> + sn2_ptctest, sn2_flush_opt);
    >>
    >> if (cpu < nr_cpu_ids && cpu_online(cpu)) {
    >> stat = &per_cpu(ptcstats, cpu);
    >
    > Please think more.
    >
    > printf has to inspect character by character looking for
    > a vsprintf % character and 0 termination.
    >
    > seq_puts does a strlen then memcpy.

    Would you prefer to use this function also at this source code place?

    Regards,
    Markus

    \
     
     \ /
      Last update: 2016-10-22 22:49    [W:6.176 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site