On Fri, Jul 30, 2021 at 7:00 AM Andrew 👽 Yourtchenko
wrote:
>
> However, when I run it, the "done: " label, etc. gets inserted twice:
Every return statement is the end of a function. ;)
I don't know of a way to match only the "last" return statement in a
function, maybe with scripting...
___
On Thu, Apr 1, 2021 at 4:13 AM Michael Walle wrote:
>
> Hi,
>
> so first I need to say I've never used coccinelle before,
> so please bear with me ;)
>
> To make of_get_mac_address() work with DSA ports (and a nvmem
> provider) I'd need to change the semantics of of_get_mac_address().
> Right now
On Sun, Mar 14, 2021, 20:43 Thomas Adam wrote:
> Hello,
>
> I can see I was as clear as mud with my explanation -- apologies for
> that, so let me try again.
>
> In my original example:
>
> struct monitor {
> struct {
> int width;
> int height
> } virtual;
> };
>
> ... the
On Tue, Mar 2, 2021 at 4:22 PM Joe Perches wrote:
>
> Here is a possible opportunity to reduce data usage in the kernel.
>
> $ git grep -P -n '^static\s+(?!const|struct)(?:\w+\s+){1,3}\w+\s*\[\s*\]'
> drivers/ | \
> grep -v __initdata | \
> wc -l
> 3250
>
> Meaning there are ~3000 declaration
On Wed, Jan 27, 2021 at 3:23 PM James K. Lowden
wrote:
>
> I don't understand how, if it's possible, to qualify a function in a
> rule. I want the class of all functions having a parameter of a
> particular type.
>
> The code I'm working with has hundreds of unnecessary casts. Many
> functions t
On Fri, Oct 23, 2020 at 11:00 AM Markus Elfring wrote:
>
> > I'd like to add a statement after another within a preprocessor expression,
>
> How do you think about to refer to a “#define directive”?
I mean, not specifically in the #define, but anywhere.
(I don't try to patch preprocessor directi
Hi,
I'd like to add a statement after another within a preprocessor
expression, but spatch adds the line without an escape (backslash).
x.c:
#define X(a) x(a);
(I know the above is not technically correct but it's super common.)
x.cocci:
@@
expression e;
@@
x(e);
+
On Sat, Jul 15, 2017 at 2:59 AM, Julia Lawall wrote:
>
> What version of Coccinelle do you have? It seems that in the github
> version this problem is already fixed.
>
> julia
I was using version 1.0.6. With --disable-worth-trying-opt it works.
I updated to the latest version and that works per
Hi everyone,
I'm trying to add the const qualifier to variables of a certain type,
except for a few.
For example, I'd like to modify this program:
void foo(void) {
int a = 1;
int b = 2;
int c = 3;
int d = 4;
}
to:
void foo(void) {
const int a
Voted. Best of luck, I hope you win!
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
10 matches
Mail list logo