mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@gmail.com>
To: Julia Lawall <julia@diku.dk>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Nicolas Palix <npalix@diku.dk>
Subject: Re: Typedef removal tool
Date: Wed, 12 Aug 2009 00:45:35 -0700	[thread overview]
Message-ID: <43e72e890908120045s6e94bd5es480bb4ef1a66597c@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0908120659001.32131@ask.diku.dk>

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

  reply	other threads:[~2009-08-12  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 21:18 Luis R. Rodriguez
2009-08-12  5:01 ` Julia Lawall
2009-08-12  7:45   ` Luis R. Rodriguez [this message]
2009-08-12 12:23     ` Nicolas Palix
2009-08-12 15:45       ` Luis R. Rodriguez
2009-08-12 15:57         ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43e72e890908120045s6e94bd5es480bb4ef1a66597c@mail.gmail.com \
    --to=mcgrof@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npalix@diku.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®