public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5][v5] include/linux: move typdef for uintptr_t
Date: Tue, 8 Dec 2015 08:45:55 -0800	[thread overview]
Message-ID: <56670943.70507@nxp.com> (raw)
In-Reply-To: <1449563070-5761-3-git-send-email-aneesh.bansal@freescale.com>



On 12/08/2015 12:24 AM, Aneesh Bansal wrote:
> uintptr_t which is a typdef for unsigned long is needed for creating
> pointers (32 or 64 bit depending on Core) from 32 bit variables
> storing the address.
> If a 32 bit variable (u32) is typecasted to a pointer (void *),
> compiler gives a warning in case size of pointer on the core is 64 bit.
> 
> The typdef has been moved from include/compiler.h to include/linux/types.h
> 
> Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
> ---
> Changes in v5:
> New patch instead of http://patchwork.ozlabs.org/patch/546319/
> 
> Changes in v4: None
> 
> Changes in v3: None
> 
> Changes in v2: None
> 
>  include/compiler.h    | 3 ---
>  include/linux/types.h | 1 +
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/include/compiler.h b/include/compiler.h
> index 47c296e..f853ed4 100644
> --- a/include/compiler.h
> +++ b/include/compiler.h
> @@ -115,9 +115,6 @@ typedef unsigned int uint;
>  #ifdef CONFIG_USE_STDINT
>  /* Provided by gcc. */
>  #include <stdint.h>
> -#else
> -/* Type for `void *' pointers. */
> -typedef unsigned long int uintptr_t;
>  #endif
>  
>  #include <linux/string.h>
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 6f75be4..c7e8fdb 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -124,6 +124,7 @@ typedef		__UINT64_TYPE__	u_int64_t;
>  typedef		__INT64_TYPE__		int64_t;
>  #endif
>  
> +typedef unsigned long uintptr_t;
>  /*
>   * Below are truly Linux-specific types that should never collide with
>   * any application/library that wants linux/types.h.
> 

Tom,

Please help review this change. I can compile test for power and arm but I don't
have the setup for other platforms.

York

  reply	other threads:[~2015-12-08 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08  8:24 [U-Boot] [PATCH 1/5][v5] armv8: define usec2ticks function Aneesh Bansal
2015-12-08  8:24 ` [U-Boot] [PATCH 2/5][v5] armv8: Make SEC read/write as snoopable for LS1043 Aneesh Bansal
2015-12-15  1:07   ` York Sun
2015-12-08  8:24 ` [U-Boot] [PATCH 3/5][v5] include/linux: move typdef for uintptr_t Aneesh Bansal
2015-12-08 16:45   ` York Sun [this message]
2015-12-14  2:08     ` York Sun
2015-12-14  2:10     ` York Sun
2015-12-15  1:07   ` York Sun
2015-12-16  3:48   ` York Sun
2015-12-08  8:24 ` [U-Boot] [PATCH 4/5][v5] armv8/ls1043ardb: add SECURE BOOT target for NOR Aneesh Bansal
2015-12-15  1:10   ` York Sun
2015-12-08  8:24 ` [U-Boot] [PATCH 5/5][v5] drivers/crypto/fsl: fix endianness issue in RNG Aneesh Bansal
2015-12-15  1:12   ` York Sun
2015-12-15  1:06 ` [U-Boot] [PATCH 1/5][v5] armv8: define usec2ticks function York Sun

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=56670943.70507@nxp.com \
    --to=york.sun@nxp.com \
    --cc=u-boot@lists.denx.de \
    /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