Linux virtualization list
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: virtualization <virtualization@lists.osdl.org>
Subject: Re: someone screwed something up
Date: Tue, 27 Mar 2007 11:26:09 +1000	[thread overview]
Message-ID: <1174958769.12230.16.camel@localhost.localdomain> (raw)
In-Reply-To: <20070326011447.35d121de.akpm@linux-foundation.org>

On Mon, 2007-03-26 at 01:14 -0800, Andrew Morton wrote:
> arch/i386/lguest/lguest.c:496: warning: assignment from incompatible pointer type
> arch/i386/lguest/lguest.c:497: warning: assignment from incompatible pointer type
> arch/i386/lguest/lguest.c:498: warning: assignment from incompatible pointer type
> 
>         paravirt_ops.write_ldt_entry = lguest_write_ldt_entry;
>         paravirt_ops.write_gdt_entry = lguest_write_gdt_entry;
>         paravirt_ops.write_idt_entry = lguest_write_idt_entry;

And here it is:
==
The prototype for paravirt_ops write_lgt_entry, write_gdt_entry and
write_idt_entry was type-corrected, so change lguest to match.  We can
also use the "write_dt_entry" which was exported by that same cleanup
patch, rather than write our own.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r f52fef6a1f2d arch/i386/lguest/lguest.c
--- a/arch/i386/lguest/lguest.c	Mon Mar 26 10:16:33 2007 +1000
+++ b/arch/i386/lguest/lguest.c	Tue Mar 27 10:59:21 2007 +1000
@@ -362,30 +362,24 @@ static void __init lguest_init_IRQ(void)
 	irq_ctx_init(smp_processor_id());
 }
 
-static inline void native_write_dt_entry(void *dt, int entry, u32 entry_low, u32 entry_high)
-{
-	u32 *lp = (u32 *)((char *)dt + entry*8);
-	lp[0] = entry_low;
-	lp[1] = entry_high;
-}
-
-static fastcall void lguest_write_ldt_entry(void *dt, int entrynum, u32 low, u32 high)
+static fastcall void lguest_write_ldt_entry(struct desc_struct *dt,
+					    int entrynum, u32 low, u32 high)
 {
 	/* FIXME: Allow this. */
 	BUG();
 }
 
-static fastcall void lguest_write_gdt_entry(void *dt, int entrynum,
-					   u32 low, u32 high)
-{
-	native_write_dt_entry(dt, entrynum, low, high);
+static fastcall void lguest_write_gdt_entry(struct desc_struct *dt,
+					    int entrynum, u32 low, u32 high)
+{
+	write_dt_entry(dt, entrynum, low, high);
 	hcall(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES, 0);
 }
 
-static fastcall void lguest_write_idt_entry(void *dt, int entrynum,
-					   u32 low, u32 high)
-{
-	native_write_dt_entry(dt, entrynum, low, high);
+static fastcall void lguest_write_idt_entry(struct desc_struct *dt,
+					    int entrynum, u32 low, u32 high)
+{
+	write_dt_entry(dt, entrynum, low, high);
 	hcall(LHCALL_LOAD_IDT_ENTRY, entrynum, low, high);
 }
 

           reply	other threads:[~2007-03-27  1:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20070326011447.35d121de.akpm@linux-foundation.org>]

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=1174958769.12230.16.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=virtualization@lists.osdl.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