From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932548AbdJYKvb (ORCPT ); Wed, 25 Oct 2017 06:51:31 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:51066 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932508AbdJYKvX (ORCPT ); Wed, 25 Oct 2017 06:51:23 -0400 X-Google-Smtp-Source: ABhQp+Q8C82YdhxQTG78fpp6NQIgTiGmXzRazsJBT8p+zzkq1dIRVzQLQKstrhCVL3CyMx35Y5Qubg== Date: Wed, 25 Oct 2017 03:51:20 -0700 From: Kees Cook To: "David S. Miller" Cc: Jean-Paul Roubelat , linux-hams@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup() Message-ID: <20171025105120.GA146533@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Initialization was entirely missing. Cc: Jean-Paul Roubelat Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/hamradio/yam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 7a7c5224a336..b88c5cc00a63 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -647,7 +647,7 @@ static void yam_arbitrate(struct net_device *dev) yam_start_tx(dev, yp); } -static void yam_dotimer(unsigned long dummy) +static void yam_dotimer(struct timer_list *unused) { int i; @@ -1164,7 +1164,7 @@ static int __init yam_init_driver(void) } - yam_timer.function = yam_dotimer; + timer_setup(&yam_timer, yam_dotimer, 0); yam_timer.expires = jiffies + HZ / 100; add_timer(&yam_timer); -- 2.7.4 -- Kees Cook Pixel Security