02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Aug, 2017

1 commit

  • We are planning to share more code between different NAND based
    devices (SPI NAND, OneNAND and raw NANDs), but before doing that
    we need to move the existing include/linux/mtd/nand.h file into
    include/linux/mtd/rawnand.h so we can later create a nand.h header
    containing all common structure and function prototypes.

    Signed-off-by: Boris Brezillon
    Signed-off-by: Peter Pan
    Acked-by: Vladimir Zapolskiy
    Acked-by: Alexander Sverdlin
    Acked-by: Wenyou Yang
    Acked-by: Krzysztof Kozlowski
    Acked-by: Han Xu
    Acked-by: H Hartley Sweeten
    Acked-by: Shawn Guo
    Acked-by: Gregory CLEMENT
    Acked-by: Neil Armstrong
    Acked-by: Masahiro Yamada
    Acked-By: Harvey Hunt
    Acked-by: Tony Lindgren
    Acked-by: Krzysztof Halasa

    Boris Brezillon
     

10 Nov, 2016

1 commit

  • The Kconfig currently controlling compilation of this code is:

    config BF561_COREB
    bool "Enable Core B loader"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    Since module_misc_device translates to device_initcall in the non-modular
    case, the init ordering remains unchanged with this commit.

    We also delete the MODULE_LICENSE tag etc. since all that information
    was (or is now) contained at the top of the file in the comments.

    Cc: Bas Vermeulen
    Cc: Steven Miao
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Greg Kroah-Hartman

    Paul Gortmaker
     

05 Sep, 2016

1 commit


31 Aug, 2016

1 commit

  • Many modules call misc_register and misc_deregister in its module init
    and exit methods without any additional code. This ends up being
    boilerplate. This patch adds helper macro module_misc_device(), that
    replaces module_init()/ module_exit() with template functions.

    This patch also converts drivers to use new macro.

    Change since v1:
    Add device.h include in miscdevice.h as module_driver macro was not
    available from other include files in some architectures.

    Signed-off-by: PrasannaKumar Muralidharan
    Signed-off-by: Greg Kroah-Hartman

    PrasannaKumar Muralidharan
     

29 Aug, 2016

