All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Dmitry Safonov <d.safonov@partner.samsung.com>, dan.carpenter@oracle.com
Cc: kbuild@01.org, stefan.strogin@gmail.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	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: Re: [PATCH] mm-cma-add-functions-to-get-region-pages-counters-fix-3
Date: Wed, 08 Apr 2015 22:55:02 +0200	[thread overview]
Message-ID: <xa1tbniyfihl.fsf@mina86.com> (raw)
In-Reply-To: <1428522336-9020-1-git-send-email-d.safonov@partner.samsung.com>

On Wed, Apr 08 2015, Dmitry Safonov <d.safonov@partner.samsung.com> wrote:
> 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>

Acked-by: 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
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--

--
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>

      reply	other threads:[~2015-04-08 20:55 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 ` [PATCH] mm-cma-add-functions-to-get-region-pages-counters-fix-3 Dmitry Safonov
2015-04-08 20:55   ` Michal Nazarewicz [this message]

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=xa1tbniyfihl.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=a.mateosian@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=d.safonov@partner.samsung.com \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.