[PATCH] mtd: nand: cleanup ONFI printed errors, warnings
Brian Norris
computersforpeace at gmail.com
Mon Sep 30 19:20:52 EDT 2013
On Thu, Sep 12, 2013 at 7:49 AM, Ezequiel Garcia
<ezequiel.garcia at free-electrons.com> wrote:
> On Thu, Sep 12, 2013 at 09:24:14AM -0300, Ezequiel Garcia wrote:
>> Looks good. I'd suggest to put:
>>
>> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>>
>> at the top of this file, to prefix all the messages with a nice "nand:"
>> string, but then you may want to refactor the "NAND device:" notification.
>
> FWIW, here's my proposal (which applies on top of this patch):
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index d4578a1..ff5bb5a 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -29,6 +29,8 @@
> *
> */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/module.h>
> #include <linux/delay.h>
> #include <linux/errno.h>
> @@ -3449,10 +3451,11 @@ ident_done:
> if (mtd->writesize > 512 && chip->cmdfunc == nand_command)
> chip->cmdfunc = nand_command_lp;
>
> - pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
> - " %dMiB, page size: %d, OOB size: %d\n",
> - *maf_id, *dev_id, nand_manuf_ids[maf_idx].name,
> - chip->onfi_version ? chip->onfi_params.model : type->name,
> + pr_info("device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
> + *maf_id, *dev_id);
> + pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
> + chip->onfi_version ? chip->onfi_params.model : type->name);
> + pr_info("%dMiB, page size: %d, OOB size: %d\n",
> (int)(chip->chipsize >> 20), mtd->writesize, mtd->oobsize);
>
> return type;
>
I just pushed Huang's changes, which conflict with this. If you still
want this, go ahead and send a proper, updated patch with description
and sign-off.
Thanks,
Brian
More information about the linux-mtd
mailing list