From: Dmitry Safonov <d.safonov@partner.samsung.com>
To: dan.carpenter@oracle.com
Cc: kbuild@01.org, stefan.strogin@gmail.com,
akpm@linux-foundation.org, linux-mm@kvack.org,
Dmitry Safonov <d.safonov@partner.samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Pintu Kumar <pintu.k@samsung.com>,
Weijie Yang <weijie.yang@samsung.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Vyacheslav Tyrtov <v.tyrtov@samsung.com>,
Aleksei Mateosian <a.mateosian@samsung.com>,
Sasha Levin <sasha.levin@oracle.com>,
Michal Hocko <mhocko@suse.cz>
Subject: [PATCH] mm-cma-add-functions-to-get-region-pages-counters-fix-3
Date: Wed, 08 Apr 2015 22:45:36 +0300 [thread overview]
Message-ID: <1428522336-9020-1-git-send-email-d.safonov@partner.samsung.com> (raw)
In-Reply-To: <20150408140446.GR16501@mwanda>
Fix for the next compiler warnings:
mm/cma_debug.c:45 cma_used_get() warn: should 'used << cma->order_per_bit' be a 64 bit type?
mm/cma_debug.c:67 cma_maxchunk_get() warn: should 'maxchunk << cma->order_per_bit' be a 64 bit type?
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Stefan Strogin <stefan.strogin@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pintu Kumar <pintu.k@samsung.com>
Cc: Weijie Yang <weijie.yang@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Vyacheslav Tyrtov <v.tyrtov@samsung.com>
Cc: Aleksei Mateosian <a.mateosian@samsung.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Dmitry Safonov <d.safonov@partner.samsung.com>
---
mm/cma_debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/cma_debug.c b/mm/cma_debug.c
index 835e761..9459842 100644
--- a/mm/cma_debug.c
+++ b/mm/cma_debug.c
@@ -42,7 +42,7 @@ static int cma_used_get(void *data, u64 *val)
/* pages counter is smaller than sizeof(int) */
used = bitmap_weight(cma->bitmap, (int)cma->count);
mutex_unlock(&cma->lock);
- *val = used << cma->order_per_bit;
+ *val = (u64)used << cma->order_per_bit;
return 0;
}
@@ -64,7 +64,7 @@ static int cma_maxchunk_get(void *data, u64 *val)
maxchunk = max(end - start, maxchunk);
}
mutex_unlock(&cma->lock);
- *val = maxchunk << cma->order_per_bit;
+ *val = (u64)maxchunk << cma->order_per_bit;
return 0;
}
--
2.3.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-04-08 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 14:04 [next:master 9613/10050] mm/cma_debug.c:45 cma_used_get() warn: should 'used << cma->order_per_bit' be a 64 bit type? Dan Carpenter
2015-04-08 19:45 ` Dmitry Safonov [this message]
2015-04-08 20:55 ` [PATCH] mm-cma-add-functions-to-get-region-pages-counters-fix-3 Michal Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428522336-9020-1-git-send-email-d.safonov@partner.samsung.com \
--to=d.safonov@partner.samsung.com \
--cc=a.mateosian@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kbuild@01.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mhocko@suse.cz \
--cc=mina86@mina86.com \
--cc=pintu.k@samsung.com \
--cc=sasha.levin@oracle.com \
--cc=stefan.strogin@gmail.com \
--cc=v.tyrtov@samsung.com \
--cc=weijie.yang@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox