All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and
@ 2005-04-13 12:11 ` Tobias Klauser
  0 siblings, 0 replies; 12+ messages in thread
From: Tobias Klauser @ 2005-04-13 12:11 UTC (permalink / raw)
  To: kernel-janitors; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

Replace the MS_TO_JIFFIES() macro with msecs_to_jiffies() from jiffies.h
The current macro is incorrect because HZ can have different values on
different architectures.
The patch also removes the JIFFIES_TO_MS() macro which is not used
anymore in the code.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>

diff -urpN linux-2.6.12-rc2-mm3/drivers/scsi/a100u2w.c linux-2.6.12-rc2-mm3-tk/drivers/scsi/a100u2w.c
--- linux-2.6.12-rc2-mm3/drivers/scsi/a100u2w.c	2005-03-02 08:38:12.000000000 +0100
+++ linux-2.6.12-rc2-mm3-tk/drivers/scsi/a100u2w.c	2005-04-13 13:53:19.000000000 +0200
@@ -100,10 +100,6 @@
 
 #include "a100u2w.h"
 
-
-#define JIFFIES_TO_MS(t) ((t) * 1000 / HZ)
-#define MS_TO_JIFFIES(j) ((j * HZ) / 1000)
-
 static ORC_SCB *orc_alloc_scb(ORC_HCS * hcsp);
 static void inia100SCBPost(BYTE * pHcb, BYTE * pScb);
 
@@ -160,7 +156,7 @@ static UCHAR dftNvRam[64] =
 /***************************************************************************/
 static void waitForPause(unsigned amount)
 {
-	ULONG the_time = jiffies + MS_TO_JIFFIES(amount);
+	ULONG the_time = jiffies + msecs_to_jiffies(amount);
 	while (time_before_eq(jiffies, the_time))
 		cpu_relax();
 }

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2005-04-13 15:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-13 12:11 [KJ] [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and Tobias Klauser
2005-04-13 12:11 ` [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros Tobias Klauser
2005-04-13 13:29 ` [KJ] [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and Alexey Dobriyan
2005-04-13 17:28   ` [KJ] [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros Alexey Dobriyan
2005-04-13 14:43 ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and Christoph Hellwig
2005-04-13 14:43   ` [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros Christoph Hellwig
2005-04-13 14:51   ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and Christoph Hellwig
2005-04-13 14:51     ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros Christoph Hellwig
2005-04-13 15:00     ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and James Bottomley
2005-04-13 15:00       ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros James Bottomley
2005-04-13 15:01     ` [KJ] Re: [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and Tobias Klauser
2005-04-13 15:01       ` [PATCH] scsi/a100u2w: Remove custom msecs_to_jiffies and jiffies_to_msecs macros Tobias Klauser

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.