Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: cocci <cocci@inria.fr>
Subject: [cocci] possible regressions in 1.1.1 -> 1.2
Date: Thu, 06 Feb 2025 10:31:10 +0100	[thread overview]
Message-ID: <381b5a9cb89cc068ca13546f69636291874010b3.camel@sipsolutions.net> (raw)

Hi,

We have an spatch (fragment) like this:

@@
identifier wiphy, dev, peer, link_id, action_code, dialog_token, status_code, peer_capability, initiator, extra_ies, extra_ies_len;
type u8;
@@
int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, const u8 *peer,
-int link_id,
u8 action_code, u8 dialog_token, u16 status_code,
u32 peer_capability, bool initiator,
const u8 *extra_ies, size_t extra_ies_len);


that should remove the link_id argument from the function declaration in
the Linux kernel in net/mac80211/ieee80211_i.h (for some backport
purposes, [1]).

With "spatch version 1.1.1 compiled with OCaml version 4.14.2" this
works just fine; however, we're trying to upgrade our dependencies and
now with "spatch version 1.2 compiled with OCaml version 5.2.0" it
doesn't match anything any more? I can't seem to figure out why, I
thought maybe the types didn't match - not sure why we had added type u8
to that, but pretty sure it was needed - but adding more types didn't
really help either.



There's a second issue: we have this
spatch: https://p.sipsolutions.net/765e55f2b951326c.txt
It's not pretty, but it's intended to (again for backport reasons)
manipulate some code in net/mac80211/cfg.c (see also [1]). We run all
our spatches with --include-headers, and this one when running on
net/mac80211/ieee80211_i.h, goes into some kind of infinite loop? I.e.
just

spatch --include-headers --in-place --sp-file /tmp/765e55f2b951326c.txt net/mac80211/ieee80211_i.h

never finishes?


Any thoughts?

Thanks,
johannes


[1] there's another fragment that removes the variable from the function
but I think net/mac80211/cfg.c really only gets parsed properly when we
first patch out the CFG80211_TESTMODE_CMD/CFG80211_TESTMODE_DUMP lines
from the struct cfg80211_ops mac80211_config_ops declaration. Anyway,
the above is already an issue.


             reply	other threads:[~2025-02-06  9:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06  9:31 Johannes Berg [this message]
2025-02-06  9:48 ` [cocci] possible regressions in 1.1.1 -> 1.2 Johannes Berg
2025-02-06  9:53   ` Victor Gambier
2025-02-06 10:00     ` Johannes Berg
2025-02-06 12:36     ` Markus Elfring
2025-02-06  9:59   ` Julia Lawall
2025-02-06 10:07     ` Johannes Berg
2025-02-06 10:12       ` Johannes Berg
2025-02-06 13:34         ` Markus Elfring
2025-02-06 10:13       ` Julia Lawall
2025-02-06 10:17         ` Johannes Berg
2025-02-06 13:46           ` Markus Elfring
2025-02-06 13:00         ` Markus Elfring
2025-02-06 16:50       ` Markus Elfring
2025-02-08 11:26       ` [cocci] Checking SmPL test cases? Markus Elfring
2025-02-08 11:58         ` Julia Lawall
2025-02-08 12:51           ` Markus Elfring
2025-02-08 14:28           ` Markus Elfring
2025-02-08 15:43             ` Julia Lawall
2025-02-09  8:42               ` Markus Elfring
2025-02-07  7:43     ` [cocci] Checking software run time characteristics Markus Elfring
2025-02-07  7:55       ` Julia Lawall
2025-02-07  8:15         ` Markus Elfring
2025-02-07  8:59           ` Johannes Berg
2025-02-07  9:50             ` Markus Elfring
2025-02-11  9:58 ` [cocci] possible regressions in 1.1.1 -> 1.2 Victor Gambier
2025-02-11 10:33   ` [cocci] Comparing software run time characteristics Markus Elfring
2025-02-12  9:52   ` [cocci] Profiling of SmPL code? Markus Elfring

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=381b5a9cb89cc068ca13546f69636291874010b3.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=cocci@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).