lkml.org 
[lkml]   [2009]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Typedef removal tool
    On Tue, Aug 11, 2009 at 10:01 PM, Julia Lawall<julia@diku.dk> wrote:
    > On Tue, 11 Aug 2009, Luis R. Rodriguez wrote:
    >
    >> Anyone know if there is a typedef removal tool? When porting drivers
    >> this needs to be done quite often.
    >>
    >> FWIW I've started porting some driver and have come across some tools,
    >> or written my own scripts, which have helped. Using spatch to port a
    >> driver was such a tool I explored. I think I'll try to put together
    >> some info on the driver project wiki for this. typdef removal tool
    >> would still be neat.
    >
    > Nicolas Palix (in CC) did a bit of work on this recently using Coccinelle,
    > but the problem is that simply removing the typedef is not enough, one has
    > to come up with a name that is within the spirit of the names used in
    > Linux, or perhaps recognize that the structure in question already exists
    > in a more general form in the kernel an thus the declaration should be
    > removed completely.
    >
    > Someone else made a dedicated tool using a dictionary of the old and new
    > names that at least partially addresses these problems.  Nicolas knows who
    > that person is.

    Sounds like a very proper way to do this.

    I wrote something not-so-proper and simple based on Joe's work that
    just replaces a specified typedef name with one the user specifies.
    Should do it for simple porting where you do not have to prove
    correctness and avoid namespace collisions.

    Luis
    --
    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-08-12 09:49    [W:0.022 / U:92.212 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site