Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261827AbVANAo0 (ORCPT ); Thu, 13 Jan 2005 19:44:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261730AbVANAoV (ORCPT ); Thu, 13 Jan 2005 19:44:21 -0500 Received: from fw.osdl.org ([65.172.181.6]:4534 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261836AbVANAoF (ORCPT ); Thu, 13 Jan 2005 19:44:05 -0500 Date: Thu, 13 Jan 2005 16:43:58 -0800 (PST) From: Linus Torvalds To: Andrew Morton cc: Dave , linux-kernel@vger.kernel.org, smaurer@teja.com, linux@arm.linux.org.uk, dsaxena@plexity.net, drew.moseley@intel.com, mporter@kernel.crashing.org Subject: Re: [PATCH 1/5] Convert resource to u64 from unsigned long In-Reply-To: <20050113162309.2a125eb1.akpm@osdl.org> Message-ID: References: <8746466a050113152636f49d18@mail.gmail.com> <20050113162309.2a125eb1.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 715 Lines: 22 On Thu, 13 Jan 2005, Andrew Morton wrote: > > Also, the patches introduce tons of ifdefs such as: > > +#if BITS_PER_LONG == 64 > return (void __iomem *)pci_resource_start(pdev, PCI_ROM_RESOURCE); > +#else > + return (void __iomem *)(u32)pci_resource_start(pdev, PCI_ROM_RESOURCE); > +#endif Ouch. Who does that, anyway? It's wrong to do that. It's not a pointer, not even an __iomem one. You'd need to do an ioremap() on it to turn it into a pointer. Linus - 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/