linux-metag.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
To: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 2/2] test_user_copy: Silence 64-bit warnings for metag
Date: Tue, 4 Apr 2017 14:32:33 +0100	[thread overview]
Message-ID: <49d56e5b48ab413fc5a4ca4026de6b30ef9caa1e.1491312460.git-series.james.hogan@imgtec.com> (raw)
In-Reply-To: <cover.c5c212a41d664e63beef1da5333c9808074281ce.1491312460.git-series.james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>

Metag supports 64-bit user copy operations, but test_user_copy triggers
compiler warnings due to the 64-bit integer literals not fitting in a
long type:

lib/test_user_copy.c:117: warning: integer constant is too large for ‘long’ type

Use the ll suffix on the large integer literals to silence the warnings.

Signed-off-by: James Hogan <james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 lib/test_user_copy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/test_user_copy.c b/lib/test_user_copy.c
index 1a8d71a68531..9845d5e2cc21 100644
--- a/lib/test_user_copy.c
+++ b/lib/test_user_copy.c
@@ -114,7 +114,7 @@ static int __init test_user_copy_init(void)
 	test_legit(u16, 0x5a5b);
 	test_legit(u32, 0x5a5b5c5d);
 #ifdef TEST_U64
-	test_legit(u64, 0x5a5b5c5d6a6b6c6d);
+	test_legit(u64, 0x5a5b5c5d6a6b6c6dll);
 #endif
 #undef test_legit
 
@@ -172,7 +172,7 @@ static int __init test_user_copy_init(void)
 	test_illegal(u16, 0x5a5b);
 	test_illegal(u32, 0x5a5b5c5d);
 #ifdef TEST_U64
-	test_illegal(u64, 0x5a5b5c5d6a6b6c6d);
+	test_illegal(u64, 0x5a5b5c5d6a6b6c6dll);
 #endif
 #undef test_illegal
 
-- 
git-series 0.8.10

      parent reply	other threads:[~2017-04-04 13:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 13:32 [PATCH 0/2] metag/usercopy: Support 64-bit get_user James Hogan
     [not found] ` <cover.c5c212a41d664e63beef1da5333c9808074281ce.1491312460.git-series.james.hogan-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2017-04-04 13:32   ` [PATCH 1/2] metag/usercopy: Add 64-bit get_user support James Hogan
2017-04-04 13:32   ` James Hogan [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=49d56e5b48ab413fc5a4ca4026de6b30ef9caa1e.1491312460.git-series.james.hogan@imgtec.com \
    --to=james.hogan-1axoqhu6uovqt0dzr+alfa@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).