[PATCH V2] mtd: gpmi: fix the NULL pointer

Brian Norris computersforpeace at gmail.com
Mon Nov 11 23:27:53 EST 2013


+ Fabio, in case he missed this (it was also in HTML, so it might not
have gotten through the filters)

On Tue, Nov 12, 2013 at 11:28:24AM +0800, Huang Shijie wrote:
> 于 2013年11月12日 11:18, Brian Norris 写道:
> 
>     So I would recommend the following: set the NAND_SKIP_BBTSCAN, then
>     rearrange to the following call structure:
> 
>      |_ nand_scan_ident
>      |_ chip->options |= NAND_SKIP_BBTSCAN;
>      |_ nand_init_last
>        |_ gpmi_init_last [1]
>          |_ gpmi_set_geometry
>      |_ nand_scan_tail
>      |_ gpmi_pre_bbt_scan [2]
>        |_ nand_boot_init
>          |_ mx23_boot_init
>            |_ mx23_check_transcription_stamp
>            |_ mx23_write_transcription_stamp
>      |_ chip->scan_bbt() [3]
> 
>     Regarding [1] and [2]: we can split apart the code from gpmi_init_last()
>     so that have the stuff that is *only* necessary to do before [3] placed
>     under [2]. That way, nand_scan_tail() will initialize remaining pieces,
>     and all you have to do is configure and run your BBT scan. No more
>     dancing around uninitialized callback functions or buffers.
> 
>     What do you think?
> 
> it's ok to me. I will code the patch right now, and send out it after i test
> it.

Sounds good.

Brian



More information about the linux-mtd mailing list