05 Sep, 2020

1 commit

  • Use kobj_to_dev() instead of container_of()

    Signed-off-by: Wang Qing
    Acked-by: Viresh Kumar
    Acked-by: Johan Hovold
    Link: https://lore.kernel.org/r/1597289690-22857-1-git-send-email-wangqing@vivo.com
    Signed-off-by: Greg Kroah-Hartman

    Wang Qing
     

29 Jul, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1].

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

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200727183258.GA28571@embeddedor
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

13 May, 2020

1 commit

  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    sizeof(flexible-array-member) triggers a warning because flexible array
    members have incomplete type[1]. There are some instances of code in
    which the sizeof operator is being incorrectly/erroneously applied to
    zero-length arrays and the result is zero. Such instances may be hiding
    some bugs. So, this work (flexible-array member conversions) will also
    help to get completely rid of those sorts of issues.

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200507185318.GA14393@embeddedor
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

29 Apr, 2020

1 commit


10 Oct, 2019

1 commit


28 Aug, 2019

2 commits

  • The es2 Greybus host controller has long been stable, so move it out of
    drivers/staging/ to drivers/greybus/

    Cc: Johan Hovold
    Cc: greybus-dev@lists.linaro.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Viresh Kumar
    Acked-by: Alex Elder
    Link: https://lore.kernel.org/r/20190825055429.18547-10-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The Greybus core code has been stable for a long time, and has been
    shipping for many years in millions of phones. With the advent of a
    recent Google Summer of Code project, and a number of new devices in the
    works from various companies, it is time to get the core greybus code
    out of staging as it really is going to be with us for a while.

    Cc: Johan Hovold
    Cc: linux-kernel@vger.kernel.org
    Cc: greybus-dev@lists.linaro.org
    Acked-by: Viresh Kumar
    Acked-by: Alex Elder
    Link: https://lore.kernel.org/r/20190825055429.18547-9-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman