[PATCH 6/6] [RFC] mtd: mxc-nand: Warn on unimplemented commands

Lothar Waßmann LW at KARO-electronics.de
Wed Feb 11 00:42:56 PST 2015


Hi,

Uwe Kleine-König wrote:
> The PARAM command was long unimplemented and it probably wasn't
> noticed because chip probing using only the few bytes returned by the
> READID command are good enough in most cases to determine the chip in
> use.
> 
> Still to notice such a shortcoming earlier in the future would be nice
> in case it's something more vital.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
>  drivers/mtd/nand/mxc_nand.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index 0083b4ee4f33..372e0e38f59b 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -1160,6 +1160,10 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
>  		memcpy32_fromio(host->data_buf, host->main_area0, 512);
>  		host->buf_start = 0;
>  		break;
> +	default:
> +		WARN_ONCE(1, "Unimplemented command (cmd=%u)\n",
> +			  command);
> +		break;
>  	}
useless break;


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-mtd mailing list