diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2017-01-12 18:53:56 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-01-16 07:27:55 +0100 |
commit | 21665912dd722656dfc4481f82c73397c8f2d07f (patch) | |
tree | 71d4de62a5601ab63ead9bcb65de6b6604a9da2f /drivers/s390 | |
parent | s390: provide sclp based boot console (diff) | |
download | linux-21665912dd722656dfc4481f82c73397c8f2d07f.tar.xz linux-21665912dd722656dfc4481f82c73397c8f2d07f.zip |
s390/cio: remove cmf related code relevant for 31 bit only
This is a leftover from the 31 bit era to avoid 64 bit divisions.
Get rid of it.
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/cmf.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 6b6386e9a500..220491d27ef4 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c @@ -1085,15 +1085,9 @@ static ssize_t cmb_show_avg_utilization(struct device *dev, data.function_pending_time + data.device_disconnect_time; - /* shift to avoid long long division */ - while (-1ul < (data.elapsed_time | utilization)) { - utilization >>= 8; - data.elapsed_time >>= 8; - } - /* calculate value in 0.1 percent units */ - t = (unsigned long) data.elapsed_time / 1000; - u = (unsigned long) utilization / t; + t = data.elapsed_time / 1000; + u = utilization / t; return sprintf(buf, "%02ld.%01ld%%\n", u/ 10, u - (u/ 10) * 10); } |