From 30a378636e473278ff65800b1fe58822e36d716c Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 19 Sep 2018 11:02:27 +0200 Subject: backports: speed up netdev destructor spatch by two orders of magnitude As reported by Hauke, and analyzed by Julia, the netdev destructor spatch is really slow because <... ...> means 0 or more hits, and thus the spatch has to be applied on all files. However, we don't really need it to be this way, so use <+... ...+> which allows it to reject almost all files immediately, cutting down the processing time by more than two orders of magnitude as it only has to touch a handful of files, rather than all. Signed-off-by: Johannes Berg --- patches/0079-netdev-destructor.cocci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/0079-netdev-destructor.cocci b/patches/0079-netdev-destructor.cocci index 199aacf2..f2bea35b 100644 --- a/patches/0079-netdev-destructor.cocci +++ b/patches/0079-netdev-destructor.cocci @@ -5,11 +5,11 @@ identifier TRUE =~ "true"; @@ C(...) { - <... + <+... - NDEV->needs_free_netdev = TRUE; - NDEV->priv_destructor = D; + netdev_set_priv_destructor(NDEV, D); - ...> + ...+> } @r2 depends on r1@ -- cgit v1.2.3