From: Kees Cook <keescook@chromium.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Kees Cook <keescook@chromium.org>,
"David S. Miller" <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
"Reshetova, Elena" <elena.reshetova@intel.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 25/31] net/atm/mpc: Use separate static data field with with static timer
Date: Thu, 31 Aug 2017 16:29:37 -0700 [thread overview]
Message-ID: <1504222183-61202-26-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1504222183-61202-1-git-send-email-keescook@chromium.org>
In preparation for changing the timer callback argument to the timer
pointer, move to a separate static data variable.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Reshetova, Elena" <elena.reshetova@intel.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
net/atm/mpc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 5baa31b8500c..fc24a46500ae 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -95,7 +95,7 @@ static netdev_tx_t mpc_send_packet(struct sk_buff *skb,
static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
unsigned long event, void *dev);
static void mpc_timer_refresh(void);
-static void mpc_cache_check(unsigned long checking_time);
+static void mpc_cache_check(unsigned long unused);
static struct llc_snap_hdr llc_snap_mpoa_ctrl = {
0xaa, 0xaa, 0x03,
@@ -121,7 +121,8 @@ static struct notifier_block mpoa_notifier = {
struct mpoa_client *mpcs = NULL; /* FIXME */
static struct atm_mpoa_qos *qos_head = NULL;
-static DEFINE_TIMER(mpc_timer, NULL);
+static DEFINE_TIMER(mpc_timer, mpc_cache_check);
+static unsigned long checking_time;
static struct mpoa_client *find_mpc_by_itfnum(int itf)
@@ -1411,12 +1412,11 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action)
static void mpc_timer_refresh(void)
{
mpc_timer.expires = jiffies + (MPC_P2 * HZ);
- mpc_timer.data = mpc_timer.expires;
- mpc_timer.function = mpc_cache_check;
+ checking_time = mpc_timer.expires;
add_timer(&mpc_timer);
}
-static void mpc_cache_check(unsigned long checking_time)
+static void mpc_cache_check(unsigned long unused)
{
struct mpoa_client *mpc = mpcs;
static unsigned long previous_resolving_check_time;
--
2.7.4
next prev parent reply other threads:[~2017-08-31 23:49 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 ` Kees Cook [this message]
2017-08-31 23:29 ` [PATCH 30/31] appletalk: Remove unneeded synchronization Kees Cook
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-26-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=elena.reshetova@intel.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).