Subject: Re: problems with ahc vs. format command
To: Manuel Bouyer <firstname.lastname@example.org>
From: Robert Elz <kre@munnari.OZ.AU>
Date: 06/13/2001 00:20:53
Date: Tue, 12 Jun 2001 18:52:33 +0200
From: Manuel Bouyer <email@example.com>
| OK, any idea on how to make this MD ? A function in libkern maybe ?
A macro in arch/xxx/include/param.h (along with ctob() etc) is what I would
have done (which is then included however that file is usually included).
And then, if it were me, because I'm fundamentally super-lazy, in the
scsipi code, in some header or other
#if !defined mstohz
#define mstohz(n) (the 32 bit way)
so all those param.h files don't have to be altered on day 1...
| If so, how to call it ? mstohz(), mstocallout(), ...
mstohz() was what was in my mind...
| ncr53c9x ?
| No, the way the test is done, it will overflow an integer for a 6 hour
| timeout (not an unsigned integer though) and hz == 100 (with hz <= 100,
| the test is always false)
Oh, OK, I didn't do the calculations for the hz==100 case to see where it
would break. I did wonder why hz was being used in the test at all, what
really matters is whether the timeout is long (and 1 sec isn't really...)
or not, not what the frequency of the clock is. Of course, both contribute
to overflow, but it is the large timeout that really causes it, so just
testing timeout > 1000000 or something, and omitting the test on hz seems
like it would be better.