mtd: miscellaneous fixes
Subsystems (3)
cover mtd: miscellaneous fixes
Hi all,
In poking around various drivers for my own work and for (sub)maintaining MTD stuff, I found an assortment of fixes to make. Most of these should be trivial and obvious, but they could use a glance by a few people. They have generally been compile tested only.
Brian
Brian Norris (12):
nand: docg4: use nand_base's default BBT scan
mtd: nand: lpc32xx_slc: don't call nand_default_bbt directly
mtd: nandsim: don't call nand_default_bbt() directly
mtd: nand: stop exporting nand_default_bbt
mtd: dataflash: remove unused field
mtd: denali: make init function static
mtd: nand: return failure when failing to get ECC from ONFI
mtd: nand: don't print ONFI buswidth errors unless we need to
mtd: onenand: remove redundant offset check
mtd: nand: remove obsolete 'ecclayout' field
mtd: onenand: remove unused variable assignments
mtd: lpddr_cmds: make function static
drivers/mtd/devices/mtd_dataflash.c | 2 -- drivers/mtd/lpddr/lpddr_cmds.c | 2 +- drivers/mtd/nand/denali.c | 2 +- drivers/mtd/nand/docg4.c | 1 - drivers/mtd/nand/fsl_elbc_nand.c | 2 -- drivers/mtd/nand/fsl_ifc_nand.c | 2 -- drivers/mtd/nand/lpc32xx_slc.c | 8 -------- drivers/mtd/nand/nand_base.c | 23 ++++++++++++++++------- drivers/mtd/nand/nand_bbt.c | 1 - drivers/mtd/nand/nandsim.c | 2 +- drivers/mtd/onenand/onenand_base.c | 17 ++++++----------- include/linux/mtd/nand.h | 1 - 12 files changed, 25 insertions(+), 38 deletions(-)
Signature · 1 line
1.8.4
PATCH 1/12 nand: docg4: use nand_base's default BBT scan
There's no point in the low level driver doing the work that nand_base already is doing; just let nand_base set the default BBT scanning function.
--- drivers/mtd/nand/docg4.c | 1 - 1 file changed, 1 deletion(-)
drivers/mtd/nand/docg4.c +0 -1
@@ -1239,7 +1239,6 @@ static void __init init_mtd_structs(struct mtd_info *mtd) nand->block_markbad = docg4_block_markbad; nand->read_buf = docg4_read_buf; nand->write_buf = docg4_write_buf16; - nand->scan_bbt = nand_default_bbt; nand->erase_cmd = docg4_erase_block; nand->ecc.read_page = docg4_read_page; nand->ecc.write_page = docg4_write_page;
Signature · 1 line
1.8.4
Re: [PATCH 01/12] nand: docg4: use nand_base's default BBT scan
Quoted 15 lines · Brian Norris
There's no point in the low level driver doing the work that
nand_basealready is doing; just letnand_baseset the default BBT scanning function.Signed-off-by Brian Norris <[email protected]>--- drivers/mtd/nand/docg4.c | 1 - 1 file changed, 1 deletion(-)drivers/mtd/nand/docg4.c +0
-0
drivers/mtd/nand/docg4.c static void __init init_mtd_structs(struct mtd_info *mtd) · line 1244
Quoted 7 lines
drivers/mtd/nand/docg4.c +0
-1@@ -1239,7 +1239,6 @@ static void __init init_mtd_structs(struct mtd_info *mtd) nand->block_markbad = docg4_block_markbad; nand->read_buf = docg4_read_buf; nand->write_buf = docg4_write_buf16; - nand->scan_bbt = nand_default_bbt; nand->erase_cmd = docg4_erase_block; nand->ecc.read_page = docg4_read_page; nand->ecc.write_page = docg4_write_page;
Not sure why I explicitly set that. Thanks!
PATCH 2/12 mtd: nand: lpc32xx_slc: don't call nand_default_bbt directly
In reply to Brian NorrisThis driver is doing some strange logic here. If it doesn't have flash-based BBT enabled, it allows nand_scan_tail() to scan the BBT. But if it is using flash-based BBT, it tells nand_scan_tail() to skip scanning, then it immediately calls the default BBT scanning function itself.
As I read it, this logic is equivalent to the default nand_scan_tail() behavior without interfering with NAND_SKIP_BBTSCAN or calling nand_default_bbt() directly at all.
--- drivers/mtd/nand/lpc32xx_slc.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/mtd/nand/lpc32xx_slc.c +0 -8
@@ -893,7 +893,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)/* Avoid extra scan if using BBT, setup BBT support */ if (host->ncfg->use_bbt) { - chip->options |=NAND_SKIP_BBTSCAN ; chip->bbt_options |=NAND_BBT_USE_FLASH ;/*
@@ -915,13 +914,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) goto err_exit3; } -/* Standard layout in FLASH for bad block tables */ -if (host->ncfg->use_bbt) { -if (nand_default_bbt (mtd) <0 ) -dev_err (&pdev->dev, -"Error initializing default bad block tables\n" ); - } - mtd->name ="nxp_lpc3220_slc" ; ppdata.of_node = pdev->dev.of_node; res = mtd_device_parse_register(mtd, NULL, &ppdata, host->ncfg->parts,
Signature · 1 line
1.8.4
PATCH 3/12 mtd: nandsim: don't call nand_default_bbt() directly
In reply to Brian NorrisWe want the default nand_chip.scan_bbt() function, so just use the proper indirection.
--- drivers/mtd/nand/nandsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nandsim.c +1 -1
@@ -2372,7 +2372,7 @@ static int __init ns_init_module(void)if ((retval =init_nandsim (nsmtd)) !=0 ) goto err_exit; -if ((retval =nand_default_bbt (nsmtd)) !=0 ) +if ((retval = chip->scan_bbt (nsmtd)) !=0 ) goto err_exit;if ((retval =parse_badblocks (nand, nsmtd)) !=0 )
Signature · 1 line
1.8.4
PATCH 4/12 mtd: nand: stop exporting nand_default_bbt
In reply to Brian NorrisI removed the last non-nand_base users of this, and we shouldn't have any more modules that need to access it. It's only non-static to share between nand_base and nand_bbt.
--- drivers/mtd/nand/nand_bbt.c | 1 - 1 file changed, 1 deletion(-)
drivers/mtd/nand/nand_bbt.c +0 -1
@@ -1392,4 +1392,3 @@ int nand_markbad_bbt(struct mtd_info *mtd, loff_t offs) }EXPORT_SYMBOL (nand_scan_bbt); -EXPORT_SYMBOL (nand_default_bbt);
Signature · 1 line
1.8.4
PATCH 5/12 mtd: dataflash: remove unused field
In reply to Brian Norrisstruct dataflash's 'partition' field is unused. Just remove it.
--- drivers/mtd/devices/mtd_dataflash.c | 2 -- 1 file changed, 2 deletions(-)
drivers/mtd/devices/mtd_dataflash.c +0 -2
@@ -88,8 +88,6 @@ struct dataflash {uint8_t command[4 ];char name[24 ]; - unsigned partitioned:1; -unsigned short page_offset;/* offset in flash address */ unsigned int page_size;/* of bytes per page */
Signature · 1 line
1.8.4
PATCH 6/12 mtd: denali: make init function static
In reply to Brian NorrisIt's only used in this file.
--- drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/denali.c +1 -1
@@ -1394,7 +1394,7 @@ static struct nand_bbt_descr bbt_mirror_descr = { };/* initialize driver data structures */ -void denali_drv_init (struct denali_nand_info *denali) +static void denali_drv_init (struct denali_nand_info *denali) { denali->idx =0 ;
Signature · 1 line
1.8.4
PATCH 7/12 mtd: nand: return failure when failing to get ECC from ONFI
In reply to Brian NorrisIf ONFI fails to provide ECC information, we should not use it. Print appropriate error messages and return.
--- drivers/mtd/nand/nand_base.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/mtd/nand/nand_base.c +7 -2
@@ -3010,8 +3010,13 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, chip->cmdfunc = nand_command_lp;/* The Extended Parameter Page is supported since ONFI 2.1. */ -if (nand_flash_detect_ext_param_page (mtd, chip, p)) -pr_info ("Failed to detect the extended param page.\n" ); +if (nand_flash_detect_ext_param_page (mtd, chip, p)) { +pr_info ("Failed to detect ONFI extended param page\n" ); +return 0 ; + } + }else { +pr_err ("Could not retrieve ONFI ECC requirements\n" ); +return 0 ; }pr_info ("ONFI flash detected\n" );
Signature · 1 line
1.8.4
Re: [PATCH 07/12] mtd: nand: return failure when failing to get ECC from ONFI
Quoted 16 lines · Brian Norris
If ONFI fails to provide ECC information, we should not use it. Print appropriate error messages and return.
Signed-off-by Brian Norris <[email protected]>Cc Huang Shijie <[email protected]>--- drivers/mtd/nand/nand_base.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mtd/nand/nand_base.c +0
-0@@ -3010,8 +3010,13 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, chip->cmdfunc = nand_command_lp;
drivers/mtd/nand/nand_base.c static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, · line 3019
Quoted 10 lines
drivers/mtd/nand/nand_base.c +7
-2/* The Extended Parameter Page is supported since ONFI 2.1. */ -if (nand_flash_detect_ext_param_page (mtd, chip, p)) -pr_info ("Failed to detect the extended param page.\n" ); +if (nand_flash_detect_ext_param_page (mtd, chip, p)) { +pr_info ("Failed to detect ONFI extended param page\n" ); +return 0 ; + } + }else { +pr_err ("Could not retrieve ONFI ECC requirements\n" ); +return 0 ;
This return will skips the message "ONFI flash detected", could we remove the 'return' from this patch?
most of the drivers will not use the ECC info, so i think even we fail to detect the ECC info
we do not need to skip the message "ONFI flash detected".
My suggestion is to use the pr_warn() to just print out the warning, such as:pr_warn("Could not retrieve ONFI ECC requirements\n");
thanks
Huang Shijie
Quoted 3 lines
drivers/mtd/nand/nand_base.c +0
-0}pr_info ("ONFI flash detected\n" );
Re: [PATCH 07/12] mtd: nand: return failure when failing to get ECC from ONFI
Quoted 17 lines · Huang Shijie
Quoted 16 lines · Brian Norris
If ONFI fails to provide ECC information, we should not use it. Print appropriate error messages and return.
Signed-off-by Brian Norris <[email protected]>Cc Huang Shijie <[email protected]>--- drivers/mtd/nand/nand_base.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mtd/nand/nand_base.c +0
-0@@ -3010,8 +3010,13 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, chip->cmdfunc = nand_command_lp;
Quoted 12 lines
drivers/mtd/nand/nand_base.c static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, · line 3019
Quoted 10 lines
drivers/mtd/nand/nand_base.c +7
-2/* The Extended Parameter Page is supported since ONFI 2.1. */ -if (nand_flash_detect_ext_param_page (mtd, chip, p)) -pr_info ("Failed to detect the extended param page.\n" ); +if (nand_flash_detect_ext_param_page (mtd, chip, p)) { +pr_info ("Failed to detect ONFI extended param page\n" ); +return 0 ; + } + }else { +pr_err ("Could not retrieve ONFI ECC requirements\n" ); +return 0 ;This return will skips the message "ONFI flash detected", could we remove the 'return' from this patch?
Well, the "ONFI flash detected" message is not significant at all. In fact, it is pretty useless and should just be dropped, I think. The real question is whether we signal ONFI detected (return 1) or failed (return
0) when ONFI doesn't report ECC properly.
There are two "return"s in my patch. Are you suggesting removing both of them, and just warning the user of the failure?
Quoted 3 lines
most of the drivers will not use the ECC info, so i think even we fail to detect the ECC info
we do not need to skip the message "ONFI flash detected".
You do have a point here, that most drivers don't (yet) use the ECC info.
Quoted 3 lines
My suggestion is to use the
pr_warn()to just print out the warning, such as:pr_warn("Could not retrieve ONFI ECC requirements\n");
I may turn both prints into warnings, drop both of the 'return 0' (at least until ONFI ECC detection is more heavily relied on), and drop all the prints that are done for the success case ("ONFI flash detected" and "ONFI param page X valid").
Quoted 3 lines
drivers/mtd/nand/nand_base.c static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, · line 3022
Quoted 3 lines
drivers/mtd/nand/nand_base.c +0
-0}pr_info ("ONFI flash detected\n" );
Brian
Re: [PATCH 07/12] mtd: nand: return failure when failing to get ECC from ONFI
Quoted 46 lines · Brian Norris
Quoted 17 lines · Huang Shijie
Quoted 16 lines · Brian Norris
If ONFI fails to provide ECC information, we should not use it. Print appropriate error messages and return.
Signed-off-by Brian Norris <[email protected]>Cc Huang Shijie <[email protected]>--- drivers/mtd/nand/nand_base.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mtd/nand/nand_base.c +0
-0@@ -3010,8 +3010,13 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, chip->cmdfunc = nand_command_lp;Quoted 12 lines
drivers/mtd/nand/nand_base.c static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, · line 3019
Quoted 10 lines
drivers/mtd/nand/nand_base.c +7
-2/* The Extended Parameter Page is supported since ONFI 2.1. */ -if (nand_flash_detect_ext_param_page (mtd, chip, p)) -pr_info ("Failed to detect the extended param page.\n" ); +if (nand_flash_detect_ext_param_page (mtd, chip, p)) { +pr_info ("Failed to detect ONFI extended param page\n" ); +return 0 ; + } + }else { +pr_err ("Could not retrieve ONFI ECC requirements\n" ); +return 0 ;This return will skips the message "ONFI flash detected", could we remove the 'return' from this patch?
Well, the "ONFI flash detected" message is not significant at all. In fact, it is pretty useless and should just be dropped, I think. The real question is whether we signal ONFI detected (return 1) or failed (return
0) when ONFI doesn't report ECC properly.There are two "return"s in my patch. Are you suggesting removing both of them, and just warning the user of the failure?
Quoted 3 lines
most of the drivers will not use the ECC info, so i think even we fail to detect the ECC info
we do not need to skip the message "ONFI flash detected".You do have a point here, that most drivers don't (yet) use the ECC info.
Quoted 9 lines
Quoted 3 lines
My suggestion is to use the
pr_warn()to just print out the warning, such as:pr_warn("Could not retrieve ONFI ECC requirements\n");I may turn both prints into warnings, drop both of the 'return 0' (at least until ONFI ECC detection is more heavily relied on), and drop all the prints that are done for the success case ("ONFI flash detected" and "ONFI param page X valid").
FWIW, I second the "drop all prints for the success case". We're being too verbose in MTD, printing all sorts of useless information.
Or, if some 'notification' message is considered important, then let's make it a pr_debug and be available for the only use case that will need it:
debugging/development.
Signature · 3 lines
Ezequiel García, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
PATCH 8/12 mtd: nand: don't print ONFI buswidth errors unless we need to
In reply to Brian NorrisThere are a few things wrong with this error message.
First, it is unnecessary to print until after the READID (address 20h) command. READID *has* to work properly in whatever bus width configuration we are in, or else no identification mode works. So we can silence some useless warnings on systems which come up in 16-bit mode and do not even respond with an O-N-F-I string.
Second, it doesn't read very well, and it has an extraneous exclamation.
Third, it doesn't have proper multiline comment style.
So, I move the whole block below the READID check and rewrite it.
--- drivers/mtd/nand/nand_base.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/mtd/nand/nand_base.c +9 -5
@@ -2937,17 +2937,21 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,int i;int val; -/* ONFI need to be probed in 8 bits mode, and 16 bits should be selected with NAND_BUSWIDTH_AUTO */ -if (chip->options &NAND_BUSWIDTH_16 ) { -pr_err ("Trying ONFI probe in 16 bits mode, aborting !\n" ); -return 0 ; - }/* Try ONFI for unknown chip or LP */ chip->cmdfunc (mtd,NAND_CMD_READID ,0x20 ,-1 );if (chip->read_byte (mtd) !='O' || chip->read_byte (mtd) !='N' || chip->read_byte (mtd) !='F' || chip->read_byte (mtd) !='I' )return 0 ; +/* +* ONFI must be probed in 8-bit mode or with NAND_BUSWIDTH_AUTO, not +* with NAND_BUSWIDTH_16 +*/ +if (chip->options &NAND_BUSWIDTH_16 ) { +pr_err ("ONFI cannot be probed in 16-bit mode; aborting\n" ); +return 0 ; + } + chip->cmdfunc (mtd,NAND_CMD_PARAM ,0 ,-1 );for (i =0 ; i <3 ; i++) { chip->read_buf (mtd, (uint8_t *)p,sizeof (*p));
Signature · 1 line
1.8.4
PATCH 9/12 mtd: onenand: remove redundant offset check
In reply to Brian NorrisThe mtd_block_isbad() interface already checks for this.
--- drivers/mtd/onenand/onenand_base.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/mtd/onenand/onenand_base.c +0 -4
@@ -2556,10 +2556,6 @@ static int onenand_block_isbad(struct mtd_info *mtd, loff_t ofs) {int ret; -/* Check for invalid offset */ -if (ofs > mtd->size) -return -EINVAL ; -onenand_get_device (mtd,FL_READING ); ret =onenand_block_isbad_nolock (mtd, ofs,0 );onenand_release_device (mtd);
Signature · 1 line
1.8.4
PATCH 10/12 mtd: nand: remove obsolete 'ecclayout' field
In reply to Brian NorrisThis field is never used, except to print it out.
--- drivers/mtd/nand/fsl_elbc_nand.c | 2 -- drivers/mtd/nand/fsl_ifc_nand.c | 2 -- include/linux/mtd/nand.h | 1 - 3 files changed, 5 deletions(-)
drivers/mtd/nand/fsl_elbc_nand.c +0 -2
@@ -650,8 +650,6 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd) chip->page_shift);dev_dbg (priv->dev,"fsl_elbc_init: nand->phys_erase_shift = %d\n" , chip->phys_erase_shift); -dev_dbg (priv->dev,"fsl_elbc_init: nand->ecclayout = %p\n" , - chip->ecclayout);dev_dbg (priv->dev,"fsl_elbc_init: nand->ecc.mode = %d\n" , chip->ecc.mode); dev_dbg(priv->dev, "fsl_elbc_init: nand->ecc.steps = %d\n",
drivers/mtd/nand/fsl_ifc_nand.c +0 -2
@@ -718,8 +718,6 @@ static int fsl_ifc_chip_init_tail(struct mtd_info *mtd) chip->page_shift);dev_dbg (priv->dev,"%s: nand->phys_erase_shift = %d\n" , __func__, chip->phys_erase_shift); -dev_dbg (priv->dev,"%s: nand->ecclayout = %p\n" , __func__, - chip->ecclayout);dev_dbg (priv->dev,"%s: nand->ecc.mode = %d\n" , __func__, chip->ecc.mode); dev_dbg(priv->dev, "%s: nand->ecc.steps = %d\n", __func__,
include/linux/mtd/nand.h +0 -1
@@ -572,7 +572,6 @@ struct nand_chip {uint8_t *oob_poi;struct nand_hw_control *controller; -struct nand_ecclayout *ecclayout;struct nand_ecc_ctrl ecc;struct nand_buffers *buffers;
Signature · 1 line
1.8.4
PATCH 11/12 mtd: onenand: remove unused variable assignments
In reply to Brian NorrisThese variable assignments are never used (the variables are either never used or are overwritten before use). This resolves some compiler warnings like the following:
drivers/mtd/onenand/onenand_base.c: In function 'flexonenand_get_boundary':
drivers/mtd/onenand/onenand_base.c:3532:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] drivers/mtd/onenand/onenand_base.c: In function 'onenand_probe':
drivers/mtd/onenand/onenand_base.c:3838:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable]
--- drivers/mtd/onenand/onenand_base.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/mtd/onenand/onenand_base.c +6 -7
@@ -3525,7 +3525,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) {struct onenand_chip *this = mtd->priv;unsigned die, bdry; -int ret, syscfg, locked; +int syscfg, locked;/* Disable ECC */ syscfg = this->read_word (this->base +ONENAND_REG_SYS_CFG1 );
@@ -3536,7 +3536,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) this->wait (mtd,FL_SYNCING ); this->command (mtd,FLEXONENAND_CMD_READ_PI , die,0 ); - ret = this->wait (mtd,FL_READING ); + this->wait (mtd,FL_READING ); bdry = this->read_word (this->base +ONENAND_DATARAM );if ((bdry >>FLEXONENAND_PI_UNLOCK_SHIFT ) ==3 )
@@ -3546,7 +3546,7 @@ static int flexonenand_get_boundary(struct mtd_info *mtd) this->boundary[die] = bdry &FLEXONENAND_PI_MASK ; this->command (mtd,ONENAND_CMD_RESET ,0 ,0 ); - ret = this->wait (mtd,FL_RESETING ); + this->wait (mtd,FL_RESETING );printk (KERN_INFO "Die %d boundary: %d%s\n" , die, this->boundary[die], locked ?"(Locked)" :"(Unlocked)" );
@@ -3730,7 +3730,7 @@ static int flexonenand_set_boundary(struct mtd_info *mtd, int die,/* Check is boundary is locked */ this->command (mtd,FLEXONENAND_CMD_READ_PI , die,0 ); - ret = this->wait (mtd,FL_READING ); + this->wait (mtd,FL_READING ); thisboundary = this->read_word (this->base +ONENAND_DATARAM );if ((thisboundary >>FLEXONENAND_PI_UNLOCK_SHIFT ) !=3 ) {
@@ -3831,7 +3831,7 @@ static int onenand_chip_probe(struct mtd_info *mtd)static int onenand_probe (struct mtd_info *mtd) {struct onenand_chip *this = mtd->priv; -int maf_id, dev_id, ver_id; +int dev_id, ver_id;int density;int ret;
@@ -3839,8 +3839,7 @@ static int onenand_probe(struct mtd_info *mtd)if (ret)return ret; -/* Read manufacturer and device IDs from Register */ - maf_id = this->read_word (this->base +ONENAND_REG_MANUFACTURER_ID ); +/* Device and version IDs from Register */ dev_id = this->read_word (this->base +ONENAND_REG_DEVICE_ID ); ver_id = this->read_word (this->base +ONENAND_REG_VERSION_ID ); this->technology = this->read_word (this->base +ONENAND_REG_TECHNOLOGY );
Signature · 1 line
1.8.4
PATCH 12/12 mtd: lpddr_cmds: make function static
In reply to Brian Norrisdo_xxlock() is only used locally. This silences a sparse warning:
drivers/mtd/lpddr/lpddr_cmds.c:706:5: warning: no previous prototype for 'do_xxlock' [-Wmissing-prototypes]
--- drivers/mtd/lpddr/lpddr_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/lpddr/lpddr_cmds.c +1 -1
@@ -703,7 +703,7 @@ static int lpddr_erase(struct mtd_info *mtd, struct erase_info *instr)#define DO_XXLOCK_LOCK 1#define DO_XXLOCK_UNLOCK 2 -int do_xxlock (struct mtd_info *mtd,loff_t adr,uint32_t len,int thunk) +static int do_xxlock (struct mtd_info *mtd,loff_t adr,uint32_t len,int thunk) {int ret =0 ;struct map_info *map = mtd->priv;
Signature · 1 line
1.8.4
Quoted 23 lines · Brian Norris
Hi all,
In poking around various drivers for my own work and for (sub)maintaining MTD stuff, I found an assortment of fixes to make. Most of these should be trivial and obvious, but they could use a glance by a few people. They have generally been compile tested only.
Brian
Brian Norris (12):
nand: docg4: use nand_base's default BBT scan
mtd: nand:lpc32xx_slc: don't callnand_default_bbtdirectly
mtd: nandsim: don't callnand_default_bbt()directly
mtd: nand: stop exportingnand_default_bbt
mtd: dataflash: remove unused field
mtd: denali: make init function static
mtd: nand: return failure when failing to get ECC from ONFI
mtd: nand: don't print ONFI buswidth errors unless we need to
mtd: onenand: remove redundant offset check
mtd: nand: remove obsolete 'ecclayout' field
mtd: onenand: remove unused variable assignments
mtd:lpddr_cmds: make function static
Quoted 13 lines
drivers/mtd/devices/mtd_dataflash.c | 2 -- drivers/mtd/lpddr/lpddr_cmds.c | 2 +- drivers/mtd/nand/denali.c | 2 +- drivers/mtd/nand/docg4.c | 1 - drivers/mtd/nand/fsl_elbc_nand.c | 2 -- drivers/mtd/nand/fsl_ifc_nand.c | 2 -- drivers/mtd/nand/lpc32xx_slc.c | 8 -------- drivers/mtd/nand/nand_base.c | 23 ++++++++++++++++------- drivers/mtd/nand/nand_bbt.c | 1 - drivers/mtd/nand/nandsim.c | 2 +- drivers/mtd/onenand/onenand_base.c | 17 ++++++----------- include/linux/mtd/nand.h | 1 - 12 files changed, 25 insertions(+), 38 deletions(-)
Pushed everything but the ONFI stuff to l2-mtd.git. I will follow up with a separate patch for that one.
Brian