1 commit

  • Commit b70661c70830 ("net: smc91x: use run-time configuration on all ARM
    machines") broke some ARM platforms through several mistakes. Firstly,
    the access size must correspond to the following rule:

    (a) at least one of 16-bit or 8-bit access size must be supported
    (b) 32-bit accesses are optional, and may be enabled in addition to
    the above.

    Secondly, it provides no emulation of 16-bit accesses, instead blindly
    making 16-bit accesses even when the platform specifies that only 8-bit
    is supported.

    Reorganise smc91x.h so we can make use of the existing 16-bit access
    emulation already provided - if 16-bit accesses are supported, use
    16-bit accesses directly, otherwise if 8-bit accesses are supported,
    use the provided 16-bit access emulation. If neither, BUG(). This
    exactly reflects the driver behaviour prior to the commit being fixed.

    Since the conversion incorrectly cut down the available access sizes on
    several platforms, we also need to go through every platform and fix up
    the overly-restrictive access size: Arnd assumed that if a platform can
    perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
    size needed to be specified - not so, all available access sizes must
    be specified.

    This likely fixes some performance regressions in doing this: if a
    platform does not support 8-bit accesses, 8-bit accesses have been
    emulated by performing a 16-bit read-modify-write access.

    Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
    accesses, which was broken by the original commit.

    Fixes: b70661c70830 ("net: smc91x: use run-time configuration on all ARM machines")
    Signed-off-by: Russell King
    Tested-by: Robert Jarzmik
    Signed-off-by: David S. Miller

    Russell King
     

16 Jun, 2016

1 commit

  • Implement FETCH-OP atomic primitives, these are very similar to the
    existing OP-RETURN primitives we already have, except they return the
    value of the atomic variable _before_ modification.

    This is especially useful for irreversible operations -- such as
    bitops (because it becomes impossible to reconstruct the state prior
    to modification).

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Steven Miao
    Cc: Thomas Gleixner
    Cc: adi-buildroot-devel@lists.sourceforge.net
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

14 Jan, 2016

1 commit

  • Pull MTD updates from Brian Norris:
    "Generic MTD:

    - populate the MTD device 'of_node' field (and get a proper 'of_node'
    symlink in sysfs)

    This yielded some new helper functions, and changes across a
    variety of drivers

    - partitioning cleanups, to prepare for better device-tree based
    partitioning in the future

    Eliminate a lot of boilerplate for drivers that want to use
    OF-based partition parsing

    The DT bindings for this didn't settle yet, so most non-cleanup
    portions are deferred for a future release

    NAND:

    - embed a struct mtd_info inside struct nand_chip

    This is really long overdue; too many drivers have to do the same
    silly boilerplate to allocate and link up two "independent"
    structs, when in fact, everyone is assuming there is an exact 1:1
    relationship between a NAND chips struct and its underlying MTD.
    This aids improved helpers and should make certain abstractions
    easier in the future.

    Also causes a lot of churn, helped along by some automated code
    transformations

    - add more core support for detecting (and "correcting") bitflips in
    erased pages; requires opt-in by drivers, but at least we kill a
    few bad implementations and hopefully stave off future ones

    - pxa3xx_nand: cleanups, a few fixes, and PM improvements

    - new JZ4780 NAND driver

    SPI NOR:

    - provide default erase function, for controllers that just want to
    send the SECTOR_ERASE command directly

    - fix some module auto-loading issues with device tree
    ("jedec,spi-nor")

    - error handling fixes

    - new Mediatek QSPI flash driver

    Other:

    - cfi: force valid geometry Kconfig (finally!)

    This one used to trip up randconfigs occasionally, since bots
    aren't deterred by big scary "advanced configuration" menus

    More? Probably. See the commit logs"

    * tag 'for-linus-20160112' of git://git.infradead.org/linux-mtd: (168 commits)
    mtd: jz4780_nand: replace if/else blocks with switch/case
    mtd: nand: jz4780: Update ecc correction error codes
    mtd: nandsim: use nand_get_controller_data()
    mtd: jz4780_nand: remove useless mtd->priv = chip assignment
    staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers
    mtd: nand: make use of nand_set/get_controller_data() helpers
    ARM: make use of nand_set/get_controller_data() helpers
    mtd: nand: add helpers to access ->priv
    mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs
    mtd: nand: jz4740: remove custom 'erased check' implementation
    mtd: nand: diskonchip: remove custom 'erased check' implementation
    mtd: nand: davinci: remove custom 'erased check' implementation
    mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions
    mtd: nand: return consistent error codes in ecc.correct() implementations
    doc: dt: mtd: new binding for jz4780-{nand,bch}
    mtd: cfi_cmdset_0001: fixing memory leak and handling failed kmalloc
    mtd: spi-nor: wait until lock/unlock operations are ready
    mtd: tests: consolidate kmalloc/memset 0 call to kzalloc
    jffs2: use to_delayed_work
    mtd: nand: assign reasonable default name for NAND drivers
    ...

    Linus Torvalds
     

09 Dec, 2015

1 commit


17 Nov, 2015

1 commit

  • Currently, include/media is messy, as it contains both the V4L2 core
    headers and some driver-specific headers on the same place. That makes
    harder to identify what core headers should be documented and what
    headers belong to I2C drivers that are included only by bridge/main
    drivers that would require the functions provided by them.

    Let's move those i2c specific files to its own subdirectory.

    The files to move were produced via the following script:
    mkdir include/media/i2c
    (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
    (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
    for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done

    And the references corrected via this script:
    MAIN_DIR="media/"
    PREV_DIR="media/"
    DIRS="i2c/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
    for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
    n=`basename $j`
    git grep -l $n
    done
    done|sort|uniq >files && (
    echo "Handling files..." >&2;
    echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo "perl -ne 's,(include [\\\"\\&2;
    echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
    done;
    done;
    echo "cat > a && mv a \$i; done"
    );
    ) >script && . ./script

    Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Arnd Bergmann

    Mauro Carvalho Chehab
     

27 Jul, 2015

1 commit

  • Implement atomic logic ops -- atomic_{or,xor,and}.

    These will replace the atomic_{set,clear}_mask functions that are
    available on some archs.

    TODO: use inline asm or at least asm macros to collapse the lot.

    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Thomas Gleixner

    Peter Zijlstra
     

05 Mar, 2015

1 commit


24 Aug, 2014

1 commit

  • IRQ flags can be obtained from resource structure, there are no need
    to use additional field in the platform_data to store these values.
    This patch removes this field and convert existing users of this driver
    to use IRQ flags from the resources.

    Signed-off-by: Alexander Shiyan
    Signed-off-by: Tejun Heo

    Alexander Shiyan
     

26 Jul, 2014

1 commit


12 Apr, 2014

1 commit


15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    Note that some harmless section mismatch warnings may result, since
    notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
    are flagged as __cpuinit -- so if we remove the __cpuinit from
    arch specific callers, we will also get section mismatch warnings.
    As an intermediate step, we intend to turn the linux/init.h cpuinit
    content into no-ops as early as possible, since that will get rid
    of these warnings. In any case, they are temporary and harmless.

    This removes all the arch/blackfin uses of the __cpuinit macros from
    all C files. Currently blackfin does not have any __CPUINIT used in
    assembly files.

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: Mike Frysinger
    Cc: Bob Liu
    Cc: Sonic Zhang
    Cc: uclinux-dist-devel@blackfin.uclinux.org
    Acked-by: Mike Frysinger
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

11 Jul, 2013

1 commit


09 Jul, 2013

1 commit

  • release boot lock earlier to let coreb do setup and calibrate
    set coreb online later after initialization ready
    add BFIN_IPI_NONE IPI type
    drop unnecesarry smp_mb() and using atomic type

    Signed-off-by: Steven Miao

    Steven Miao
     

30 May, 2013

2 commits


13 Dec, 2012

1 commit


18 Aug, 2012

1 commit


24 Jul, 2012

1 commit


02 Jun, 2012

1 commit

  • Pull mtd update from David Woodhouse:
    - More robust parsing especially of xattr data in JFFS2
    - Updates to mxc_nand and gpmi drivers to support new boards and device tree
    - Improve consistency of information about ECC strength in NAND devices
    - Clean up partition handling of plat_nand
    - Support NAND drivers without dedicated access to OOB area
    - BCH hardware ECC support for OMAP
    - Other fixes and cleanups, and a few new device IDs

    Fixed trivial conflict in drivers/mtd/nand/gpmi-nand/gpmi-nand.c due to
    added include files next to each other.

    * tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd: (75 commits)
    mtd: mxc_nand: move ecc strengh setup before nand_scan_tail
    mtd: block2mtd: fix recursive call of mtd_writev
    mtd: gpmi-nand: define ecc.strength
    mtd: of_parts: fix breakage in Kconfig
    mtd: nand: fix scan_read_raw_oob
    mtd: docg3 fix in-middle of blocks reads
    mtd: cfi_cmdset_0002: Slight cleanup of fixup messages
    mtd: add fixup for S29NS512P NOR flash.
    jffs2: allow to complete xattr integrity check on first GC scan
    jffs2: allow to discriminate between recoverable and non-recoverable errors
    mtd: nand: omap: add support for hardware BCH ecc
    ARM: OMAP3: gpmc: add BCH ecc api and modes
    mtd: nand: check the return code of 'read_oob/read_oob_raw'
    mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw'
    mtd: m25p80: Add support for Winbond W25Q80BW
    jffs2: get rid of jffs2_sync_super
    jffs2: remove unnecessary GC pass on sync
    jffs2: remove unnecessary GC pass on umount
    jffs2: remove lock_super
    mtd: gpmi: add gpmi support for mx6q
    ...

    Linus Torvalds
     

21 May, 2012

1 commit


14 May, 2012

1 commit


21 Mar, 2012

3 commits


09 Jan, 2012

5 commits


14 Nov, 2011

1 commit


26 Oct, 2011

1 commit


23 Jul, 2011

4 commits