16 Jan, 2012

1 commit


15 Jan, 2012

4 commits

  • This is a minor nicification: UBI_LAYOUT_VOLUME_TYPE and
    UBI_LAYOUT_VOLUME_ALIGN are currently defined but not used -
    use them.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Artem Bityutskiy

    Richard Weinberger
     
  • Currently it's possible to create a volume without a name. E.g:
    ubimkvol -n 32 -s 2MiB -t static /dev/ubi0 -N ""

    After that vtbl_check() will always fail because it does not permit
    empty strings.

    Cc: stable@kernel.org
    Signed-off-by: Richard Weinberger
    Signed-off-by: Artem Bityutskiy

    Richard Weinberger
     
  • * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
    MIPS: Delete unused function add_temporary_entry.
    MIPS: Set default pci cache line size.
    MIPS: Flush huge TLB
    MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
    MIPS: Octeon: Add support for OCTEON II PCIe
    MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
    MIPS: Alchemy: Update cpu-feature-overrides
    MIPS: Alchemy: db1200: Improve PB1200 detection.
    MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
    MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
    MIPS: Alchemy: irq: register pm at irq init time
    MIPS: Alchemy: Touchscreen support on DB1100
    MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
    net/irda: convert au1k_ir to platform driver.
    MIPS: Alchemy: remove unused board headers
    MTD: nand: make au1550nd.c a platform_driver
    MIPS: Netlogic: Mark Netlogic chips as SMT capable
    MIPS: Netlogic: Add support for XLP 3XX cores
    MIPS: Netlogic: Merge some of XLR/XLP wakup code
    MIPS: Netlogic: Add default XLP config.
    ...

    Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
    traps.c} and drivers/tty/serial/Makefile

    Linus Torvalds
     
  • Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1

    * tag 'for-linus' of git://github.com/rustyrussell/linux:
    module_param: check that bool parameters really are bool.
    intelfbdrv.c: bailearly is an int module_param
    paride/pcd: fix bool verbose module parameter.
    module_param: make bool parameters really bool (drivers & misc)
    module_param: make bool parameters really bool (arch)
    module_param: make bool parameters really bool (core code)
    kernel/async: remove redundant declaration.
    printk: fix unnecessary module_param_name.
    lirc_parallel: fix module parameter description.
    module_param: avoid bool abuse, add bint for special cases.
    module_param: check type correctness for module_param_array
    modpost: use linker section to generate table.
    modpost: use a table rather than a giant if/else statement.
    modules: sysfs - export: taint, coresize, initsize
    kernel/params: replace DEBUGP with pr_debug
    module: replace DEBUGP with pr_debug
    module: struct module_ref should contains long fields
    module: Fix performance regression on modules with large symbol tables
    module: Add comments describing how the "strmap" logic works

    Fix up conflicts in scripts/mod/file2alias.c due to the new linker-
    generated table approach to adding __mod_*_device_table entries. The
    ARM sa11x0 mcp bus needed to be converted to that too.

    Linus Torvalds
     

14 Jan, 2012

1 commit


13 Jan, 2012

2 commits

  • KMSG_DUMP_KEXEC is useless because we already save kernel messages inside
    /proc/vmcore, and it is unsafe to allow modules to do other stuffs in a
    crash dump scenario.

    [akpm@linux-foundation.org: fix powerpc build]
    Signed-off-by: WANG Cong
    Reported-by: Vivek Goyal
    Acked-by: Vivek Goyal
    Acked-by: Jarod Wilson
    Cc: "Eric W. Biederman"
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Rusty Russell

    Rusty Russell
     

12 Jan, 2012

1 commit

  • Patch ab50ff684707031ed4bad2fdd313208ae392e5bb broke UBI debugging messages:
    before that commit when UBI debugging was enabled, users saw few useful
    debugging messages after attaching an MTD device. However, that patch turned
    'dbg_msg()' into 'pr_debug()', so to enable the debugging messages users have
    to enable them first via /sys/kernel/debug/dynamic_debug/control, which is
    very impractical.

    This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just
    as it was before the breakage.

    Signed-off-by: Artem Bityutskiy
    Cc: stable@kernel.org [3.0+]

    Artem Bityutskiy
     

11 Jan, 2012

