size_t type data should not be held under variable of type
int, as this can truncate large values especially on a
64bit system. Fix it.
Change-Id: I5ad1ab321738772a99920e3fa287bda266cb05ed
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
gfp_t gfp, struct dma_attrs *attrs)
{
struct page **pages;
- int count = size >> PAGE_SHIFT;
- int array_size = count * sizeof(struct page *);
+ size_t count = size >> PAGE_SHIFT;
+ size_t array_size = count * sizeof(struct page *);
int i = 0;
if (array_size <= PAGE_SIZE)
gfp_t gfp, struct dma_attrs *attrs)
{
struct page **pages;
- int count = size >> PAGE_SHIFT;
- int array_size = count * sizeof(struct page *);
+ size_t count = size >> PAGE_SHIFT;
+ size_t array_size = count * sizeof(struct page *);
int i = 0;
if (array_size <= PAGE_SIZE)
{
struct page *page;
struct page **pages;
- int count = size >> PAGE_SHIFT;
- int array_size = count * sizeof(struct page *);
+ size_t count = size >> PAGE_SHIFT;
+ size_t array_size = count * sizeof(struct page *);
int i;
void *addr;