Linux backports project
 help / color / mirror / Atom feed
From: Stefan Assmann <sassmann@kpanic.de>
To: Johannes Berg <johannes@sipsolutions.net>,
	Julia Lawall <julia.lawall@lip6.fr>
Cc: "backports@vger.kernel.org" <backports@vger.kernel.org>
Subject: Re: cocci: multiple versions of function with different arguments
Date: Wed, 23 Apr 2014 14:36:40 +0200	[thread overview]
Message-ID: <5357B3D8.1040400@kpanic.de> (raw)
In-Reply-To: <1398255513.4173.9.camel@jlt4.sipsolutions.net>

On 23.04.2014 14:18, Johannes Berg wrote:
> On Wed, 2014-04-23 at 14:14 +0200, Julia Lawall wrote:
> 
>> I can think  about it, but it is pretty far from the vision of Coccinelle,
>> which is that the combination of context code and + code should be a valid
>> syntactic unit, and on the side that we don't think much about ifdefs.
>>
>> But I will think about it, because I can see that it is not a solvable
>> problem with the current technology.
> 
> Luis kinda solved it by introducing an intermediate function that would
> call the original, and then #ifdef'ing the assignment of the function
> instead.
> 
> (This is only a problem when there's a function assignment to start
> with, otherwise there's likely no need to modify the function
> declaration - this only comes up with function pointer APIs)
> 
> johannes
> 

Thanks Johannes and Julia. I think the missing semicolon is what caused
the issue. I'll do some tests and report back.

  Stefan

      reply	other threads:[~2014-04-23 12:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 10:27 cocci: multiple versions of function with different arguments Stefan Assmann
2014-04-23 10:41 ` Johannes Berg
2014-04-23 11:13   ` Stefan Assmann
2014-04-23 11:16     ` Johannes Berg
2014-04-23 18:27       ` Luis R. Rodriguez
2014-04-24 11:42         ` Stefan Assmann
2014-04-24 15:49           ` Luis R. Rodriguez
2014-04-23 12:07     ` Julia Lawall
2014-04-23 12:09       ` Johannes Berg
2014-04-23 12:14         ` Julia Lawall
2014-04-23 12:18           ` Johannes Berg
2014-04-23 12:36             ` Stefan Assmann [this message]

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=5357B3D8.1040400@kpanic.de \
    --to=sassmann@kpanic.de \
    --cc=backports@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=julia.lawall@lip6.fr \
    /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