lkml.org 
[lkml]   [2005]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/5] Convert resource to u64 from unsigned long


    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/

    \
     
     \ /
      Last update: 2009-11-18 23:46    [W:0.042 / U:0.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site