On Wed, 2002-11-20 at 21:00, Luben Tuikov wrote:sk) {
> > > - unsigned long duration = jiffies - req->start_time;
> > > + unsigned long duration = (signed) jiffies - (signed) req->start_time;
> > > switch (rq_data_dir(req)) {
> >
> > It was right before. Your patch breaks it. Think about it in unsigned
> > maths
> >
> > 0x00000002 - 0xFFFFFFFF = 0x00000003
>
> 0x2 - (-0x1) = 0x2 + 0x1 = 0x3
>
> Right! I thought (signed) does the job. I actually tried
> it both ways and works all right. I guess either way works fine.
(signed long) maybe - but not signed - long is 64bit on Alpha, (signed)
is 32
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:33 EST