Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/826587/?format=api
{ "id": 826587, "url": "http://patchwork.ozlabs.org/api/patches/826587/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1508200182-104605-52-git-send-email-keescook@chromium.org/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1508200182-104605-52-git-send-email-keescook@chromium.org>", "list_archive_url": null, "date": "2017-10-17T00:29:35", "name": "[51/58] ethernet/intel: Convert timers to use timer_setup()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1f4a37e47e28f72bc46072ad51baf21b6f7a266a", "submitter": { "id": 10641, "url": "http://patchwork.ozlabs.org/api/people/10641/?format=api", "name": "Kees Cook", "email": "keescook@chromium.org" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1508200182-104605-52-git-send-email-keescook@chromium.org/mbox/", "series": [ { "id": 8539, "url": "http://patchwork.ozlabs.org/api/series/8539/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=8539", "date": "2017-10-17T00:29:35", "name": null, "version": 1, "mbox": "http://patchwork.ozlabs.org/series/8539/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/826587/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/826587/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"FiykOZBY\"; dkim-atps=neutral" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yGGLV1nQmz9t2Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 17 Oct 2017 11:30:25 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 12E992F7A5;\n\tTue, 17 Oct 2017 00:30:24 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 8Cv9YmFRDPzb; Tue, 17 Oct 2017 00:30:21 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7A8F02F33E;\n\tTue, 17 Oct 2017 00:30:21 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 62A451CEF32\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Oct 2017 00:30:19 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 555B186707\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Oct 2017 00:30:19 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id v43HMI0I7TDz for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Oct 2017 00:30:18 +0000 (UTC)", "from mail-pf0-f174.google.com (mail-pf0-f174.google.com\n\t[209.85.192.174])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 10BF686706\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 17 Oct 2017 00:30:18 +0000 (UTC)", "by mail-pf0-f174.google.com with SMTP id 17so32765pfn.12\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 16 Oct 2017 17:30:18 -0700 (PDT)", "from www.outflux.net\n\t(173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133])\n\tby smtp.gmail.com with ESMTPSA id\n\tf24sm17827639pfk.183.2017.10.16.17.30.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 16 Oct 2017 17:30:14 -0700 (PDT)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=kmvTNu8RSMClr7AKEfQKyrEZW99nFSgv7fAS+65Eo1c=;\n\tb=FiykOZBYemV02KPb6+saju28f0ERud1mzA6yZfk5Ou0jjbsqSduHTZDdUYKpp7HOJb\n\tpn2eVuemCL5YO0Sr48gN/SJzVZbaeWmdPeiZpDv/hri/iM8uNJCRQjsgLudlTNJyVJJt\n\trnd21ktdgl8Ed3iN9yP+1GINq4XHKvdSYUVMQ=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=kmvTNu8RSMClr7AKEfQKyrEZW99nFSgv7fAS+65Eo1c=;\n\tb=TJKShh0gXA2SNA1FWkjLCNjlWxd/FVkWMLGFLbR2zzA5xEIsZfgaHRHSzOqcE/FQkB\n\toDzpYSpGhqGAVzVJfT1QJLJnY8j2TEdkr64UvZYPBkS8KhfY2sLzNGLNJri6nUHSHd3d\n\t0c2/D2NDVf3eEBH5uw4loOtt67Gnf+iRTwrEeXICzZfabh1fGF+n88LxKHWo7WFAuUDk\n\toxqy0P+k6Wp4TiOhaPpKA5KW4+WYa63VdtPdkO3voJYRWcn1h9NKIb3BOJdNVW2DwRMi\n\tI91epPOsC9Gzb50WNtKFEbcuCWHCjcmPQVl1pp+Ng61t216JmkqQaUVjsHRO9RuEz9SC\n\tOtsw==", "X-Gm-Message-State": "AMCzsaVr+IhTmUt4VUQBPSLUZwXAVkeP4jt8t5gSeAooXQKXi7SU0D0Q\n\tQ41vlFb59YKZ88d0r3cwRCrprg==", "X-Google-Smtp-Source": "AOwi7QCheWQqDvnvFWCY9zVXn2aJILCvj2EQB4rr9ji8sMwn4PaDizXeQxVGQxAGzEzj0jfBdJGjCw==", "X-Received": "by 10.99.171.6 with SMTP id p6mr9708599pgf.30.1508200217601;\n\tMon, 16 Oct 2017 17:30:17 -0700 (PDT)", "From": "Kees Cook <keescook@chromium.org>", "To": "\"David S. Miller\" <davem@davemloft.net>", "Date": "Mon, 16 Oct 2017 17:29:35 -0700", "Message-Id": "<1508200182-104605-52-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>", "Cc": "Kees Cook <keescook@chromium.org>, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tThomas Gleixner <tglx@linutronix.de>", "Subject": "[Intel-wired-lan] [PATCH 51/58] ethernet/intel: Convert timers to\n\tuse timer_setup()", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "In preparation for unconditionally passing the struct timer_list pointer to\nall timer callbacks, switch to using the new timer_setup() and from_timer()\nto pass the timer pointer explicitly. Switches test of .data field to\n.function, since .data will be going away.\n\nCc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nCc: intel-wired-lan@lists.osuosl.org\nCc: netdev@vger.kernel.org\nSigned-off-by: Kees Cook <keescook@chromium.org>\n---\n drivers/net/ethernet/intel/e100.c | 6 +++---\n drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++--------\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 8 ++++----\n drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++----\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++++----\n drivers/net/ethernet/intel/igb/igb_main.c | 18 ++++++++----------\n drivers/net/ethernet/intel/igbvf/netdev.c | 7 +++----\n drivers/net/ethernet/intel/ixgb/ixgb_main.c | 9 ++++-----\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++----\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 ++++----\n 10 files changed, 43 insertions(+), 50 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c\nindex 184f11242f56..44b3937f7e81 100644\n--- a/drivers/net/ethernet/intel/e100.c\n+++ b/drivers/net/ethernet/intel/e100.c\n@@ -1710,9 +1710,9 @@ static void e100_adjust_adaptive_ifs(struct nic *nic, int speed, int duplex)\n \t}\n }\n \n-static void e100_watchdog(unsigned long data)\n+static void e100_watchdog(struct timer_list *t)\n {\n-\tstruct nic *nic = (struct nic *)data;\n+\tstruct nic *nic = from_timer(nic, t, watchdog);\n \tstruct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };\n \tu32 speed;\n \n@@ -2920,7 +2920,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \n \tpci_set_master(pdev);\n \n-\tsetup_timer(&nic->watchdog, e100_watchdog, (unsigned long)nic);\n+\ttimer_setup(&nic->watchdog, e100_watchdog, 0);\n \n \tINIT_WORK(&nic->tx_timeout_task, e100_tx_timeout_task);\n \ndiff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex bf8f38f76953..f2f49239b015 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -4823,9 +4823,9 @@ static void e1000e_update_phy_task(struct work_struct *work)\n * Need to wait a few seconds after link up to get diagnostic information from\n * the phy\n **/\n-static void e1000_update_phy_info(unsigned long data)\n+static void e1000_update_phy_info(struct timer_list *t)\n {\n-\tstruct e1000_adapter *adapter = (struct e1000_adapter *)data;\n+\tstruct e1000_adapter *adapter = from_timer(adapter, t, phy_info_timer);\n \n \tif (test_bit(__E1000_DOWN, &adapter->state))\n \t\treturn;\n@@ -5159,9 +5159,9 @@ static void e1000e_check_82574_phy_workaround(struct e1000_adapter *adapter)\n * e1000_watchdog - Timer Call-back\n * @data: pointer to adapter cast into an unsigned long\n **/\n-static void e1000_watchdog(unsigned long data)\n+static void e1000_watchdog(struct timer_list *t)\n {\n-\tstruct e1000_adapter *adapter = (struct e1000_adapter *)data;\n+\tstruct e1000_adapter *adapter = from_timer(adapter, t, watchdog_timer);\n \n \t/* Do the rest outside of interrupt context */\n \tschedule_work(&adapter->watchdog_task);\n@@ -7267,10 +7267,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\tgoto err_eeprom;\n \t}\n \n-\tsetup_timer(&adapter->watchdog_timer, e1000_watchdog,\n-\t\t (unsigned long)adapter);\n-\tsetup_timer(&adapter->phy_info_timer, e1000_update_phy_info,\n-\t\t (unsigned long)adapter);\n+\ttimer_setup(&adapter->watchdog_timer, e1000_watchdog, 0);\n+\ttimer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0);\n \n \tINIT_WORK(&adapter->reset_task, e1000_reset_task);\n \tINIT_WORK(&adapter->watchdog_task, e1000_watchdog_task);\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex 1e9ae3197b17..7f605221a686 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -213,9 +213,10 @@ static void fm10k_start_service_event(struct fm10k_intfc *interface)\n * fm10k_service_timer - Timer Call-back\n * @data: pointer to interface cast into an unsigned long\n **/\n-static void fm10k_service_timer(unsigned long data)\n+static void fm10k_service_timer(struct timer_list *t)\n {\n-\tstruct fm10k_intfc *interface = (struct fm10k_intfc *)data;\n+\tstruct fm10k_intfc *interface = from_timer(interface, t,\n+\t\t\t\t\t\t service_timer);\n \n \t/* Reset the timer */\n \tmod_timer(&interface->service_timer, (HZ * 2) + jiffies);\n@@ -2315,8 +2316,7 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t/* Initialize service timer and service task late in order to avoid\n \t * cleanup issues.\n \t */\n-\tsetup_timer(&interface->service_timer, &fm10k_service_timer,\n-\t\t (unsigned long)interface);\n+\ttimer_setup(&interface->service_timer, fm10k_service_timer, 0);\n \tINIT_WORK(&interface->service_task, fm10k_service_task);\n \n \t/* Setup the MAC/VLAN queue */\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 4de52001a2b9..53d7830a4251 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -7629,9 +7629,9 @@ static void i40e_service_task(struct work_struct *work)\n * i40e_service_timer - timer callback\n * @data: pointer to PF struct\n **/\n-static void i40e_service_timer(unsigned long data)\n+static void i40e_service_timer(struct timer_list *t)\n {\n-\tstruct i40e_pf *pf = (struct i40e_pf *)data;\n+\tstruct i40e_pf *pf = from_timer(pf, t, service_timer);\n \n \tmod_timer(&pf->service_timer,\n \t\t round_jiffies(jiffies + pf->service_timer_period));\n@@ -11557,7 +11557,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n #endif /* CONFIG_I40E_DCB */\n \n \t/* set up periodic task facility */\n-\tsetup_timer(&pf->service_timer, i40e_service_timer, (unsigned long)pf);\n+\ttimer_setup(&pf->service_timer, i40e_service_timer, 0);\n \tpf->service_timer_period = HZ;\n \n \tINIT_WORK(&pf->service_task, i40e_service_task);\n@@ -11880,7 +11880,7 @@ static void i40e_remove(struct pci_dev *pdev)\n \t/* no more scheduling of any task */\n \tset_bit(__I40E_SUSPENDED, pf->state);\n \tset_bit(__I40E_DOWN, pf->state);\n-\tif (pf->service_timer.data)\n+\tif (pf->service_timer.function)\n \t\tdel_timer_sync(&pf->service_timer);\n \tif (pf->service_task.func)\n \t\tcancel_work_sync(&pf->service_task);\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 5bcbd46e2f6c..ca2ebdbd24d7 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1594,9 +1594,10 @@ static int i40evf_reinit_interrupt_scheme(struct i40evf_adapter *adapter)\n * i40evf_watchdog_timer - Periodic call-back timer\n * @data: pointer to adapter disguised as unsigned long\n **/\n-static void i40evf_watchdog_timer(unsigned long data)\n+static void i40evf_watchdog_timer(struct timer_list *t)\n {\n-\tstruct i40evf_adapter *adapter = (struct i40evf_adapter *)data;\n+\tstruct i40evf_adapter *adapter = from_timer(adapter, t,\n+\t\t\t\t\t\t watchdog_timer);\n \n \tschedule_work(&adapter->watchdog_task);\n \t/* timer will be rescheduled in watchdog task */\n@@ -2748,8 +2749,7 @@ static void i40evf_init_task(struct work_struct *work)\n \t\tether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr);\n \t}\n \n-\tsetup_timer(&adapter->watchdog_timer, &i40evf_watchdog_timer,\n-\t\t (unsigned long)adapter);\n+\ttimer_setup(&adapter->watchdog_timer, i40evf_watchdog_timer, 0);\n \tmod_timer(&adapter->watchdog_timer, jiffies + 1);\n \n \tadapter->tx_desc_count = I40EVF_DEFAULT_TXD;\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 837d9b46a390..58d01a211367 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -133,8 +133,8 @@ static void igb_clean_all_rx_rings(struct igb_adapter *);\n static void igb_clean_tx_ring(struct igb_ring *);\n static void igb_clean_rx_ring(struct igb_ring *);\n static void igb_set_rx_mode(struct net_device *);\n-static void igb_update_phy_info(unsigned long);\n-static void igb_watchdog(unsigned long);\n+static void igb_update_phy_info(struct timer_list *);\n+static void igb_watchdog(struct timer_list *);\n static void igb_watchdog_task(struct work_struct *);\n static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);\n static void igb_get_stats64(struct net_device *dev,\n@@ -2538,10 +2538,8 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\twr32(E1000_TXPBS, I210_TXPBSIZE_DEFAULT);\n \t}\n \n-\tsetup_timer(&adapter->watchdog_timer, igb_watchdog,\n-\t\t (unsigned long) adapter);\n-\tsetup_timer(&adapter->phy_info_timer, igb_update_phy_info,\n-\t\t (unsigned long) adapter);\n+\ttimer_setup(&adapter->watchdog_timer, igb_watchdog, 0);\n+\ttimer_setup(&adapter->phy_info_timer, igb_update_phy_info, 0);\n \n \tINIT_WORK(&adapter->reset_task, igb_reset_task);\n \tINIT_WORK(&adapter->watchdog_task, igb_watchdog_task);\n@@ -4425,9 +4423,9 @@ static void igb_spoof_check(struct igb_adapter *adapter)\n /* Need to wait a few seconds after link up to get diagnostic information from\n * the phy\n */\n-static void igb_update_phy_info(unsigned long data)\n+static void igb_update_phy_info(struct timer_list *t)\n {\n-\tstruct igb_adapter *adapter = (struct igb_adapter *) data;\n+\tstruct igb_adapter *adapter = from_timer(adapter, t, phy_info_timer);\n \tigb_get_phy_info(&adapter->hw);\n }\n \n@@ -4514,9 +4512,9 @@ static void igb_check_lvmmc(struct igb_adapter *adapter)\n * igb_watchdog - Timer Call-back\n * @data: pointer to adapter cast into an unsigned long\n **/\n-static void igb_watchdog(unsigned long data)\n+static void igb_watchdog(struct timer_list *t)\n {\n-\tstruct igb_adapter *adapter = (struct igb_adapter *)data;\n+\tstruct igb_adapter *adapter = from_timer(adapter, t, watchdog_timer);\n \t/* Do the rest outside of interrupt context */\n \tschedule_work(&adapter->watchdog_task);\n }\ndiff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c\nindex 1ed556911b14..713e8df23744 100644\n--- a/drivers/net/ethernet/intel/igbvf/netdev.c\n+++ b/drivers/net/ethernet/intel/igbvf/netdev.c\n@@ -1915,9 +1915,9 @@ static bool igbvf_has_link(struct igbvf_adapter *adapter)\n * igbvf_watchdog - Timer Call-back\n * @data: pointer to adapter cast into an unsigned long\n **/\n-static void igbvf_watchdog(unsigned long data)\n+static void igbvf_watchdog(struct timer_list *t)\n {\n-\tstruct igbvf_adapter *adapter = (struct igbvf_adapter *)data;\n+\tstruct igbvf_adapter *adapter = from_timer(adapter, t, watchdog_timer);\n \n \t/* Do the rest outside of interrupt context */\n \tschedule_work(&adapter->watchdog_task);\n@@ -2878,8 +2878,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\t netdev->addr_len);\n \t}\n \n-\tsetup_timer(&adapter->watchdog_timer, &igbvf_watchdog,\n-\t\t (unsigned long)adapter);\n+\ttimer_setup(&adapter->watchdog_timer, igbvf_watchdog, 0);\n \n \tINIT_WORK(&adapter->reset_task, igbvf_reset_task);\n \tINIT_WORK(&adapter->watchdog_task, igbvf_watchdog_task);\ndiff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c\nindex 1e6ec2277d54..2353c383f0a7 100644\n--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c\n+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c\n@@ -83,7 +83,7 @@ static void ixgb_setup_rctl(struct ixgb_adapter *adapter);\n static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter);\n static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter);\n static void ixgb_set_multi(struct net_device *netdev);\n-static void ixgb_watchdog(unsigned long data);\n+static void ixgb_watchdog(struct timer_list *t);\n static netdev_tx_t ixgb_xmit_frame(struct sk_buff *skb,\n \t\t\t\t struct net_device *netdev);\n static int ixgb_change_mtu(struct net_device *netdev, int new_mtu);\n@@ -508,8 +508,7 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \n \tadapter->part_num = ixgb_get_ee_pba_number(&adapter->hw);\n \n-\tsetup_timer(&adapter->watchdog_timer, ixgb_watchdog,\n-\t\t (unsigned long)adapter);\n+\ttimer_setup(&adapter->watchdog_timer, ixgb_watchdog, 0);\n \n \tINIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task);\n \n@@ -1151,9 +1150,9 @@ ixgb_set_multi(struct net_device *netdev)\n **/\n \n static void\n-ixgb_watchdog(unsigned long data)\n+ixgb_watchdog(struct timer_list *t)\n {\n-\tstruct ixgb_adapter *adapter = (struct ixgb_adapter *)data;\n+\tstruct ixgb_adapter *adapter = from_timer(adapter, t, watchdog_timer);\n \tstruct net_device *netdev = adapter->netdev;\n \tstruct ixgb_desc_ring *txdr = &adapter->tx_ring;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 7683c14024aa..3e83edd10e23 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -7690,9 +7690,9 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter)\n * ixgbe_service_timer - Timer Call-back\n * @data: pointer to adapter cast into an unsigned long\n **/\n-static void ixgbe_service_timer(unsigned long data)\n+static void ixgbe_service_timer(struct timer_list *t)\n {\n-\tstruct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data;\n+\tstruct ixgbe_adapter *adapter = from_timer(adapter, t, service_timer);\n \tunsigned long next_event_offset;\n \n \t/* poll faster when waiting for link */\n@@ -10508,8 +10508,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tether_addr_copy(hw->mac.addr, hw->mac.perm_addr);\n \tixgbe_mac_set_default_filter(adapter);\n \n-\tsetup_timer(&adapter->service_timer, &ixgbe_service_timer,\n-\t\t (unsigned long) adapter);\n+\ttimer_setup(&adapter->service_timer, ixgbe_service_timer, 0);\n \n \tif (ixgbe_removed(hw->hw_addr)) {\n \t\terr = -EIO;\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex 032f8ac06357..12d3601b1d57 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -2747,9 +2747,10 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)\n * ixgbevf_service_timer - Timer Call-back\n * @data: pointer to adapter cast into an unsigned long\n **/\n-static void ixgbevf_service_timer(unsigned long data)\n+static void ixgbevf_service_timer(struct timer_list *t)\n {\n-\tstruct ixgbevf_adapter *adapter = (struct ixgbevf_adapter *)data;\n+\tstruct ixgbevf_adapter *adapter = from_timer(adapter, t,\n+\t\t\t\t\t\t service_timer);\n \n \t/* Reset the timer */\n \tmod_timer(&adapter->service_timer, (HZ * 2) + jiffies);\n@@ -4120,8 +4121,7 @@ static int ixgbevf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\tgoto err_sw_init;\n \t}\n \n-\tsetup_timer(&adapter->service_timer, &ixgbevf_service_timer,\n-\t\t (unsigned long)adapter);\n+\ttimer_setup(&adapter->service_timer, ixgbevf_service_timer, 0);\n \n \tINIT_WORK(&adapter->service_task, ixgbevf_service_task);\n \tset_bit(__IXGBEVF_SERVICE_INITED, &adapter->state);\n", "prefixes": [ "51/58" ] }