All of lore.kernel.org
 help / color / mirror / Atom feed
* (trivia) remove useless typecast around `jif' variable
@ 2007-03-05 16:12 Michael Tokarev
  2007-03-05 16:29 ` Jan Engelhardt
       [not found] ` <663650480-1173118082-cardhu_blackberry.rim.net-718749525-@bxe041-cell01.bisx.prod.on.blackberry>
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Tokarev @ 2007-03-05 16:12 UTC (permalink / raw)


in fs/proc/proc_misc.c:show_stat() routine (which handles /proc/stat
file), there's a local variable named 'jif' of type unsigned long,
declared as following:

static int show_stat(struct seq_file *p, void *v)
{
        unsigned long jif;

But later on, it's explicitly casted to (unsigned long) in printf().
Remove the useless cast, to let the compiler to do the work for us
in case we'll want to use different type here (say, u64 or something).

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>

--- linux-2.6.20/fs/proc/proc_misc.c.orig	2007-02-04 21:44:54.000000000 +0300
+++ linux-2.6.20/fs/proc/proc_misc.c	2007-03-05 19:06:09.000000000 +0300
@@ -521,15 +521,15 @@ static int show_stat(struct seq_file *p,
 	seq_printf(p,
 		"\nctxt %llu\n"
 		"btime %lu\n"
 		"processes %lu\n"
 		"procs_running %lu\n"
 		"procs_blocked %lu\n",
 		nr_context_switches(),
-		(unsigned long)jif,
+		jif,
 		total_forks,
 		nr_running(),
 		nr_iowait());
 
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-05 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 16:12 (trivia) remove useless typecast around `jif' variable Michael Tokarev
2007-03-05 16:29 ` Jan Engelhardt
2007-03-05 20:18   ` Michael Tokarev
     [not found] ` <663650480-1173118082-cardhu_blackberry.rim.net-718749525-@bxe041-cell01.bisx.prod.on.blackberry>
2007-03-05 22:58   ` Michael Tokarev

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.