All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: cocci@inria.fr
Subject: Re: [cocci] Need some help with spatch
Date: Fri, 5 Nov 2021 22:24:11 +0100	[thread overview]
Message-ID: <b7d146ac-c493-db4a-a326-58bb37392634@suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2111052212190.3000@hadrien>

On 11/5/21 22:13, Julia Lawall wrote:
>> for example the cocci patch is supposed to change all "page" to "slab", but
>> some lines are patched like this:
>>
>> -       __free_slab(page->slab_cache, page);
>> +       __free_slab(page->slab_cache, slab);
> 
> I assume that here you are using the semantic patch in 184d9494c1a4.  I

Yes, that's the slub.cocci one from that commit.

> get that both occurrences of page are changed.  What version of Coccinelle
> do you have?

It's 1.1.0 in openSUSE Tumbleweed, so it should be the latest?

But that reminds me, yesterday I adjusted just that rule in the semantic
patch a bit and suddenly it converted almost everything. Today I re-ran
spatch for some rebasing reason and it again needed the fixup. I assumed
there was some git snafu on my part and the fixup was already applied.
But if it works differently for you, I'm not sure now. Is it possible
for the result to be non-deterministic? E.g. some internal state of
coccinelle is based on, say, hash table and in some cases the
non-deterministic order matters?

And just to be sure, does .config matter for coccinelle (through effects
on #ifdefs etc)? I assume it doesn't, if I don't use that switch to
perform preprocessing?

Thanks,
Vlastimil

> julia
> 


  reply	other threads:[~2021-11-05 21:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 16:12 [cocci] Need some help with spatch Vlastimil Babka
2021-11-05 16:20 ` Luis Chamberlain
2021-11-06  6:44   ` Julia Lawall
2021-11-07 23:08   ` Vlastimil Babka
2021-11-08 14:35     ` Vlastimil Babka
2021-11-08 14:45       ` Julia Lawall
2021-11-08 16:53         ` Vlastimil Babka
2021-11-08 17:01           ` Julia Lawall
2021-11-05 20:56 ` Julia Lawall
2021-11-05 21:13 ` Julia Lawall
2021-11-05 21:24   ` Vlastimil Babka [this message]
2021-11-05 21:27     ` Julia Lawall
2021-11-05 21:31 ` Julia Lawall
2021-11-05 21:32   ` Vlastimil Babka
2021-11-05 21:43 ` Julia Lawall
2021-11-05 21:59 ` Julia Lawall
2021-11-06 15:36 ` [cocci] mm/slab: mass conversion of struct page to struct slab by spatch Markus Elfring
2021-11-07 12:10 ` [cocci] mm/slab: prepare for struct patch conversion " Markus Elfring
2021-11-07 12:22   ` Julia Lawall
2021-11-07 12:50     ` [cocci] mm/slab: prepare for struct page " Markus Elfring
2021-11-07 13:18       ` Julia Lawall
2021-11-07 13:40         ` Markus Elfring
2021-11-07 17:50       ` Vlastimil Babka
2021-11-07 18:09         ` Julia Lawall
2021-11-08 17:35           ` Markus Elfring
2021-11-08 17:40             ` Julia Lawall
2021-11-08 23:35             ` Vlastimil Babka

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=b7d146ac-c493-db4a-a326-58bb37392634@suse.cz \
    --to=vbabka@suse.cz \
    --cc=cocci@inria.fr \
    --cc=julia.lawall@inria.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.