Re: ioremap return type

From: Abramo Bagnara (abramo@alsa-project.org)
Date: Thu Aug 10 2000 - 01:44:30 EDT

  • Next message: Matt: "[PATCH] Nvidia 0.9.4 drivers for XF86 4.0.1 w/ linux 2.4.0-test6"

    Philipp Rumpf wrote:
    >
    > On Wed, Aug 09, 2000 at 07:29:22PM +0100, Alan Cox wrote:
    > > > unsigned long ioremap(unsigned long base, long length);
    > > > void iounmap(unsigned long);
    > > >
    > > > we would solve (well, not solve, simply we'd show it ;-) a lot of
    > > > porting issue?
    > >
    > > I would agree with this .
    >
    > I doubt it's actually going to make a difference, except for creating dozens
    > of unnecessary compiler warnings. Making sure dereferencing ioremap's return

    I think that every warning issued would be a good hint for a possible
    porting issue.

    > pointer directly won't work would actually catch those bugs, as well as avoid
    > modifications to perfectly valid code - see acenic.c. As it's also just a

    If you look better to that code you will see that there the only needed
    changes is a cast for iounmap argument to avoid a warning, no more.

    > constant offset to the address, ideally, it shouldn't hurt performance very
    > much.

    ... but the problem is that it makes the debug harder and empiric (i.e.
    you'll see the bad effect only and if that specific code path is
    triggered) instead of static and easy (i.e. done at compile time
    following the warning track).

    > I don't see why any of this should happen before 2.5 though.

    ... because this is a debug strategy?

    -- 
    Abramo Bagnara                       mailto:abramo@alsa-project.org
    

    Opera Unica Via Emilia Interna, 140 Phone: +39.0546.656023 48014 Castel Bolognese (RA) - Italy Fax: +39.0546.656023

    ALSA project is http://www.alsa-project.org sponsored by SuSE Linux http://www.suse.com

    It sounds good!

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Thu Aug 10 2000 - 01:46:39 EDT