All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning safter merge of the swiotlb-xen tree
@ 2011-01-21  1:41 Stephen Rothwell
  2011-01-21  8:55 ` Stefan Bader
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2011-01-21  1:41 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: linux-next, linux-kernel, Stefan Bader

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

Hi Konrad,

After merging the swiotlb-xen tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:

arch/x86/xen/p2m.c: In function 'xen_build_dynamic_phys_to_machine':
arch/x86/xen/p2m.c:251: warning: passing argument 1 of 'p2m_init' from incompatible pointer type
arch/x86/xen/p2m.c:121: note: expected 'long unsigned int *' but argument is of type 'long unsigned int **'
arch/x86/xen/p2m.c:254: warning: assignment makes pointer from integer without a cast
arch/x86/xen/p2m.c:256: warning: assignment from incompatible pointer type

Introduced by commit fc0976e2c086e6e518e32dcafedb5a2ba3ea297d ("xen: p2m:
correctly initialize partial p2m leave").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: build warning safter merge of the swiotlb-xen tree
  2011-01-21  1:41 linux-next: build warning safter merge of the swiotlb-xen tree Stephen Rothwell
@ 2011-01-21  8:55 ` Stefan Bader
  2011-01-21 14:28   ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Bader @ 2011-01-21  8:55 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Konrad Rzeszutek Wilk, linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

On 01/21/2011 02:41 AM, Stephen Rothwell wrote:
> Hi Konrad,
> 
> After merging the swiotlb-xen tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
> 
> arch/x86/xen/p2m.c: In function 'xen_build_dynamic_phys_to_machine':
> arch/x86/xen/p2m.c:251: warning: passing argument 1 of 'p2m_init' from incompatible pointer type
> arch/x86/xen/p2m.c:121: note: expected 'long unsigned int *' but argument is of type 'long unsigned int **'
> arch/x86/xen/p2m.c:254: warning: assignment makes pointer from integer without a cast
> arch/x86/xen/p2m.c:256: warning: assignment from incompatible pointer type
> 
> Introduced by commit fc0976e2c086e6e518e32dcafedb5a2ba3ea297d ("xen: p2m:
> correctly initialize partial p2m leave").
> 
Sorry about that. For some reason I was blinded to the fact that p2m holds longs
not pointers. And "unfortunately" it works either way. The following update
would remove the warnings. Not sure it can still be folded into the original patch.

-Stefan



[-- Attachment #2: 0002-xen-p2m-Use-the-correct-type-for-p2m-page.patch --]
[-- Type: text/x-diff, Size: 1179 bytes --]

>From fc26a9b0a6b87ee7d5d7cef77664c0d58bfc9761 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Fri, 21 Jan 2011 09:46:07 +0100
Subject: [PATCH 2/2] xen: p2m: Use the correct type for p2m page

In "xen: p2m: correctly initialize partial p2m leave" I introduced new
compiler warnings by using unsigned long ** instead of unsigned long *
for the 3rd level tree structure. Due to the nature of pointers and long
this works practically but it should be done right.

BugLink: http://bugs.launchpad.net/bugs/686692

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 arch/x86/xen/p2m.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index c9307ec..ddc81a0 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -247,7 +247,7 @@ void __init xen_build_dynamic_phys_to_machine(void)
 		 */
 		if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) {
 			unsigned long p2midx;
-			unsigned long **p2m = extend_brk(PAGE_SIZE, PAGE_SIZE);
+			unsigned long *p2m = extend_brk(PAGE_SIZE, PAGE_SIZE);
 			p2m_init(p2m);
 
 			for (p2midx = 0; pfn + p2midx < max_pfn; p2midx++) {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: linux-next: build warning safter merge of the swiotlb-xen tree
  2011-01-21  8:55 ` Stefan Bader
@ 2011-01-21 14:28   ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-01-21 14:28 UTC (permalink / raw)
  To: Stefan Bader; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Fri, Jan 21, 2011 at 09:55:00AM +0100, Stefan Bader wrote:
> On 01/21/2011 02:41 AM, Stephen Rothwell wrote:
> > Hi Konrad,
> > 
> > After merging the swiotlb-xen tree, today's linux-next build (x86_64
> > allmodconfig) produced these warnings:
> > 
> > arch/x86/xen/p2m.c: In function 'xen_build_dynamic_phys_to_machine':
> > arch/x86/xen/p2m.c:251: warning: passing argument 1 of 'p2m_init' from incompatible pointer type
> > arch/x86/xen/p2m.c:121: note: expected 'long unsigned int *' but argument is of type 'long unsigned int **'
> > arch/x86/xen/p2m.c:254: warning: assignment makes pointer from integer without a cast
> > arch/x86/xen/p2m.c:256: warning: assignment from incompatible pointer type
> > 
> > Introduced by commit fc0976e2c086e6e518e32dcafedb5a2ba3ea297d ("xen: p2m:
> > correctly initialize partial p2m leave").
> > 
> Sorry about that. For some reason I was blinded to the fact that p2m holds longs
> not pointers. And "unfortunately" it works either way. The following update
> would remove the warnings. Not sure it can still be folded into the original patch.

No trouble. Folded it in the original patch you submitted and fixed the tree up.

Thank you for being diligent about this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-21 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21  1:41 linux-next: build warning safter merge of the swiotlb-xen tree Stephen Rothwell
2011-01-21  8:55 ` Stefan Bader
2011-01-21 14:28   ` Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.