]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Merge branch 'drivers-net-update-tasklet_init-callers'
authorJakub Kicinski <kuba@kernel.org>
Tue, 2 Feb 2021 23:51:21 +0000 (15:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Feb 2021 23:51:22 +0000 (15:51 -0800)
commitc96b0a39705177eeef60246d084874936bf0b0e0
tree6d8c09fcef96e57b47ef62cee717a4f18ae4e263
parentd1e1355aefcc0cbda750a8931e93e1e04a5b0b6a
parent1999ad32d4ff00581007543adffc465694b2e77b
Merge branch 'drivers-net-update-tasklet_init-callers'

Emil Renner Berthing says:

====================
drivers: net: update tasklet_init callers

This updates the remaining callers of tasklet_init() in drivers/net
to the new API introduced in
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")

All changes are done by coccinelle using the following semantic patch.
Coccinelle needs a little help parsing drivers/net/arcnet/arcnet.c

@ match @
type T;
T *container;
identifier tasklet;
identifier callback;
@@
tasklet_init(&container->tasklet, callback, (unsigned long)container);

@ patch1 depends on match @
type match.T;
identifier match.tasklet;
identifier match.callback;
identifier data;
identifier container;
@@
-void callback(unsigned long data)
+void callback(struct tasklet_struct *t)
{
...
- T *container = (T *)data;
+ T *container = from_tasklet(container, t, tasklet);
...
}

@ patch2 depends on match @
type match.T;
identifier match.tasklet;
identifier match.callback;
identifier data;
identifier container;
@@
-void callback(unsigned long data)
+void callback(struct tasklet_struct *t)
{
...
- T *container;
+ T *container = from_tasklet(container, t, tasklet);
...
- container = (T *)data;
...
}

@ depends on (patch1 || patch2) @
match.T *container;
identifier match.tasklet;
identifier match.callback;
@@
- tasklet_init(&container->tasklet, callback, (unsigned long)container);
+ tasklet_setup(&container->tasklet, callback);
====================

Link: https://lore.kernel.org/r/20210130234730.26565-1-kernel@esmil.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>