05 May, 2021

1 commit


27 Feb, 2021

1 commit


15 Feb, 2021

2 commits


16 Dec, 2020

3 commits

  • …ux/kernel/git/gustavoars/linux

    Pull fallthrough fixes from Gustavo A. R. Silva:
    "Fix many fall-through warnings when building with Clang 12.0.0
    using -Wimplicit-fallthrough.

    - powerpc: boot: include compiler_attributes.h (Nick Desaulniers)

    - Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"
    (Nick Desaulniers)

    - powerpc: fix -Wimplicit-fallthrough (Nick Desaulniers)

    - lib: Fix fall-through warnings for Clang (Gustavo A. R. Silva)"

    * tag 'fallthrough-fixes-clang-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
    lib: Fix fall-through warnings for Clang
    powerpc: fix -Wimplicit-fallthrough
    Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"
    powerpc: boot: include compiler_attributes.h

    Linus Torvalds
     
  • In the future we would like to use get_option() to only validate the
    string and parse it separately. To achieve this, allow NULL to be an
    output for get_option().

    Link: https://lkml.kernel.org/r/20201112180732.75589-5-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko
    Cc: Brendan Higgins
    Cc: David Gow
    Cc: Mark Brown
    Cc: Matti Vaittinen
    Cc: Shuah Khan
    Cc: Vitor Massaru Iha
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • When string doesn't have an integer and starts from hyphen get_option()
    may return interesting results. Fix it to return 0.

    The simple_strtoull() is used due to absence of simple_strtoul() in a boot
    code on some architectures.

    Note, the Fixes tag below is rather for anthropological curiosity.

    Link: https://lkml.kernel.org/r/20201112180732.75589-4-andriy.shevchenko@linux.intel.com
    Fixes: f68565831e72 ("Import 2.4.0-test2pre3")
    Signed-off-by: Andy Shevchenko
    Cc: Brendan Higgins
    Cc: David Gow
    Cc: Mark Brown
    Cc: Matti Vaittinen
    Cc: Shuah Khan
    Cc: Vitor Massaru Iha
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     

19 Nov, 2020