2 commits

  • * 'linux-next' of git://git.infradead.org/ubifs-2.6:
    UBI: fix use-after-free on error path
    UBI: fix missing scrub when there is a bit-flip
    UBIFS: Use kmemdup rather than duplicating its implementation

    Linus Torvalds
     
  • MTD pull for 3.3

    * tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6: (113 commits)
    mtd: Fix dependency for MTD_DOC200x
    mtd: do not use mtd->block_markbad directly
    logfs: do not use 'mtd->block_isbad' directly
    mtd: introduce mtd_can_have_bb helper
    mtd: do not use mtd->suspend and mtd->resume directly
    mtd: do not use mtd->lock, unlock and is_locked directly
    mtd: do not use mtd->sync directly
    mtd: harmonize mtd_writev usage
    mtd: do not use mtd->lock_user_prot_reg directly
    mtd: mtd->write_user_prot_reg directly
    mtd: do not use mtd->read_*_prot_reg directly
    mtd: do not use mtd->get_*_prot_info directly
    mtd: do not use mtd->read_oob directly
    mtd: mtdoops: do not use mtd->panic_write directly
    romfs: do not use mtd->get_unmapped_area directly
    mtd: do not use mtd->get_unmapped_area directly
    mtd: do use mtd->point directly
    mtd: introduce mtd_has_oob helper
    mtd: mtdcore: export symbols cleanup
    mtd: clean-up the default_mtd_writev function
    ...

    Fix up trivial edit/remove conflict in drivers/staging/spectra/lld_mtd.c

    Linus Torvalds
     

10 Jan, 2012

