Messages in this thread |  | | | From | Axel Weiß <> | | Subject | Re: linux-2.4.26 released | | Date | Wed, 21 Apr 2004 10:25:05 +0200 |
| |
Am Mittwoch, 21. April 2004 06:53 schrieb Willy Tarreau: > Hi William, > > On Tue, Apr 20, 2004 at 04:23:12PM -0700, William Lee Irwin III wrote: > > - return (mps_cpu/4)*16 + (1<<(mps_cpu%4)); > > + return (mps_cpu & ~0x3) << 2 | 1 << (mps_cpu & 0x3); > > ^^^^ > I think you wanted to put '<< 4' here instead of '<< 2'.
No, the above is correct (at least equivalent): (x / 4) * 16 = (x >> 2) << 4 = (x & ~3) << 2
Regards, Axel
-- Humboldt-Universität zu Berlin Institut für Informatik Signalverarbeitung und Mustererkennung Dipl.-Inf. Axel Weiß Rudower Chaussee 25 12489 Berlin-Adlershof +49-30-2093-3050
- 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/
|  |