2 commits

  • In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
    warnings by explicitly adding multiple break statements instead of
    letting the code fall through to the next case, and by replacing a
    number of /* fall through */ comments with the new pseudo-keyword
    macro fallthrough.

    Notice that Clang doesn't recognize /* Fall through */ comments as
    implicit fall-through markings.

    Link: https://github.com/KSPP/linux/issues/115
    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     
  • This reverts commit 6a9dc5fd6170 ("lib: Revert use of fallthrough
    pseudo-keyword in lib/")

    Now that we can build arch/powerpc/boot/ free of -Wimplicit-fallthrough,
    re-enable these fixes for lib/.

    Signed-off-by: Nick Desaulniers
    Tested-by: Nathan Chancellor
    Reviewed-by: Nathan Chancellor
    Reviewed-by: Gustavo A. R. Silva
    Reviewed-by: Miguel Ojeda
    Link: https://github.com/ClangBuiltLinux/linux/issues/236
    Signed-off-by: Gustavo A. R. Silva

    Nick Desaulniers
     

25 Aug, 2020

1 commit

  • The following build error for powerpc64 was reported by Nathan Chancellor:

    "$ scripts/config --file arch/powerpc/configs/powernv_defconfig -e KERNEL_XZ

    $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- distclean powernv_defconfig zImage
    ...
    In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:234,
    from arch/powerpc/boot/decompress.c:38:
    arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c: In function 'dec_main':
    arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:586:4: error: 'fallthrough' undeclared (first use in this function)
    586 | fallthrough;
    | ^~~~~~~~~~~

    This will end up affecting distribution configurations such as Debian
    and OpenSUSE according to my testing. I am not sure what the solution
    is, the PowerPC wrapper does not set -D__KERNEL__ so I am not sure
    that compiler_attributes.h can be safely included."

    In order to avoid these sort of problems, it seems that the best
    solution is to use /* fall through */ comments instead of the
    fallthrough pseudo-keyword macro in lib/, for now.

    Reported-by: Nathan Chancellor
    Fixes: df561f6688fe ("treewide: Use fallthrough pseudo-keyword")
    Signed-off-by: Gustavo A. R. Silva
    Reviewed-and-tested-by: Nathan Chancellor
    Signed-off-by: Linus Torvalds

    Gustavo A. R. Silva
     

24 Aug, 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/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

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

    Gustavo A. R. Silva
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this source code is licensed under the gnu general public license
    version 2 see the file copying for more details

    this source code is licensed under general public license version 2
    see

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190602204653.449021192@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

09 Apr, 2019

1 commit

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

    This patch fixes the following warnings:

    lib/cmdline.c:137:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    lib/cmdline.c:140:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    lib/cmdline.c:143:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    lib/cmdline.c:146:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    lib/cmdline.c:149:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

    Warning level 3 was used: -Wimplicit-fallthrough=3

    This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

    Acked-by: Kees Cook
    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

09 Sep, 2017

1 commit

  • One line of code was commented out by c++ style comment for debugging, but
    forgot removing it.

    Clean it up.

    Link: http://lkml.kernel.org/r/1503312113-11843-1-git-send-email-bhe@redhat.com
    Signed-off-by: Baoquan He
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Baoquan He
     

24 Jun, 2017

1 commit

  • When using get_options() it's possible to specify a range of numbers,
    like 1-100500. The problem is that it doesn't track array size while
    calling internally to get_range() which iterates over the range and
    fills the memory with numbers.

    Link: http://lkml.kernel.org/r/2613C75C-B04D-4BFF-82A6-12F97BA0F620@gmail.com
    Signed-off-by: Ilya V. Matveychikov
    Cc: Jonathan Corbet
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ilya Matveychikov
     

18 Apr, 2017

1 commit

  • next_arg() will be used to parse boot parameters in the x86/boot/compressed code,
    so move it to lib/cmdline.c for better code reuse.

    No change in functionality.

    Signed-off-by: Baoquan He
    Cc: Andrew Morton
    Cc: Gustavo Padovan
    Cc: Jens Axboe
    Cc: Jessica Yu
    Cc: Johannes Berg
    Cc: Josh Triplett
    Cc: Larry Finger
    Cc: Linus Torvalds
    Cc: Niklas Söderlund
    Cc: Peter Zijlstra
    Cc: Petr Mladek
    Cc: Rasmus Villemoes
    Cc: Thomas Gleixner
    Cc: dan.j.williams@intel.com
    Cc: dave.jiang@intel.com
    Cc: dyoung@redhat.com
    Cc: keescook@chromium.org
    Cc: zijun_hu
    Link: http://lkml.kernel.org/r/1492436099-4017-2-git-send-email-bhe@redhat.com
    Signed-off-by: Ingo Molnar

    Baoquan He
     

04 Oct, 2014

1 commit


07 Aug, 2014

1 commit


24 Jan, 2014

2 commits

  • WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(memparse);

    WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(get_option);

    WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(get_options);

    Signed-off-by: Felipe Contreras
    Cc: Levente Kurusa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Contreras
     
  • WARNING: space prohibited between function name and open parenthesis '('
    +int get_option (char **str, int *pint)

    WARNING: space prohibited between function name and open parenthesis '('
    + *pint = simple_strtol (cur, str, 0);

    ERROR: trailing whitespace
    + $

    WARNING: please, no spaces at the start of a line
    + $

    WARNING: space prohibited between function name and open parenthesis '('
    + res = get_option ((char **)&str, ints + i);

    Signed-off-by: Felipe Contreras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Contreras
     

08 Mar, 2012

1 commit


28 Jul, 2008

1 commit


26 Jul, 2008

1 commit

  • Extend memparse() to allow the caller to use a NULL second parameter, which
    would represent no interest in returning the address of the end of the parsed
    string.

    In numerous cases, callers invoke memparse() to parse a possibly-suffixed
    string (such as "64K" or "2G" or whatever) and define a character pointer to
    accept the end pointer being returned by memparse() even though they have no
    interest in it and promptly throw it away.

    This (backward-compatible) enhancement allows callers to use NULL in the cases
    where they just don't care about getting back that end pointer.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

12 Feb, 2007

1 commit

  • A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
    source files, including:

    * make multi-line initial descriptions single line
    * denote some function names, constants and structs as such
    * change erroneous opening '/*' to '/**' in a few places
    * reword some text for clarity

    Signed-off-by: Robert P. J. Day
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

1 commit

  • This allows a hyphenated range of positive numbers in the string passed
    to command line helper function, get_options.

    Currently the command line option "isolcpus=" takes as its argument a
    list of cpus.

    Format: ,...,
    Valid values of include all cpus, 0 to "number of CPUs in
    system - 1". This can get extremely long when isolating the majority of
    cpus on a large system. The kernel isolcpus code would not need any
    changing to use this feature. To use it, the change would be in the
    command line format for 'isolcpus='
    Format:
    ,...,
    or
    - (must be a positive range in ascending
    order.)
    or a mixture
    ,...,-

    Signed-off-by: Derek Fults
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Derek Fults
     

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