[lkml]   [2005]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/5] Convert resource to u64 from unsigned long
On Thu, Jan 13, 2005 at 04:23:09PM -0800, Andrew Morton wrote:
> +#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
> We really should find a way of avoiding this. Even if it is
> #if BITS_PER_LONG == 64
> #define resource_to_ptr(r) ((void *)(r))
> #else
> #define resource_to_ptr(r) ((void *)((u32)r))
> #endif
> in a header file somewhere. Open-coding the decision all over the place is
> unsightly.

This is wrong anyway - ioremap() on these will give you __iomem pointers,
but cast like that looks very bogus.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:09    [W:0.038 / U:2.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site