linux-um archives
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Joe Perches <joe@perches.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	Jiri Kosina <trivial@kernel.org>, Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"user-mode-linux-devel@lists.sourceforge.net"
	<user-mode-linux-devel@lists.sourceforge.net>,
	"user-mode-linux-user@lists.sourceforge.net"
	<user-mode-linux-user@lists.sourceforge.net>
Subject: Re: [TRIVIAL PATCH 16/26] x86: Convert print_symbol to %pSR
Date: Thu, 13 Dec 2012 19:37:00 +0100	[thread overview]
Message-ID: <20121213183659.GC31485@liondog.tnic> (raw)
In-Reply-To: <1355422990.13796.9.camel@joe-AO722>

On Thu, Dec 13, 2012 at 10:23:10AM -0800, Joe Perches wrote:
> m->ip is a u64 so, when compiling x86-32, there's a new warning
> "cast to pointer from integer of different size".  This isn't new
> different behavior, just a new warning.  The previous print_symbol
> took a ulong and the u64 was silently truncated.
> 
>   CC      arch/x86/kernel/cpu/mcheck/mce.o
> arch/x86/kernel/cpu/mcheck/mce.c: In function ‘print_mce’:
> arch/x86/kernel/cpu/mcheck/mce.c:246:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 
> If appropriate, the code could be changed to
> 
> 	(void *)(unsigned long)m->ip

Can we explicitly cast it to what it is so that we can be explicit as to
what we're casting it? IOW:

	(void *)(__u64)m->ip;

Does that even work on 32bit?

Also, does the compiler bitch about this useless cast when building with
W=123?

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2012-12-13 18:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 18:18 [TRIVIAL PATCH 00/26] treewide: Add and use vsprintf extension %pSR Joe Perches
2012-12-12 18:19 ` [TRIVIAL PATCH 14/26] um: Convert print_symbol to %pSR Joe Perches
2012-12-12 18:19 ` [TRIVIAL PATCH 16/26] x86: " Joe Perches
2012-12-12 21:09   ` Borislav Petkov
2012-12-12 21:30     ` Joe Perches
2012-12-12 21:48       ` Borislav Petkov
2012-12-12 21:49       ` Luck, Tony
2012-12-12 22:23         ` Joe Perches
2012-12-12 22:45           ` Borislav Petkov
2012-12-13 18:23             ` Joe Perches
2012-12-13 18:37               ` Borislav Petkov [this message]
2012-12-13 18:42                 ` H. Peter Anvin
2012-12-13 19:05                   ` Borislav Petkov
2012-12-13 21:35                     ` H. Peter Anvin
2012-12-13 18:57                 ` Joe Perches
2012-12-13 19:13 ` [TRIVIAL PATCH V2 " Joe Perches

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=20121213183659.GC31485@liondog.tnic \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jdike@addtoit.com \
    --cc=joe@perches.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=trivial@kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    --cc=x86@kernel.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