From 6a29d4b944316f7e4ad643b78141b60fdf41c5ca Mon Sep 17 00:00:00 2001 From: Allen Pais Date: Fri, 22 Sep 2017 14:29:39 +0530 Subject: drivers: usb: atm: cxacru: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/cxacru.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 5160a4a966b3..600a670b4feb 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -570,10 +570,8 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, { struct timer_list timer; - init_timer(&timer); + setup_timer(&timer, cxacru_timeout_kill, (unsigned long)urb); timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT); - timer.data = (unsigned long) urb; - timer.function = cxacru_timeout_kill; add_timer(&timer); wait_for_completion(done); del_timer_sync(&timer); -- cgit v1.2.3 From 32f44077f35da1ee8f51b313df5be2a893139e27 Mon Sep 17 00:00:00 2001 From: Allen Pais Date: Fri, 22 Sep 2017 14:29:41 +0530 Subject: drivers: usb: speedtch: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/speedtch.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 3676adb40d89..091db9b281f5 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c @@ -874,16 +874,13 @@ static int speedtch_bind(struct usbatm_data *usbatm, usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); INIT_WORK(&instance->status_check_work, speedtch_check_status); - init_timer(&instance->status_check_timer); - - instance->status_check_timer.function = speedtch_status_poll; - instance->status_check_timer.data = (unsigned long)instance; + setup_timer(&instance->status_check_timer, speedtch_status_poll, + (unsigned long)instance); instance->last_status = 0xff; instance->poll_delay = MIN_POLL_DELAY; - init_timer(&instance->resubmit_timer); - instance->resubmit_timer.function = speedtch_resubmit_int; - instance->resubmit_timer.data = (unsigned long)instance; + setup_timer(&instance->resubmit_timer, speedtch_resubmit_int, + (unsigned long)instance); instance->int_urb = usb_alloc_urb(0, GFP_KERNEL); -- cgit v1.2.3 From 3a851c0312964997cd1afc760e179e7ff0e189b3 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Tue, 24 Oct 2017 21:42:06 -0500 Subject: usb: atm: cxacru: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/cxacru.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 600a670b4feb..e4f177da164d 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -424,6 +424,7 @@ static ssize_t cxacru_sysfs_store_adsl_state(struct device *dev, case CXPOLL_STOPPING: /* abort stop request */ instance->poll_state = CXPOLL_POLLING; + /* fall through */ case CXPOLL_POLLING: case CXPOLL_SHUTDOWN: /* don't start polling */ @@ -795,6 +796,7 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, case CXPOLL_STOPPING: /* abort stop request */ instance->poll_state = CXPOLL_POLLING; + /* fall through */ case CXPOLL_POLLING: case CXPOLL_SHUTDOWN: /* don't start polling */ -- cgit v1.2.3 From 5fd54ace4721fc5ce2bb5aef6318fcf17f421460 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Nov 2017 11:28:30 +0100 Subject: USB: add SPDX identifiers to all remaining files in drivers/usb/ It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Acked-by: Felipe Balbi Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/cxacru.c | 1 + drivers/usb/atm/speedtch.c | 1 + drivers/usb/atm/ueagle-atm.c | 1 + drivers/usb/atm/usbatm.c | 1 + drivers/usb/atm/usbatm.h | 1 + drivers/usb/atm/xusbatm.c | 1 + 6 files changed, 6 insertions(+) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index e4f177da164d..87d16578c5a4 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * cxacru.c - driver for USB ADSL modems based on * Conexant AccessRunner chipset diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 091db9b281f5..cc65bec5b331 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * speedtch.c - Alcatel SpeedTouch USB xDSL modem driver * diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index ba7616395db2..ab75690044bb 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /*- * Copyright (c) 2003, 2004 * Damien Bergamini . All rights reserved. diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 8607af758bbd..ce1c57cb413f 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * usbatm.c - Generic USB xDSL driver core * diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index f3eecd967a8a..72f9d3b8adb6 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * usbatm.h - Generic USB xDSL driver core * diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c index c73c1ec3005e..7c55032a2c2c 100644 --- a/drivers/usb/atm/xusbatm.c +++ b/drivers/usb/atm/xusbatm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * xusbatm.c - dumb usbatm-based driver for modems initialized in userspace * -- cgit v1.2.3 From 4a8635ae08e8fa3134cff66a089a3e112f29c8f8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Nov 2017 12:40:59 +0100 Subject: USB: atm: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Duncan Sands Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/cxacru.c | 15 --------------- drivers/usb/atm/speedtch.c | 15 --------------- drivers/usb/atm/usbatm.c | 15 --------------- drivers/usb/atm/usbatm.h | 15 --------------- drivers/usb/atm/xusbatm.c | 15 --------------- 5 files changed, 75 deletions(-) (limited to 'drivers/usb/atm') diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 87d16578c5a4..6470d259b7d8 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c @@ -7,21 +7,6 @@ * Copyright (C) 2005 Duncan Sands, Roman Kagan (rkagan % mail ! ru) * Copyright (C) 2007 Simon Arlott * Copyright (C) 2009 Simon Arlott - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ******************************************************************************/ /* diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index cc65bec5b331..5a5e8c0aaa39 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c @@ -7,21 +7,6 @@ * Copyright (C) 2004, David Woodhouse * * Based on "modem_run.c", copyright (C) 2001, Benoit Papillault - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ******************************************************************************/ #include diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index ce1c57cb413f..044264aa1f96 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -5,21 +5,6 @@ * Copyright (C) 2001, Alcatel * Copyright (C) 2003, Duncan Sands, SolNegro, Josep Comas * Copyright (C) 2004, David Woodhouse, Roman Kagan - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ******************************************************************************/ /* diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index 72f9d3b8adb6..d3bdc4cc47aa 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h @@ -5,21 +5,6 @@ * Copyright (C) 2001, Alcatel * Copyright (C) 2003, Duncan Sands, SolNegro, Josep Comas * Copyright (C) 2004, David Woodhouse - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ******************************************************************************/ #ifndef _USBATM_H_ diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c index 7c55032a2c2c..ffc9810070a3 100644 --- a/drivers/usb/atm/xusbatm.c +++ b/drivers/usb/atm/xusbatm.c @@ -3,21 +3,6 @@ * xusbatm.c - dumb usbatm-based driver for modems initialized in userspace * * Copyright (C) 2005 Duncan Sands, Roman Kagan (rkagan % mail ! ru) - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ******************************************************************************/ #include -- cgit v1.2.3