dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Michael Qiu <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [PATCH 2/2] Fix compile issue of eal with icc compile
Date: Wed, 10 Dec 2014 18:46:42 +0800	[thread overview]
Message-ID: <1418208402-7597-3-git-send-email-michael.qiu@intel.com> (raw)
In-Reply-To: <1418208402-7597-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

lib/librte_eal/linuxapp/eal/eal.c(461): error #2259: non-pointer
conversion from "long long" to "void *" may lose significant bits
   RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M);

The root cause is that "RTE_PGSIZE_16M" is defined as unsigned long long.
But in i686 platform "void *" is 32-bit.
It is safe to cast to size_t and make it works in both 32 & 64-bit
platform.

Signed-off-by: Michael Qiu <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 40b462e..37e4419 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -458,7 +458,7 @@ eal_parse_base_virtaddr(const char *arg)
 	 * it can align to 2MB for x86. So this alignment can also be used
 	 * on x86 */
 	internal_config.base_virtaddr =
-		RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M);
+		RTE_PTR_ALIGN_CEIL((uintptr_t)addr, (size_t)RTE_PGSIZE_16M);
 
 	return 0;
 }
-- 
1.9.3

  parent reply	other threads:[~2014-12-10 10:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1417329845-7482-1-git-send-email-michael.qiu@intel.com>
     [not found] ` <1417594223-2573-1-git-send-email-michael.qiu@intel.com>
2014-12-03 11:32   ` [PATCH v2] Fix two compile issues with i686 platform Qiu, Michael
     [not found]   ` <1417594223-2573-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-03 15:40     ` Bruce Richardson
2014-12-04  2:49       ` Qiu, Michael
     [not found]         ` <533710CFB86FA344BFBF2D6802E60286C9C8C7-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-04  9:03           ` Thomas Monjalon
2014-12-04 10:21             ` Qiu, Michael
     [not found]               ` <533710CFB86FA344BFBF2D6802E60286C9CB12-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-04  9:12                 ` [PATCH v3] " Michael Qiu
2014-12-05  6:56                   ` Qiu, Michael
     [not found]                     ` <533710CFB86FA344BFBF2D6802E60286C9D074-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-05  7:04                       ` Chao Zhu
     [not found]                   ` <1417684369-21330-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-05  8:31                     ` Chao Zhu
     [not found]                       ` <54816D73.1020906-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-12-05 14:22                         ` Neil Horman
     [not found]                           ` <20141205142205.GB29245-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-12-05 15:02                             ` Bruce Richardson
2014-12-05 15:24                               ` Neil Horman
2014-12-08  2:46                                 ` Qiu, Michael
     [not found]                                   ` <533710CFB86FA344BFBF2D6802E60286C9D736-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-08  2:59                                     ` Neil Horman
2014-12-08  3:37                                       ` Qiu, Michael
2014-12-08  4:57                                         ` Qiu, Michael
     [not found]                                         ` <533710CFB86FA344BFBF2D6802E60286C9D78A-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-08 11:37                                           ` Neil Horman
     [not found]                                             ` <20141208113738.GA18697-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-12-08 11:50                                               ` Thomas Monjalon
2014-12-08 14:59                                             ` Qiu, Michael
2014-12-10 10:46                     ` [PATCH 0/2 v4] " Michael Qiu
     [not found]                       ` <1418208402-7597-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-12-10 10:46                         ` [PATCH 1/2 v4] Fix compile issue with hugepage_sz in 32-bit system Michael Qiu
2014-12-10 10:46                         ` Michael Qiu [this message]
2014-12-11  0:56                         ` [PATCH 0/2 v4] Fix two compile issues with i686 platform Thomas Monjalon
2014-12-11 13:25                           ` Neil Horman
2014-12-11 15:28                             ` Qiu, Michael
     [not found]                               ` <533710CFB86FA344BFBF2D6802E60286C9EEB1-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-12-11 21:21                                 ` Thomas Monjalon
2014-12-12 11:38                                   ` Neil Horman
     [not found]                                     ` <20141212113824.GA14102-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-12-12 15:09                                       ` Thomas Monjalon
2014-12-12 15:29                                         ` Neil Horman

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=1418208402-7597-3-git-send-email-michael.qiu@intel.com \
    --to=michael.qiu-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@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 NNTP newsgroup(s).