Message ID | 1508200182-104605-48-git-send-email-keescook@chromium.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Vd9ABskA"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yGGXD1y02z9s7g for <patchwork-incoming@ozlabs.org>; Tue, 17 Oct 2017 11:38:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758299AbdJQAiN (ORCPT <rfc822;patchwork-incoming@ozlabs.org>); Mon, 16 Oct 2017 20:38:13 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:51295 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758186AbdJQAhj (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 16 Oct 2017 20:37:39 -0400 Received: by mail-pf0-f176.google.com with SMTP id n14so51184pfh.8 for <netdev@vger.kernel.org>; Mon, 16 Oct 2017 17:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aVO8+cW0bl9raX6DMOXQqoxYsbG2zR7pfgz83vo62Mw=; b=Vd9ABskACFMiKBkQ4GV34/gls8NMUf06gaKzbP4gD5i8cfGNJNhAEYYZN7Rc1WhCWQ arQSCGc78l9nAsIS2xxRtZzetBMYnKsbvncVH3nnLtrQHnNY2WEKexXDcx8sY6XIiQ7y NBvgFRhjELRIuyuahkEqVHUISTMdm1yHe3zE4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aVO8+cW0bl9raX6DMOXQqoxYsbG2zR7pfgz83vo62Mw=; b=m7HjlAp7FQqvRM4w5Btms4463gG7beRLgQGUErHAmp9+wtEE6kpntWpvYu2VR1rulW UMAaTRg9KvKHXuTIpS1zeYZ4L1+SK9VB0SMMzVlWaZYN32wU5H50kzk7W5dBAq2wnRIZ W7723pVkep096d2hnlRlemgLhlGyjazSU7l6sSJx7g3qdilDLBUcRDTH/PHDYhT9CM4A INx8s3VJb+jt78FlxsO2CQBrKa99ZuHIut7djtJFqcqf3GcI7nAgcoL0wnB0WfwAvIYc 3KyOJczT/1lhC2qrIFDCMkkvm2I2x0JiLiwMBzX9hAWgvXu+thQgmKoyKfl5TRlp5p+J vAtA== X-Gm-Message-State: AMCzsaW+1d8iO3xt1OMIA0rcvkGghs2UU2lmmnr7q0Y45bFfGy75FeXB cpZkrDH9SstbWmuevhWETjuKmA== X-Google-Smtp-Source: AOwi7QBUiYuBlP8cUNa+moOHA4sE/NVs+7QWAkKg3Dn0wzl0EFVkxiUUtdF6gDUivO5GkgQlgc486w== X-Received: by 10.98.8.88 with SMTP id c85mr10042506pfd.330.1508200658558; Mon, 16 Oct 2017 17:37:38 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id e4sm16484902pfa.80.2017.10.16.17.37.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 17:37:36 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: "David S. Miller" <davem@davemloft.net> Cc: Kees Cook <keescook@chromium.org>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org Subject: [PATCH 47/58] net/ethernet/sgi: Convert timers to use timer_setup() Date: Mon, 16 Oct 2017 17:29:31 -0700 Message-Id: <1508200182-104605-48-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508200182-104605-1-git-send-email-keescook@chromium.org> References: <1508200182-104605-1-git-send-email-keescook@chromium.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
networking: Convert timers to use timer_setup()
|
expand
|
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 9c0488e0f08e..18d533fdf14c 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -764,9 +764,9 @@ static inline void ioc3_setup_duplex(struct ioc3_private *ip) ioc3_w_emcr(ip->emcr); } -static void ioc3_timer(unsigned long data) +static void ioc3_timer(struct timer_list *t) { - struct ioc3_private *ip = (struct ioc3_private *) data; + struct ioc3_private *ip = from_timer(ip, t, ioc3_timer); /* Print the link status if it has changed */ mii_check_media(&ip->mii, 1, 0); @@ -818,8 +818,6 @@ static int ioc3_mii_init(struct ioc3_private *ip) static void ioc3_mii_start(struct ioc3_private *ip) { ip->ioc3_timer.expires = jiffies + (12 * HZ)/10; /* 1.2 sec. */ - ip->ioc3_timer.data = (unsigned long) ip; - ip->ioc3_timer.function = ioc3_timer; add_timer(&ip->ioc3_timer); } @@ -1291,7 +1289,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) #endif spin_lock_init(&ip->ioc3_lock); - init_timer(&ip->ioc3_timer); + timer_setup(&ip->ioc3_timer, ioc3_timer, 0); ioc3_stop(ip); ioc3_init(dev);
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: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> --- drivers/net/ethernet/sgi/ioc3-eth.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)