From: Kees Cook <keescook@chromium.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Kees Cook <keescook@chromium.org>,
David Howells <dhowells@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 30/31] appletalk: Remove unneeded synchronization
Date: Thu, 31 Aug 2017 16:29:42 -0700 [thread overview]
Message-ID: <1504222183-61202-31-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1504222183-61202-1-git-send-email-keescook@chromium.org>
The use of del_timer_sync() will make sure a timer is not rescheduled.
As such, there is no need to add external signals to kill timers. In
preparation for switching the timer callback argument to the timer
pointer, this drops the .data argument since it doesn't serve a meaningful
purpose here.
Cc: David Howells <dhowells@redhat.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/net/appletalk/ltpc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
index e4aa374caa4d..cc3dc9337eae 100644
--- a/drivers/net/appletalk/ltpc.c
+++ b/drivers/net/appletalk/ltpc.c
@@ -880,14 +880,10 @@ static void ltpc_poll(unsigned long l)
}
ltpc_poll_counter--;
}
-
- if (!dev)
- return; /* we've been downed */
/* poll 20 times per second */
idle(dev);
ltpc_timer.expires = jiffies + HZ/20;
-
add_timer(<pc_timer);
}
@@ -1252,8 +1248,6 @@ static void __exit ltpc_cleanup(void)
if(debug & DEBUG_VERBOSE) printk("unregister_netdev\n");
unregister_netdev(dev_ltpc);
- ltpc_timer.data = 0; /* signal the poll routine that we're done */
-
del_timer_sync(<pc_timer);
if(debug & DEBUG_VERBOSE) printk("freeing irq\n");
--
2.7.4
next prev parent reply other threads:[~2017-08-31 23:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1504222183-61202-1-git-send-email-keescook@chromium.org>
2017-08-31 23:29 ` [PATCH 13/31] timer: Remove meaningless .data/.function assignments Kees Cook
2017-09-01 5:09 ` Greg Kroah-Hartman
2017-09-01 17:59 ` Krzysztof Halasa
2017-09-01 20:07 ` Jens Axboe
2017-08-31 23:29 ` [PATCH 19/31] timer: Remove open-coded casts for .data and .function Kees Cook
2017-09-01 0:28 ` Tyrel Datwyler
2017-09-01 0:29 ` Tyrel Datwyler
2017-08-31 23:29 ` [PATCH 20/31] net/core: Collapse redundant sk_timer callback data assignments Kees Cook
2017-08-31 23:29 ` [PATCH 25/31] net/atm/mpc: Use separate static data field with with static timer Kees Cook
2017-08-31 23:29 ` Kees Cook [this message]
2017-08-31 23:29 ` [PATCH 31/31] timer: Switch to testing for .function instead of .data Kees Cook
2017-08-31 23:45 ` Dmitry Torokhov
2017-08-31 23:59 ` Kees Cook
[not found] ` <CAGXu5jK84cN9MdjfzaipD7GN8a37JMfD8X0Em4mk2_aFGuaOUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-01 1:06 ` Dmitry Torokhov
2017-09-01 21:34 ` Jeff Kirsher
2017-09-02 13:47 ` Rafael J. Wysocki
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=1504222183-61202-31-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 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).