30 Jun, 2020

1 commit

  • We need to ensure there's a place for the NULL terminator.

    Fixes the following W=1 warning(s):

    In file included from include/linux/bitmap.h:9,
    from include/linux/nodemask.h:95,
    from include/linux/mmzone.h:17,
    from include/linux/gfp.h:6,
    from include/linux/umh.h:4,
    from include/linux/kmod.h:9,
    from include/linux/module.h:16,
    from drivers/misc/c2port/core.c:9:
    In function ‘strncpy’,
    inlined from ‘c2port_device_register’ at drivers/misc/c2port/core.c:926:2:
    include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
    297 | #define __underlying_strncpy __builtin_strncpy
    | ^
    include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
    307 | return __underlying_strncpy(p, q, size);
    | ^~~~~~~~~~~~~~~~~~~~

    Cc: Rodolfo Giometti
    Cc: "Eurotech S.p.A"
    Acked-by: Rodolfo Giometti
    Signed-off-by: Lee Jones
    Link: https://lore.kernel.org/r/20200626130525.389469-2-lee.jones@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Lee Jones
     

23 Jun, 2019

1 commit


19 Jun, 2019

1 commit

  • Based on 2 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 version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

09 Jun, 2019

1 commit


25 May, 2019

1 commit

  • 'default n' is the default value for any bool or tristate Kconfig
    setting so there is no need to write it explicitly.

    Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
    is not set' for visible symbols") the Kconfig behavior is the same
    regardless of 'default n' being present or not:

    ...
    One side effect of (and the main motivation for) this change is making
    the following two definitions behave exactly the same:

    config FOO
    bool

    config FOO
    bool
    default n

    With this change, neither of these will generate a
    '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
    That might make it clearer to people that a bare 'default n' is
    redundant.
    ...

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Frederic Barrat
    Acked-by: Arnd Bergmann
    Acked-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Bartlomiej Zolnierkiewicz
     

21 May, 2019

1 commit


16 Nov, 2017

1 commit

  • Patch series "kmemcheck: kill kmemcheck", v2.

    As discussed at LSF/MM, kill kmemcheck.

    KASan is a replacement that is able to work without the limitation of
    kmemcheck (single CPU, slow). KASan is already upstream.

    We are also not aware of any users of kmemcheck (or users who don't
    consider KASan as a suitable replacement).

    The only objection was that since KASAN wasn't supported by all GCC
    versions provided by distros at that time we should hold off for 2
    years, and try again.

    Now that 2 years have passed, and all distros provide gcc that supports
    KASAN, kill kmemcheck again for the very same reasons.

    This patch (of 4):

    Remove kmemcheck annotations, and calls to kmemcheck from the kernel.

    [alexander.levin@verizon.com: correctly remove kmemcheck call from dma_map_sg_attrs]
    Link: http://lkml.kernel.org/r/20171012192151.26531-1-alexander.levin@verizon.com
    Link: http://lkml.kernel.org/r/20171007030159.22241-2-alexander.levin@verizon.com
    Signed-off-by: Sasha Levin
    Cc: Alexander Potapenko
    Cc: Eric W. Biederman
    Cc: Michal Hocko
    Cc: Pekka Enberg
    Cc: Steven Rostedt
    Cc: Tim Hansen
    Cc: Vegard Nossum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Levin, Alexander (Sasha Levin)
     

09 May, 2017

1 commit


08 Feb, 2016

1 commit


29 Sep, 2015

1 commit


25 Jul, 2013

3 commits


28 Feb, 2013

1 commit


18 Sep, 2012

1 commit


07 May, 2012

1 commit

  • Strictly speaking "no" is a valid, but undefined, Kconfig symbol. But what
    obviously was meant here was "n".

    While we're touching this Kconfig file also drop the superfluous
    dependency on C2PORT for C2PORT_DURAMAR_2150. Its Kconfig entry is
    already wrapped in "if C2PORT" and "endif".

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

06 Mar, 2012

1 commit


25 Jan, 2012

1 commit

  • This file needs the basic headers for resource management,
    otherwise we will see this build error:

    CC [M] drivers/misc/c2port/c2port-duramar2150.o
    drivers/misc/c2port/c2port-duramar2150.c: In function ‘duramar2150_c2port_init’:
    drivers/misc/c2port/c2port-duramar2150.c:125:2: error: implicit declaration of function ‘request_region’ [-Werror=implicit-function-declaration]
    drivers/misc/c2port/c2port-duramar2150.c:139:2: error: implicit declaration of function ‘release_region’ [-Werror=implicit-function-declaration]

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     

31 Mar, 2011

1 commit


22 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

25 Mar, 2010

1 commit


15 Jun, 2009

1 commit


16 Nov, 2008

1 commit

  • m68k allmodconfig:

    | drivers/misc/c2port/core.c: In function 'c2port_reset':
    | drivers/misc/c2port/core.c:73: error: dereferencing pointer to incomplete type
    | drivers/misc/c2port/core.c: In function 'c2port_strobe_ck':
    | drivers/misc/c2port/core.c:91: error: dereferencing pointer to incomplete type

    Include to fix it, as m68k's local_irq_enable() needs to know
    about struct task_struct.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

13 Nov, 2008

2 commits

  • Signed-off-by: Rodolfo Giometti
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rodolfo Giometti
     
  • C2port implements a two wire serial communication protocol (bit
    banging) designed to enable in-system programming, debugging, and
    boundary-scan testing on low pin-count Silicon Labs devices.

    Currently this code supports only flash programming through sysfs
    interface but extensions shoud be easy to add.

    Signed-off-by: Rodolfo Giometti
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rodolfo Giometti