From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH] acpiphp: Match the variable types for ia64 Date: Fri, 12 Sep 2008 12:32:13 -0600 Message-ID: <20080912183213.GH10844@parisc-linux.org> References: <200510232100.j9NL0MWA030225@shell0.pdx.osdl.net> <20080910002011.GF2772@parisc-linux.org> <20080910074940.GA12737@ldl.fc.hp.com> <200809101103.55222.jbarnes@virtuousgeek.org> <20080911104345.GL2772@parisc-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: "Chen, Justin" Cc: Jesse Barnes , "Chiang, Alexander" , "kristen.c.accardi@intel.com" , "linux-pci@vger.kernel.org" , linux-acpi@vger.kernel.org, Len Brown List-Id: linux-acpi@vger.kernel.org On Fri, Sep 12, 2008 at 05:03:50PM +0000, Chen, Justin wrote: > >> slot->device = device; > >> - slot->sun = sun; > >> + slot->sun = (u64) sun; > > > >No ... the right thing to do here is make the local variable > >'sun' a u64. adr ought to be a u32, not an unsigned long. > > If I understand your concern right, you want to change the local > variable 'sun' in the routine register_slot() in the file acpiphp_glue.c > from unsigned long to u64. If that's the case, it will introduce the > other issue that since the 'sun' is passed as the argument 4 of the > routine acpi_evaluate_integer() and it is taking the unsigned long, > what's the point to define 'sun' in u64? Ooh, I think you've found a bug in the ACPI-CA. Consider this: /* * Acpi integer width. In ACPI version 1, integers are 32 bits. In ACPI * version 2, integers are 64 bits. Note that this pertains to the ACPI integer * type only, not other integers used in the implementation of the ACPI CA * subsystem. */ typedef unsigned long long acpi_integer; and compare and contrast it with this: acpi_status acpi_evaluate_integer(acpi_handle handle, acpi_string pathname, struct acpi_object_list *arguments, unsigned long *data); I would argue 'data' should be an 'acpi_integer *', not an 'unsigned long *' Len? -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."