GCC 5.1+ is required, so with this change we can remove a workaround for a really obsolete compiler version issue. Signed-off-by: Dirk Müller <dmueller@xxxxxxx> --- fs/proc/stat.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 4fb8729a68d4..9eaa59fab7bf 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -167,29 +167,17 @@ static int show_stat(struct seq_file *p, void *v) u64 *cpustat = kcpustat.cpustat; kcpustat_cpu_fetch(&kcpustat, i); - - /* Copy values here to work around gcc-2.95.3, gcc-2.96 */ - user = cpustat[CPUTIME_USER]; - nice = cpustat[CPUTIME_NICE]; - system = cpustat[CPUTIME_SYSTEM]; - idle = get_idle_time(&kcpustat, i); - iowait = get_iowait_time(&kcpustat, i); - irq = cpustat[CPUTIME_IRQ]; - softirq = cpustat[CPUTIME_SOFTIRQ]; - steal = cpustat[CPUTIME_STEAL]; - guest = cpustat[CPUTIME_GUEST]; - guest_nice = cpustat[CPUTIME_GUEST_NICE]; seq_printf(p, "cpu%d", i); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(user)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(nice)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(system)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(idle)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(iowait)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(irq)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(softirq)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(steal)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(guest)); - seq_put_decimal_ull(p, " ", nsec_to_clock_t(guest_nice)); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_USER])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_NICE])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_SYSTEM])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(get_idle_time(&kcpustat, i))); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(get_iowait_time(&kcpustat, i))); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_IRQ])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_SOFTIRQ])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_STEAL])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_GUEST])); + seq_put_decimal_ull(p, " ", nsec_to_clock_t(cpustat[CPUTIME_GUEST_NICE])); seq_putc(p, '\n'); } seq_put_decimal_ull(p, "intr ", (unsigned long long)sum); -- 2.37.1