linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/proc: remove workaround for obsolete compiler version
@ 2022-07-18 14:19 Dirk Müller
  0 siblings, 0 replies; only message in thread
From: Dirk Müller @ 2022-07-18 14:19 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Dirk Müller

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@suse.de>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-18 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-18 14:19 [PATCH] fs/proc: remove workaround for obsolete compiler version Dirk Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).