29 commits

  • Remove 'static' modifier from the 'vid_hdr' local variable. I do not know
    how it slipped in, but this is a bug and will break UBI if someone attaches
    2 UBI volumes at the same time.

    Artem: amended teh commit message, added -stable.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Artem Bityutskiy
    Cc: stable@kernel.org

    Richard Weinberger
     
  • clock management changes for i.MX

    Another simple series related to clock management, this time only for
    imx.

    * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: mxs: select HAVE_CLK_PREPARE for clock
    clk: add config option HAVE_CLK_PREPARE into Kconfig
    ASoC: mxs-saif: convert to clk_prepare/clk_unprepare
    video: mxsfb: convert to clk_prepare/clk_unprepare
    serial: mxs-auart: convert to clk_prepare/clk_unprepare
    net: flexcan: convert to clk_prepare/clk_unprepare
    mtd: gpmi-lib: convert to clk_prepare/clk_unprepare
    mmc: mxs-mmc: convert to clk_prepare/clk_unprepare
    dma: mxs-dma: convert to clk_prepare/clk_unprepare
    net: fec: add clk_prepare/clk_unprepare
    ARM: mxs: convert platform code to clk_prepare/clk_unprepare
    clk: add helper functions clk_prepare_enable and clk_disable_unprepare

    Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to
    commit 0ebafefcaa7a ("net: fec: add clk_prepare/clk_unprepare") clashing
    trivially with commit e163cc97f9ac ("net/fec: fix the .remove code").

    Linus Torvalds
     
  • Cleanups on various subarchitectures

    Cleanup patches for various ARM platforms and some of their associated
    drivers, the bulk of these is for mach-91.

    Arnd ended up pulling in the restart branch from Russell in order to
    fix up some simple but annoying merge conflicts.

    * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits)
    arm/at91: fix build of stamp9g20
    ARM: u300: delete memory.h
    MAINTAINERS: add maintainer entry for Picochip picoxcell
    ARM: picoxcell: move io mappings to common.c
    ARM: picoxcell: don't reserve irq_descs
    ARM: picoxcell: remove mach/memory.h
    ARM: at91: delete the pcontrol_g20_defconfig
    arm/tegra: Remove code that's ifndef CONFIG_ARM_GIC
    arm/tegra: remove unused defines
    arm/tegra: fix variable formatting in makefile
    ARM: davinci: vpif: move code to driver core header from platform
    ARM: at91/gpio: fix display of number of irq setuped
    ARM: at91/gpio: drop PIN_BASE
    ARM: at91/udc: use gpio_is_valid to check the gpio
    ARM: at91/ohci: use gpio_is_valid to check the gpio
    ARM: at91/nand: use gpio_is_valid to check the gpio
    ARM: at91/mmc: use gpio_is_valid to check the gpio
    ARM: at91/ide: use gpio_is_valid to check the gpio
    ARM: at91/pata: use gpio_is_valid to check the gpio
    ARM: at91/soc: use gpio_is_valid to check the gpio
    ...

    Linus Torvalds
     
  • Fix the following build warning:

    warning: (MTD_DOC2000 && MTD_DOC2001 && MTD_DOC2001PLUS) selects MTD_NAND_IDS
    which has unmet direct dependencies (MTD && MTD_NAND)

    Signed-off-by: Fabio Estevam
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Fabio Estevam
     
  • Instead, use the new 'mtd_can_have_bb()', or just rely on 'mtd_block_markbad()'
    return code, which will be -EOPNOTSUPP if bad blocks are not supported.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • This patch introduces new 'mtd_can_have_bb()' helper function which checks
    whether the flash can have bad eraseblocks. Then it changes all the
    direct 'mtd->block_isbad' use cases with 'mtd_can_have_bb()'.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Just call the 'mtd_suspend()' and 'mtd_resume()' - they will do nothing
    if the operation is not defined.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead, call the corresponding MTD API function which will return
    '-EOPNOTSUPP' if the operation is not supported.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • This patch teaches 'mtd_sync()' to do nothing when the MTD driver does
    not have the '->sync()' method, which allows us to remove all direct
    'mtd->sync' accesses.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • This patch makes the 'mtd_writev()' function more usable and logical. We first
    teach it to fall-back to the 'default_mtd_writev()' function if the MTD driver
    does not define its own '->writev()' method. Then we make block2mtd and JFFS2
    just 'mtd_writev()' instead of 'default_mtd_writev()' function. This means we
    can now stop exporting 'default_mtd_writev()' and instead, export
    'mtd_writev()'. This is much cleaner and more logical, as well as allows us to
    get read of another direct 'mtd->writev' access in JFFS2.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead, check the -EOPNOTSUPP return code of 'mtd_lock_user_prot_reg()'.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead, just call 'mtd_write_user_prot_reg()' and check the '-EOPNOTSUPP' return
    code.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead, call 'mtd_read_*_prot_info()' and check for -EOPNOTSUPP.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead, call 'mtd_get_*_prot_info()' and check for '-EOPNOTSUPP'. While
    on it, fix the return code from '-EOPNOTSUPP' to '-EINVAL' for the case
    when the mode parameter is invalid.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead of checking whether 'mtd->read_oob' is defined, just call
    'mtd_read_oob()' and handle the '-EOPNOTSUPP' error which will be returned
    if the function is undefined.

    Additionally, make 'mtd_write_oob()' return '-EOPNOTSUPP' if the function
    is undefined.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead of checking if 'mtd->panic_write' is defined, call 'mtd_panic_write()'
    and check the error code - '-EOPNOTSUPP' will be returned if the function is
    not defined.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Remove direct usage of mtd->get_unmapped_area. Instead, just call
    'mtd_get_unmapped_area()' which will return -EOPNOTSUPP if the function
    is not implemented and test for this error code.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • We are working in the direction of making sure that MTD clients to not
    use 'mtd->func' pointers directly. In some places we want to know if
    OOB operations are supported by an MTD device. Introduce 'mtd_has_oob()'
    helper for these purposes.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • The mtdcore.c file is a bit inconsistent - some EXPORT_SYMBOL_GPL declarations
    follow the corresponding functions, some are placed at the end. This patch
    harmonizes the file so that EXPORT_SYMBOL_GPL declarations follow the
    corresponding function.

    It also removes few extra newlines and trailing white-spaces.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • 1. Teach 'mtd_write()' function to return '-EROFS' if the write method
    is undefined, and remove the corresponding check from
    'default_mtd_writev()'.
    2. Do not test 'retlen' for NULL - it cannot be NULL.
    3. Few minor coding stile clean-ups.
    4. Add a kerneldoc comment

    Additionally, minor fixes to the kerneldoc comments of the neighbor function.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Fix the following gcc warning:
    drivers/mtd/devices/sst25l.c: In function ‘sst25l_probe’:
    drivers/mtd/devices/sst25l.c:381:11: warning: unused variable ‘i’ [-Wunused-variable]

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Fix this gcc warning:

    drivers/mtd/onenand/onenand_base.c: In function ‘onenand_block_markbad’:
    drivers/mtd/onenand/onenand_base.c:2636:23: warning: unused variable ‘this’ [-Wunused-variable]

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • ... since it is not needed because the generic 'dev_get_drvdata()' can be
    used instead.

    Signed-off-by: Artem Bityutskiy
    Acked-by: Mike Frysinger
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • MTD functions always assign the 'retlen' argument to 0 at the very
    beginning - the callers do not have to do this.

    I used the following semantic patch to find these places:

    @@
    identifier retlen;
    expression a, b, c, d, e;
    constant C;
    type T;
    @@
    (
    - retlen = C;
    |
    T
    -retlen = C
    + retlen
    ;
    )

    ... when != retlen
    when exists

    (
    mtd_read(a, b, c, &retlen, d)
    |
    mtd_write(a, b, c, &retlen, d)
    |
    mtd_panic_write(a, b, c, &retlen, d)
    |
    mtd_point(a, b, c, &retlen, d, e)
    |
    mtd_read_fact_prot_reg(a, b, c, &retlen, d)
    |
    mtd_write_user_prot_reg(a, b, c, &retlen, d)
    |
    mtd_read_user_prot_reg(a, b, c, &retlen, d)
    |
    mtd_writev(a, b, c, d, &retlen)
    )

    I ran it twice, because there were cases of double zero assigments
    in mtd tests. Then I went through the patch to verify that spatch
    did not find any false positives.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • The 'struct mtd_info' object is allocated with 'kzalloc()', so it
    contains only zeroes - no need to initialize various fields to 0 or
    NULL.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead of calling 'kmalloc()' and them 'memeset(0)', use 'kzalloc()'.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy