[PATCH] ibmmca.c + CREDITS

Andries.Brouwer@cwi.nl
Thu, 6 Aug 1998 12:31:00 +0200 (MET DST)


Linux developers are valuable - it seems we are throwing
them out too easily these days.
The patch below allows Martin Kolinek to survive.

Andries

P.S. Looking at the CREDITS file (that doesnt contain his name),
I noticed a violation of the alphabetical order.

P.P.S. Running a kernel with large device numbers again.
All seems fine, but coda/nfs/nfsd/lockd required many changes.

--- ../linux-2.1.114/linux/drivers/scsi/ibmmca.c Tue Aug 4 20:52:09 1998
+++ linux/drivers/scsi/ibmmca.c Thu Aug 6 11:12:14 1998
@@ -2132,13 +2132,21 @@
return 0;
}

+/* return (a/b)*100 where 0 <= a <= b */
+static int percent(unsigned int a, unsigned int b) {
+ if (b == 0)
+ return 0;
+ if (b < 10000000)
+ a *= 100;
+ else
+ b /= 100;
+ return (a + (b/2)) / b;
+}
+
/* calculate percentage of total accesses on a ldn */
static int ldn_access_load(struct Scsi_Host *shpnt, int ldn)
{
- if (IBM_DS.total_accesses == 0) return (0);
- if (IBM_DS.ldn_access[ldn] == 0) return (0);
-#error Floating point in kernel - shoot programmer
- return((int)(((float)IBM_DS.ldn_access[ldn]/(float)IBM_DS.total_accesses)*(float)100.000));
+ return percent(IBM_DS.ldn_access[ldn], IBM_DS.total_accesses);
}

/* calculate total amount of r/w-accesses */
--- ../linux-2.1.114/linux/CREDITS Tue Aug 4 20:51:45 1998
+++ linux/CREDITS Thu Aug 6 11:59:10 1998
@@ -890,6 +890,13 @@
S: D-64295
S: Germany

+N: Andi Kleen
+E: ak@muc.de
+D: network hacker, syncookies
+S: Schwalbenstr. 96
+S: 85551 Ottobrunn
+S: Germany
+
N: Ian Kluft
E: ikluft@thunder.sbay.org
W: http://www.kluft.com/~ikluft/
@@ -924,13 +931,6 @@
N: Andreas Koensgen
E: ajk@iehk.rwth-aachen.de
D: 6pack driver for AX.25
-
-N: Andi Kleen
-E: ak@muc.de
-D: network hacker, syncookies
-S: Schwalbenstr. 96
-S: 85551 Ottobrunn
-S: Germany

N: Willy Konynenberg
E: willy@xos.nl

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html