All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Renner Berthing <kernel@esmil.dk>
To: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-ppp@vger.kernel.org
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Petko Manolov <petkan@nucleusys.com>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Jing Xiangfeng <jingxiangfeng@huawei.com>,
	Oliver Neukum <oneukum@suse.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/9] drivers: net: update tasklet_init callers
Date: Sun, 31 Jan 2021 00:47:21 +0100	[thread overview]
Message-ID: <20210130234730.26565-1-kernel@esmil.dk> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Emil Renner Berthing <kernel@esmil.dk>
To: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-ppp@vger.kernel.org
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Petko Manolov <petkan@nucleusys.com>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Jing Xiangfeng <jingxiangfeng@huawei.com>,
	Oliver Neukum <oneukum@suse.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/9] drivers: net: update tasklet_init callers
Date: Sat, 30 Jan 2021 23:47:21 +0000	[thread overview]
Message-ID: <20210130234730.26565-1-kernel@esmil.dk> (raw)

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

             reply	other threads:[~2021-01-31  0:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 23:47 Emil Renner Berthing [this message]
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   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 2/9] caif_virtio: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 3/9] ifb: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 4/9] ppp: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 5/9] net: usb: hso: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 6/9] net: usb: lan78xx: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 7/9] net: usb: pegasus: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 8/9] net: usb: r8152: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 9/9] net: usb: rtl8150: " Emil Renner Berthing
2021-01-30 23:47   ` Emil Renner Berthing
2021-02-03  4:07 ` [PATCH 0/9] drivers: net: update tasklet_init callers Jakub Kicinski
2021-02-03  4:07   ` Jakub Kicinski

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=20210130234730.26565-1-kernel@esmil.dk \
    --to=kernel@esmil.dk \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=jingxiangfeng@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=m.grzeschik@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=paulus@samba.org \
    --cc=petkan@nucleusys.com \
    --cc=woojung.huh@microchip.com \
    /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.