11 Jul, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Marcel Holtmann

    Gustavo A. R. Silva
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

14 Oct, 2017

1 commit

  • In preparation to enabling -Wimplicit-fallthrough, mark switch cases
    where we are expecting to fall through.

    In this particular case, notice that I replaced the
    "deliberate fall-through..." comment with a "fall through"
    comment, which is what GCC is expecting to find.

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Marcel Holtmann

    Gustavo A. R. Silva
     

27 Sep, 2016

1 commit


22 Dec, 2015

1 commit


07 Aug, 2012

1 commit


19 May, 2012

1 commit

  • Hub-initiated LPM is not good for USB communications devices. Comms
    devices should be able to tell when their link can go into a lower power
    state, because they know when an incoming transmission is finished.
    Ideally, these devices would slam their links into a lower power state,
    using the device-initiated LPM, after finishing the last packet of their
    data transfer.

    If we enable the idle timeouts for the parent hubs to enable
    hub-initiated LPM, we will get a lot of useless LPM packets on the bus
    as the devices reject LPM transitions when they're in the middle of
    receiving data. Worse, some devices might blindly accept the
    hub-initiated LPM and power down their radios while they're in the
    middle of receiving a transmission.

    The Intel Windows folks are disabling hub-initiated LPM for all USB
    communications devices under a xHCI USB 3.0 host. In order to keep
    the Linux behavior as close as possible to Windows, we need to do the
    same in Linux.

    Set the disable_hub_initiated_lpm flag for for all USB communications
    drivers. I know there aren't currently any USB 3.0 devices that
    implement these class specifications, but we should be ready if they do.

    Signed-off-by: Sarah Sharp
    Cc: Marcel Holtmann
    Cc: Gustavo Padovan
    Cc: Johan Hedberg
    Cc: Hansjoerg Lipp
    Cc: Tilman Schmidt
    Cc: Karsten Keil
    Cc: Peter Korsgaard
    Cc: Jan Dumon
    Cc: Petko Manolov
    Cc: Steve Glendinning
    Cc: "John W. Linville"
    Cc: Kalle Valo
    Cc: "Luis R. Rodriguez"
    Cc: Jouni Malinen
    Cc: Vasanthakumar Thiagarajan
    Cc: Senthil Balasubramanian
    Cc: Christian Lamparter
    Cc: Brett Rudley
    Cc: Roland Vossen
    Cc: Arend van Spriel
    Cc: "Franky (Zhenhui) Lin"
    Cc: Kan Yan
    Cc: Dan Williams
    Cc: Jussi Kivilinna
    Cc: Ivo van Doorn
    Cc: Gertjan van Wingerde
    Cc: Helmut Schaa
    Cc: Herton Ronaldo Krzesinski
    Cc: Hin-Tak Leung
    Cc: Larry Finger
    Cc: Chaoming Li
    Cc: Daniel Drake
    Cc: Ulrich Kunitz
    Signed-off-by: Sarah Sharp

    Sarah Sharp
     

19 Nov, 2011

1 commit


01 Nov, 2011

2 commits

  • A workqueue is allowed to sleep so we can safely use GFP_KERNEL instead of
    GFP_ATOMIC. This is still legacy code when the driver used timer BHs and not a
    worqueue.

    Signed-off-by: David Herrmann
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    David Herrmann
     
  • When disconnecting a bcm203x device we kill and destroy the usb-urb, however,
    there might still be a pending work-structure which resubmits the now invalid
    urb. To avoid this race condition, we simply set a shutdown-flag and
    synchronously kill the worker first.

    This also adds a comment to all schedule_work()s, as it is really not clear
    that they are used as replacement for short timers (which can be seen in the git
    history).

    Signed-off-by: David Herrmann
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    David Herrmann
     

22 Jul, 2010

1 commit

  • Use kmemdup when some other buffer is immediately copied into the
    allocated region.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression from,to,size,flag;
    statement S;
    @@

    - to = \(kmalloc\|kzalloc\)(size,flag);
    + to = kmemdup(from,size,flag);
    if (to==NULL || ...) S
    - memcpy(to, from, size);
    //

    Signed-off-by: Julia Lawall
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Julia Lawall
     

27 Feb, 2010

1 commit

  • The id_table field of the struct usb_device_id is constant in
    so it is worth to make bcm203x_table also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Márton Németh
    Cc: Julia Lawall
    Cc: cocci@diku.dk
    Signed-off-by: Marcel Holtmann

    Márton Németh
     

30 Nov, 2008

1 commit

  • With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
    allow debugging without having to recompile the kernel. This patch turns
    all BT_DBG() calls into pr_debug() to support dynamic debug messages.

    As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
    some broken debug entries have been fixed.

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     

08 Aug, 2008

1 commit


27 Feb, 2007

1 commit


22 Nov, 2006

1 commit


16 Oct, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

11 Jul, 2006

1 commit

  • Use release_firmware() to free requested resources.

    According to Documentation/firmware_class/README the request_firmware()
    call should be followed by a release_firmware(). Some drivers do not
    however free the firmware previously allocated with request_firmware().
    This patch tries to fix this by making sure that release_firmware() is used
    as expected.

    Signed-off-by: Magnus Damm
    Acked-by: Marcel Holtmann
    Cc: Mauro Carvalho Chehab
    Cc: "John W. Linville"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     

01 Jul, 2006

1 commit


05 Jan, 2006

1 commit


07 Nov, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds