Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: omap: fix warning with LPAE build
Date: Wed, 13 Nov 2013 12:05:27 -0800	[thread overview]
Message-ID: <20131113200527.GA10317@atomide.com> (raw)
In-Reply-To: <1384325630-26998-1-git-send-email-olof@lixom.net>

* Olof Johansson <olof@lixom.net> [131112 22:53]:
> Some omap3 code is throwing a warning:
> arch/arm/mach-omap2/pm34xx.c: In function 'omap3_save_secure_ram_context':
> arch/arm/mach-omap2/pm34xx.c:123:32: warning: cast to pointer from
>   integer of different size [-Wint-to-pointer-cast]
> 
> In reality this code will never actually execute with LPAE=y, since
> Cortex-A8 doesn't support it. So downcasting the __pa() is safe in
> this case.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
> 
> Tony, queue up if you have a fixes branch please, otherwise I can apply
> directly.
> 
>  arch/arm/mach-omap2/pm34xx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 93b80e5..1f3770a 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -120,7 +120,7 @@ static void omap3_save_secure_ram_context(void)
>  		 * will hang the system.
>  		 */
>  		pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
> -		ret = _omap_save_secure_sram((u32 *)
> +		ret = _omap_save_secure_sram((u32 *)(unsigned long)
>  				__pa(omap3_secure_ram_storage));
>  		pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
>  		/* Following is for error tracking, it should not happen */

Hmm maybe the function prototype should be changed instead if
it takes the physical address.

How do you you reproduce this warning? I did not get it after
enabling LPAE in multi_v7_defconfig with current mainline.

Regards,

Tony

  reply	other threads:[~2013-11-13 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  6:53 [PATCH] ARM: omap: fix warning with LPAE build Olof Johansson
2013-11-13 20:05 ` Tony Lindgren [this message]
2013-11-13 20:31   ` Olof Johansson
2013-11-13 21:22     ` Olof Johansson
2013-11-13 21:56       ` Tony Lindgren
2013-11-17 22:30         ` Olof Johansson

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=20131113200527.GA10317@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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