The patch titled NAND: fix broken debug messages has been added to the -mm tree. Its filename is nand-fix-broken-debug-messages.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: NAND: fix broken debug messages From: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Fix incorrect debug messages (*write* not read); someone committed some cut'n'paste bugs. There might be more, I only noticed these since I was looking for nand_read usage and landed in some very wrong functions. IMO all MTD debugging message framework is goofed, anyway. It uses "DEBUG" in a way that's incompatible with usage most everywhere else in the kernel, and which prevents normal pr_dbg() and dev_dbg() calls from working right. Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/mtd/nand/nand_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/mtd/nand/nand_base.c~nand-fix-broken-debug-messages drivers/mtd/nand/nand_base.c --- a/drivers/mtd/nand/nand_base.c~nand-fix-broken-debug-messages +++ a/drivers/mtd/nand/nand_base.c @@ -1948,7 +1948,7 @@ static int nand_do_write_oob(struct mtd_ } if (unlikely(ops->ooboffs >= len)) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " + DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: " "Attempt to start write outside oob\n"); return -EINVAL; } @@ -1958,7 +1958,7 @@ static int nand_do_write_oob(struct mtd_ ops->ooboffs + ops->ooblen > ((mtd->size >> chip->page_shift) - (to >> chip->page_shift)) * len)) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " + DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: " "Attempt write beyond end of device\n"); return -EINVAL; } @@ -2014,8 +2014,8 @@ static int nand_write_oob(struct mtd_inf /* Do not allow writes past end of device */ if (ops->datbuf && (to + ops->len) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " - "Attempt read beyond end of device\n"); + DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: " + "Attempt write beyond end of device\n"); return -EINVAL; } _ Patches currently in -mm which might be from dbrownell@xxxxxxxxxxxxxxxxxxxxx are linux-next.patch nand-fix-raw-reads-with-ecc-syndrome-layouts.patch nand-davinci_nand-driver.patch nand-fix-broken-debug-messages.patch mtd-we-dont-need-no-misc-devices.patch blackfin-spi-driver-fix-erroneous-spi-clock-divisor-calculation.patch blackfin-spi-driver-remove-useless-asm-cplbinith.patch blackfin-spi-driver-use-len_in_bytes-when-we-care-about-the-number-of-bytes-transferred.patch blackfin-spi-driver-pass-dma-overflow-error-to-the-higher-level.patch blackfin-spi-driver-unify-duplicated-code-in-dma-read-write-paths.patch blackfin-spi-driver-drop-bogus-cast-and-touchup-dma-label.patch blackfin-spi-driver-get-dma-working-for-spi-flashes.patch blackfin-spi-driver-fix-bug-spi-controller-driver-does-not-assert-deassert-cs-correctly.patch blackfin-spi-driver-fix-bug-correct-usage-of-struct-spi_transfercs_change.patch spi-limit-reaches-1-tested-0.patch rtc-ds1307-true-smbus-compatibility.patch gpio-gpio_requestfree-now-required-feature-removal.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html