From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932840AbbJ0V7t (ORCPT ); Tue, 27 Oct 2015 17:59:49 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34984 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932383AbbJ0VbH (ORCPT ); Tue, 27 Oct 2015 17:31:07 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: Julia Lawall , Mathias Nyman , Greg Kroah-Hartman , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 52/86] xhci-mem: Use setup_timer Date: Tue, 27 Oct 2015 14:29:52 -0700 Message-Id: <1445981426-19727-53-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445981426-19727-1-git-send-email-kamal@canonical.com> References: <1445981426-19727-1-git-send-email-kamal@canonical.com> X-Extended-Stable: 3.19 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.19.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Julia Lawall commit 9e08a03dc12a41ce695559f8c6d999aaf245b8be upstream. Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.data = d; -t.function = f; // Signed-off-by: Julia Lawall Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman [ kamal: 3.19-stable prereq for "cc8e4fc xhci: init command timeout timer earlier to avoid deleting it uninitialized" ] Signed-off-by: Kamal Mostafa --- drivers/usb/host/xhci-mem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 79a3c5f..1291417e3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -833,9 +833,8 @@ void xhci_free_stream_info(struct xhci_hcd *xhci, static void xhci_init_endpoint_timer(struct xhci_hcd *xhci, struct xhci_virt_ep *ep) { - init_timer(&ep->stop_cmd_timer); - ep->stop_cmd_timer.data = (unsigned long) ep; - ep->stop_cmd_timer.function = xhci_stop_endpoint_command_watchdog; + setup_timer(&ep->stop_cmd_timer, xhci_stop_endpoint_command_watchdog, + (unsigned long)ep); ep->xhci = xhci; } @@ -2510,9 +2509,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) xhci_print_ir_set(xhci, 0); /* init command timeout timer */ - init_timer(&xhci->cmd_timer); - xhci->cmd_timer.data = (unsigned long) xhci; - xhci->cmd_timer.function = xhci_handle_command_timeout; + setup_timer(&xhci->cmd_timer, xhci_handle_command_timeout, + (unsigned long)xhci); /* * XXX: Might need to set the Interrupter Moderation Register to -- 1.9.1