public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Bob Picco <bob.picco@hp.com>,
	Clemens Ladisch <clemens@ladisch.de>
Subject: [PATCH 7/7] HPET: simplify initialization message
Date: Tue, 04 Oct 2005 14:42:04 +0200 (MEST)	[thread overview]
Message-ID: <20051004124204.23057.29610.schnuffi@turing> (raw)
In-Reply-To: <20051004124126.23057.75614.schnuffi@turing>

From: Clemens Ladisch <clemens@ladisch.de>

When booting, display the timer frequency in Hertz instead of as tick
length in nanoseconds.  Apart from saving a local variable, this makes
the message more easily comprehensible.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>

Index: linux-2.6.13/drivers/char/hpet.c
===================================================================
--- linux-2.6.13.orig/drivers/char/hpet.c	2005-10-03 22:53:24.000000000 +0200
+++ linux-2.6.13/drivers/char/hpet.c	2005-10-03 22:53:28.000000000 +0200
@@ -798,7 +798,7 @@ int hpet_alloc(struct hpet_data *hdp)
 	size_t siz;
 	struct hpet __iomem *hpet;
 	static struct hpets *last = (struct hpets *)0;
-	unsigned long ns, period;
+	unsigned long period;
 	unsigned long long temp;
 
 	/*
@@ -863,10 +863,9 @@ int hpet_alloc(struct hpet_data *hdp)
 		printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
 	printk("\n");
 
-	ns = period / 1000000;	/* convert to nanoseconds, 10^-9 */
-	printk(KERN_INFO "hpet%d: %ldns tick, %d %d-bit timers\n",
-		hpetp->hp_which, ns, hpetp->hp_ntimer,
-		cap & HPET_COUNTER_SIZE_MASK ? 64 : 32);
+	printk(KERN_INFO "hpet%u: %u %d-bit timers, %Lu Hz\n",
+	       hpetp->hp_which, hpetp->hp_ntimer,
+	       cap & HPET_COUNTER_SIZE_MASK ? 64 : 32, hpetp->hp_tick_freq);
 
 	mcfg = readq(&hpet->hpet_config);
 	if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {

  parent reply	other threads:[~2005-10-04 12:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 12:41 [PATCH 0/7] more HPET fixes and enhancements Clemens Ladisch
2005-10-04 12:41 ` [PATCH 1/7] HPET: Fix mmap() of /dev/hpet Clemens Ladisch
2005-10-04 12:41 ` [PATCH 2/7] HPET: fix HPET_INFO calls from kernel space Clemens Ladisch
2005-10-04 12:41 ` [PATCH 3/7] HPET: fix division by zero in HPET_INFO Clemens Ladisch
2005-10-04 12:41 ` [PATCH 4/7] HPET: fix uninitialized variable in hpet_register() Clemens Ladisch
2005-10-04 12:41 ` [PATCH 5/7] HPET: fix access to multiple HPET devices Clemens Ladisch
2005-10-04 12:41 ` [PATCH 6/7] HPET: remove superfluous indirections Clemens Ladisch
2005-10-04 12:42 ` Clemens Ladisch [this message]
2005-10-10 14:17 ` [PATCH 0/7] more HPET fixes and enhancements Bob Picco
2005-10-15  2:30 ` Randy.Dunlap
2005-10-17 16:30   ` Clemens Ladisch
2005-10-18  9:19     ` Takashi Iwai

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=20051004124204.23057.29610.schnuffi@turing \
    --to=clemens@ladisch.de \
    --cc=akpm@osdl.org \
    --cc=bob.picco@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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