From 55ec973fd914a8c4ed4ad73b009a82f6e51eb8c8 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Wed, 21 Sep 2016 15:12:17 -0700 Subject: [PATCH] PM / devfreq: bimc-bwmon: Fix rounding error Fix rounding error that occurs when converting from byte to MB. Change-Id: Id507e0ae73c42ad5995af0153c3255ad69fde9df Signed-off-by: Rohit Gupta --- drivers/devfreq/bimc-bwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/bimc-bwmon.c b/drivers/devfreq/bimc-bwmon.c index 707a244e62e9..315d3a67e43e 100644 --- a/drivers/devfreq/bimc-bwmon.c +++ b/drivers/devfreq/bimc-bwmon.c @@ -377,7 +377,7 @@ static unsigned long mon_get_zone_stats(struct bwmon *m) zone = get_zone(m); - count = readl_relaxed(MON2_ZONE_MAX(m, zone)); + count = readl_relaxed(MON2_ZONE_MAX(m, zone)) + 1; count *= SZ_1M; dev_dbg(m->dev, "Zone%d Max byte count: %08lx\n", zone, count);