Message ID | 1347371454-17107-1-git-send-email-richard.genoud@gmail.com |
---|---|
State | Accepted |
Commit | 61de9da657e8c52606d45ae67dfa187111bf9b55 |
Headers | show |
Hi, On Tue, Sep 11, 2012 at 6:50 AM, Richard Genoud <richard.genoud@gmail.com> wrote: > In nand_bbt.c, a hardcoded value was used instead of the define meant > for that, so we use the define. > > There's no functionnal change. s/functionnal/functional > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> > - .maxblocks = 4, > + .maxblocks = NAND_BBT_SCAN_MAXBLOCKS, On a more important note: why was this define ever included in the first place? It seems to have been included without a real user in this commit: Author: Kyungmin Park <kyungmin.park@samsung.com> Date: Tue Sep 27 11:26:39 2005 +0100 [MTD] OneNAND: Add missing files In the end, the real question is: does the macro have real value? I suppose it makes it slightly easier to change the parameter across all the version of the BBT (main/mirror and oob/no_oob). So I'll ack: Acked-by: Brian Norris <computersforpeace@gmail.com> Thanks, Brian
On Tue, 2012-09-11 at 15:50 +0200, Richard Genoud wrote: > In nand_bbt.c, a hardcoded value was used instead of the define meant > for that, so we use the define. > > There's no functionnal change. > > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Pushed to l2-mtd.git, thanks!
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 30d1319..741ecf7 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -62,6 +62,7 @@ #include <linux/slab.h> #include <linux/types.h> #include <linux/mtd/mtd.h> +#include <linux/mtd/bbm.h> #include <linux/mtd/nand.h> #include <linux/mtd/nand_ecc.h> #include <linux/bitops.h> @@ -1260,7 +1261,7 @@ static struct nand_bbt_descr bbt_main_descr = { .offs = 8, .len = 4, .veroffs = 12, - .maxblocks = 4, + .maxblocks = NAND_BBT_SCAN_MAXBLOCKS, .pattern = bbt_pattern }; @@ -1270,7 +1271,7 @@ static struct nand_bbt_descr bbt_mirror_descr = { .offs = 8, .len = 4, .veroffs = 12, - .maxblocks = 4, + .maxblocks = NAND_BBT_SCAN_MAXBLOCKS, .pattern = mirror_pattern }; @@ -1280,7 +1281,7 @@ static struct nand_bbt_descr bbt_main_no_bbt_descr = { | NAND_BBT_NO_OOB, .len = 4, .veroffs = 4, - .maxblocks = 4, + .maxblocks = NAND_BBT_SCAN_MAXBLOCKS, .pattern = bbt_pattern }; @@ -1290,7 +1291,7 @@ static struct nand_bbt_descr bbt_mirror_no_bbt_descr = { | NAND_BBT_NO_OOB, .len = 4, .veroffs = 4, - .maxblocks = 4, + .maxblocks = NAND_BBT_SCAN_MAXBLOCKS, .pattern = mirror_pattern };
In nand_bbt.c, a hardcoded value was used instead of the define meant for that, so we use the define. There's no functionnal change. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> --- drivers/mtd/nand/nand_bbt.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)