linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] drivers: net: update tasklet_init callers
@ 2021-01-30 23:47 Emil Renner Berthing
  2021-01-30 23:47 ` [PATCH 1/9] arcnet: use new tasklet API Emil Renner Berthing
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Emil Renner Berthing @ 2021-01-30 23:47 UTC (permalink / raw)
  To: netdev, linux-usb, linux-ppp
  Cc: Emil Renner Berthing, Michael Grzeschik, David S. Miller,
	Jakub Kicinski, Paul Mackerras, Woojung Huh, UNGLinuxDriver,
	Petko Manolov, Luc Van Oostenryck, Jing Xiangfeng, Oliver Neukum,
	linux-kernel

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);


Emil Renner Berthing (9):
  arcnet: use new tasklet API
  caif_virtio: use new tasklet API
  ifb: use new tasklet API
  ppp: use new tasklet API
  net: usb: hso: use new tasklet API
  net: usb: lan78xx: use new tasklet API
  net: usb: pegasus: use new tasklet API
  net: usb: r8152: use new tasklet API
  net: usb: rtl8150: use new tasklet API

 drivers/net/arcnet/arcnet.c    |  7 +++----
 drivers/net/caif/caif_virtio.c |  8 +++-----
 drivers/net/ifb.c              |  7 +++----
 drivers/net/ppp/ppp_async.c    |  8 ++++----
 drivers/net/ppp/ppp_synctty.c  |  8 ++++----
 drivers/net/usb/hso.c          | 10 +++++-----
 drivers/net/usb/lan78xx.c      |  6 +++---
 drivers/net/usb/pegasus.c      |  7 +++----
 drivers/net/usb/r8152.c        |  8 +++-----
 drivers/net/usb/rtl8150.c      |  6 +++---
 10 files changed, 34 insertions(+), 41 deletions(-)

-- 
2.30.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-02-03  4:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30 23:47 [PATCH 0/9] drivers: net: update tasklet_init callers Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 1/9] arcnet: use new tasklet API Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 2/9] caif_virtio: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 3/9] ifb: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 4/9] ppp: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 5/9] net: usb: hso: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 6/9] net: usb: lan78xx: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 7/9] net: usb: pegasus: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 8/9] net: usb: r8152: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 9/9] net: usb: rtl8150: " Emil Renner Berthing
2021-02-03  4:07 ` [PATCH 0/9] drivers: net: update tasklet_init callers Jakub Kicinski

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 NNTP newsgroup(s).