Re: cocci: multiple versions of function with different arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 23, 2014 at 4:16 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
>> If for some reason cocci should have a problem with this the fallback
>> to a define is a good idea.
>
> I don't disagree that we might have to solve this cocci problem, but I
> would much prefer the define over the cocci patch as it leaves the
> output code closer to the input code, which can be important for some
> use cases (e.g. ours - development based on a backport tree.)

Coccinelle has a slight overhead cost in comparison to using our
headers through defines, static inlines, or a new exported symbol on
the backports module (called compat now). The code generation cost is
is O(0) for a backport done through the headers / backports module,
using Coccinelle we have a slight overhead before compile time, during
code generation time. We want to minimize this as much as possible.
Because of this I would also prefer a define for the example use case
unless there's another reason that a define or a new symbol cannot be
used. We should use Coccinelle to try to solve backports for solutions
we didn't have strategies for, that is we should strive to backport
first through the backports module / header files, then as a second
step consider Coccinelle, and only if Coccinelle cannot solve our
backports we leave nasty legacy patches lying around.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux