10 Jul, 2016

1 commit

  • Replace if condition and BUG() with a BUG_ON having the conditional
    expression of the if statement as argument.

    The Coccinelle semantic patch used to make this change is as follows:
    @@ expression E,f; @@

    (
    if () { BUG(); }
    |
    - if (E) { BUG(); }
    + BUG_ON(E);
    )

    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Brian Norris

    Amitoj Kaur Chawla
     

28 Oct, 2013

1 commit

  • This helper detects that whether the mtd's type is nand type.

    Now, it's clear that the MTD_NANDFLASH stands for SLC nand only.
    So use the mtd_type_is_nand() to replace the old check method
    to do the nand type (include the SLC and MLC) check.

    Signed-off-by: Huang Shijie
    Signed-off-by: Brian Norris

    Huang Shijie
     

10 Jan, 2012

3 commits


11 Sep, 2011

3 commits

  • These modes are not necessarily for OOB only. Particularly, MTD_OOB_RAW
    affected operations on in-band page data as well. To clarify these
    options and to emphasize that their effect is applied per-operation, we
    change the primary prefix to MTD_OPS_.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • Start moving away from the MTD_DEBUG_LEVEL messages. The dynamic
    debugging feature is a generic kernel feature that provides more
    flexibility.

    (See Documentation/dynamic-debug-howto.txt)

    Also fix some punctuation, indentation, and capitalization that went
    along with the affected lines.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     
  • When a memory allocation fails, the kernel will print out a backtrace
    automatically. These print statements are unnecessary.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy

    Brian Norris
     

09 Aug, 2010

1 commit


27 Feb, 2010

1 commit

  • * Add locking where it was missing.

    * Don't do a get_mtd_device in blktrans_open because it would lead to a
    deadlock; instead do that in add_mtd_blktrans_dev.

    * Only free the mtd_blktrans_dev structure when the last user exits.

    * Flush request queue on device removal.

    * Track users, and call tr->release in del_mtd_blktrans_dev
    Due to that ->open and release aren't called more that once.

    Now it is safe to call del_mtd_blktrans_dev while the device is still in use.

    Signed-off-by: Maxim Levitsky
    Signed-off-by: David Woodhouse

    Maxim Levitsky
     

10 Dec, 2008

1 commit

  • MTD internal API presently uses 32-bit values to represent
    device size. This patch updates them to 64-bits but leaves
    the external API unchanged. Extending the external API
    is a separate issue for several reasons. First, no one
    needs it at the moment. Secondly, whether the implementation
    is done with IOCTLs, sysfs or both is still debated. Thirdly
    external API changes require the internal API to be accepted
    first.

    Note that although the MTD API will be able to support 64-bit
    device sizes, existing drivers do not and are not required
    to do so, although NAND base has been updated.

    In general, changing from 32-bit to 64-bit values cause little
    or no changes to the majority of the code with the following
    exceptions:
    - printk message formats
    - division and modulus of 64-bit values
    - NAND base support
    - 32-bit local variables used by mtdpart and mtdconcat
    - naughtily assuming one structure maps to another
    in MEMERASE ioctl

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

    Adrian Hunter
     

03 Aug, 2008

1 commit


11 Dec, 2006

1 commit

  • I will not commit even trivial and obvious one-line fixes without building.
    I will not commit even trivial and obvious one-line fixes without building.
    I will not commit even trivial and obvious one-line fixes without building.
    I will not commit even trivial and obvious one-line fixes without building.
    Only clever people can get away with that.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

10 Dec, 2006

1 commit


29 Nov, 2006

1 commit

  • As was discussed between Ricard Wanderlöf, David Woodhouse, Artem
    Bityutskiy and me, the current API for reading/writing OOB is confusing.

    The thing that introduces confusion is the need to specify ops.len
    together with ops.ooblen for reads/writes that concern only OOB not data
    area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to
    specify the length of the data read, and when ops.datbuf == NULL, it
    serves to specify the full OOB read length.

    The patch inlined below is the slightly updated version of the previous
    patch serving the same purpose, but with the new Artem's comments taken
    into account.

    Artem, BTW, thanks a lot for your valuable input!

    Signed-off-by: Vitaly Wool
    Signed-off-by: David Woodhouse

    Vitaly Wool
     

23 Sep, 2006

2 commits


22 Sep, 2006

1 commit