s390: cmm: Convert timers to use timer_setup()
authorKees Cook <[email protected]>
Tue, 24 Oct 2017 05:41:17 +0000 (22:41 -0700)
committerKees Cook <[email protected]>
Tue, 21 Nov 2017 23:46:44 +0000 (15:46 -0800)
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
arch/s390/mm/cmm.c

index 2dbdcd85b68f200762846ce0c59dc39438d0f9e0..3d017171ff8f781f960443e8f7c8783bed49e6c0 100644 (file)
@@ -56,10 +56,10 @@ static DEFINE_SPINLOCK(cmm_lock);
 
 static struct task_struct *cmm_thread_ptr;
 static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait);
-static DEFINE_TIMER(cmm_timer, NULL);
 
-static void cmm_timer_fn(unsigned long);
+static void cmm_timer_fn(struct timer_list *);
 static void cmm_set_timer(void);
+static DEFINE_TIMER(cmm_timer, cmm_timer_fn);
 
 static long cmm_alloc_pages(long nr, long *counter,
                            struct cmm_page_array **list)
@@ -194,13 +194,11 @@ static void cmm_set_timer(void)
                if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ))
                        return;
        }
-       cmm_timer.function = cmm_timer_fn;
-       cmm_timer.data = 0;
        cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ;
        add_timer(&cmm_timer);
 }
 
-static void cmm_timer_fn(unsigned long ignored)
+static void cmm_timer_fn(struct timer_list *unused)
 {
        long nr;