diff mbox series

[1/2] net: atm: pppoatm: use tasklet_init to initialize wakeup tasklet

Message ID 20210127173256.13954-1-kernel@esmil.dk (mailing list archive)
State Accepted
Commit a5b88632fc967906a86e16513bae9cc49070934c
Delegated to: Netdev Maintainers
Headers show
Series [1/2] net: atm: pppoatm: use tasklet_init to initialize wakeup tasklet | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 22 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Emil Renner Berthing Jan. 27, 2021, 5:32 p.m. UTC
Previously a temporary tasklet structure was initialized on the stack
using DECLARE_TASKLET_OLD() and then copied over and modified. Nothing
else in the kernel seems to use this pattern, so let's just call
tasklet_init() like everyone else.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
---
 net/atm/pppoatm.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 30, 2021, 2:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 27 Jan 2021 18:32:55 +0100 you wrote:
> Previously a temporary tasklet structure was initialized on the stack
> using DECLARE_TASKLET_OLD() and then copied over and modified. Nothing
> else in the kernel seems to use this pattern, so let's just call
> tasklet_init() like everyone else.
> 
> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> 
> [...]

Here is the summary with links:
  - [1/2] net: atm: pppoatm: use tasklet_init to initialize wakeup tasklet
    https://git.kernel.org/netdev/net-next/c/a5b88632fc96
  - [2/2] net: atm: pppoatm: use new API for wakeup tasklet
    https://git.kernel.org/netdev/net-next/c/a58745979cdd

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index 579b66da1d95..5f06af098390 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -389,11 +389,7 @@  static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
 	struct atm_backend_ppp be;
 	struct pppoatm_vcc *pvcc;
 	int err;
-	/*
-	 * Each PPPoATM instance has its own tasklet - this is just a
-	 * prototypical one used to initialize them
-	 */
-	static const DECLARE_TASKLET_OLD(tasklet_proto, pppoatm_wakeup_sender);
+
 	if (copy_from_user(&be, arg, sizeof be))
 		return -EFAULT;
 	if (be.encaps != PPPOATM_ENCAPS_AUTODETECT &&
@@ -415,8 +411,8 @@  static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
 	pvcc->chan.ops = &pppoatm_ops;
 	pvcc->chan.mtu = atmvcc->qos.txtp.max_sdu - PPP_HDRLEN -
 	    (be.encaps == e_vc ? 0 : LLC_LEN);
-	pvcc->wakeup_tasklet = tasklet_proto;
-	pvcc->wakeup_tasklet.data = (unsigned long) &pvcc->chan;
+	tasklet_init(&pvcc->wakeup_tasklet, pppoatm_wakeup_sender,
+		     (unsigned long)&pvcc->chan);
 	err = ppp_register_channel(&pvcc->chan);
 	if (err != 0) {
 		kfree(pvcc);