From: Michael Tokarev <mjt@tls.msk.ru>
To: undisclosed-recipients:;
Subject: (trivia) remove useless typecast around `jif' variable
Date: Mon, 5 Mar 2007 19:12:51 +0300 (MSK) [thread overview]
Message-ID: <20070305161251.AE2C97FAA@paltus.tls.msk.ru> (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;
}
next reply other threads:[~2007-03-05 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 16:12 Michael Tokarev [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070305161251.AE2C97FAA@paltus.tls.msk.ru \
--to=mjt@tls.msk.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome