public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bijosh Thykkoottathil <bijosh.thyks@gmail.com>
To: gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com
Cc: labbott@redhat.com, mitchelh@codeaurora.org,
	sumit.semwal@linaro.org, linux-kernel@vger.kernel.org,
	Bijosh Thykkoottathil <bijosh.thyks@gmail.com>
Subject: [PATCH 1/1] staging: android: ion: fixes spars warning cast to restricted gfp_t
Date: Mon, 21 Dec 2015 16:54:39 +0530	[thread overview]
Message-ID: <1450697079-31849-1-git-send-email-bjosh.thyks@gmail.com> (raw)

From: Bijosh Thykkoottathil <bijosh.thyks@gmail.com>

This patch fixes following sparse warnings:

drivers/staging/android/ion/ion.c:1475:21: warning: incorrect type in assignment (different base types)
drivers/staging/android/ion/ion.c:1475:21:    expected restricted gfp_t [usertype] gfp_mask
drivers/staging/android/ion/ion.c:1475:21:    got int
drivers/staging/android/ion/ion.c:1493:21: warning: incorrect type in assignment (different base types)
drivers/staging/android/ion/ion.c:1493:21:    expected restricted gfp_t [usertype] gfp_mask
drivers/staging/android/ion/ion.c:1493:21:    got int

Signed-off-by: Bijosh Thykkoottathil <bijosh.thyks@gmail.com>
---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index e237e9f..f986a58 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1472,7 +1472,7 @@ static int debug_shrink_set(void *data, u64 val)
 	struct shrink_control sc;
 	int objs;
 
-	sc.gfp_mask = -1;
+	sc.gfp_mask = (__force gfp_t)(-1);
 	sc.nr_to_scan = val;
 
 	if (!val) {
@@ -1490,7 +1490,7 @@ static int debug_shrink_get(void *data, u64 *val)
 	struct shrink_control sc;
 	int objs;
 
-	sc.gfp_mask = -1;
+	sc.gfp_mask = (__force gfp_t)(-1);
 	sc.nr_to_scan = 0;
 
 	objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
-- 
2.5.0


             reply	other threads:[~2015-12-21 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 11:24 Bijosh Thykkoottathil [this message]
2015-12-21 20:16 ` [PATCH 1/1] staging: android: ion: fixes spars warning cast to restricted gfp_t Laura Abbott

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=1450697079-31849-1-git-send-email-bjosh.thyks@gmail.com \
    --to=bijosh.thyks@gmail.com \
    --cc=arve@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitchelh@codeaurora.org \
    --cc=riandrews@android.com \
    --cc=sumit.semwal@linaro.org \
    /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