diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-07-20 12:53:42 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:16 -0400 |
commit | 92394b5c2be774425f255b5c7afbd8b19978fe12 (patch) | |
tree | a6d03ba50ee1530676d744b1571fe24f2aabf9cf /drivers | |
parent | 46a00d83ffb0d040f18068234e0eda8332c1e798 (diff) |
mtd: spelling fixes
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ftl.c | 2 | ||||
-rw-r--r-- | drivers/mtd/inftlmount.c | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdchar.c | 4 | ||||
-rw-r--r-- | drivers/mtd/mtdconcat.c | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdcore.c | 2 | ||||
-rw-r--r-- | drivers/mtd/mtdswap.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nftlmount.c | 26 | ||||
-rw-r--r-- | drivers/mtd/sm_ftl.c | 16 |
8 files changed, 28 insertions, 28 deletions
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 95d77680ad15..c7382bb686c6 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c | |||
@@ -598,7 +598,7 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit, | |||
598 | unit with the fewest erases, and usually pick the data unit with | 598 | unit with the fewest erases, and usually pick the data unit with |
599 | the most deleted blocks. But with a small probability, pick the | 599 | the most deleted blocks. But with a small probability, pick the |
600 | oldest data unit instead. This means that we generally postpone | 600 | oldest data unit instead. This means that we generally postpone |
601 | the next reclaimation as long as possible, but shuffle static | 601 | the next reclamation as long as possible, but shuffle static |
602 | stuff around a bit for wear leveling. | 602 | stuff around a bit for wear leveling. |
603 | 603 | ||
604 | ======================================================================*/ | 604 | ======================================================================*/ |
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index d19898cea550..2ff601f816ce 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c | |||
@@ -367,7 +367,7 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address, | |||
367 | * | 367 | * |
368 | * Return: 0 when succeed, -1 on error. | 368 | * Return: 0 when succeed, -1 on error. |
369 | * | 369 | * |
370 | * ToDo: 1. Is it neceressary to check_free_sector after erasing ?? | 370 | * ToDo: 1. Is it necessary to check_free_sector after erasing ?? |
371 | */ | 371 | */ |
372 | int INFTL_formatblock(struct INFTLrecord *inftl, int block) | 372 | int INFTL_formatblock(struct INFTLrecord *inftl, int block) |
373 | { | 373 | { |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 22526e98b85b..a75d55577e49 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -43,7 +43,7 @@ static struct vfsmount *mtd_inode_mnt __read_mostly; | |||
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Data structure to hold the pointer to the mtd device as well | 45 | * Data structure to hold the pointer to the mtd device as well |
46 | * as mode information ofr various use cases. | 46 | * as mode information of various use cases. |
47 | */ | 47 | */ |
48 | struct mtd_file_info { | 48 | struct mtd_file_info { |
49 | struct mtd_info *mtd; | 49 | struct mtd_info *mtd; |
@@ -495,7 +495,7 @@ static int mtd_do_readoob(struct mtd_info *mtd, uint64_t start, | |||
495 | /* | 495 | /* |
496 | * Copies (and truncates, if necessary) data from the larger struct, | 496 | * Copies (and truncates, if necessary) data from the larger struct, |
497 | * nand_ecclayout, to the smaller, deprecated layout struct, | 497 | * nand_ecclayout, to the smaller, deprecated layout struct, |
498 | * nand_ecclayout_user. This is necessary only to suppport the deprecated | 498 | * nand_ecclayout_user. This is necessary only to support the deprecated |
499 | * API ioctl ECCGETLAYOUT while allowing all new functionality to use | 499 | * API ioctl ECCGETLAYOUT while allowing all new functionality to use |
500 | * nand_ecclayout flexibly (i.e. the struct may change size in new | 500 | * nand_ecclayout flexibly (i.e. the struct may change size in new |
501 | * releases without requiring major rewrites). | 501 | * releases without requiring major rewrites). |
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index e601672a5305..d3fabd144d6c 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -770,7 +770,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c | |||
770 | 770 | ||
771 | /* | 771 | /* |
772 | * Set up the new "super" device's MTD object structure, check for | 772 | * Set up the new "super" device's MTD object structure, check for |
773 | * incompatibilites between the subdevices. | 773 | * incompatibilities between the subdevices. |
774 | */ | 774 | */ |
775 | concat->mtd.type = subdev[0]->type; | 775 | concat->mtd.type = subdev[0]->type; |
776 | concat->mtd.flags = subdev[0]->flags; | 776 | concat->mtd.flags = subdev[0]->flags; |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 887aed02aa2e..09bdbac51868 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -449,7 +449,7 @@ out_error: | |||
449 | * is used, see 'parse_mtd_partitions()' for more information). If none are | 449 | * is used, see 'parse_mtd_partitions()' for more information). If none are |
450 | * found this functions tries to fallback to information specified in | 450 | * found this functions tries to fallback to information specified in |
451 | * @parts/@nr_parts. | 451 | * @parts/@nr_parts. |
452 | * * If any parititioning info was found, this function registers the found | 452 | * * If any partitioning info was found, this function registers the found |
453 | * partitions. | 453 | * partitions. |
454 | * * If no partitions were found this function just registers the MTD device | 454 | * * If no partitions were found this function just registers the MTD device |
455 | * @mtd and exits. | 455 | * @mtd and exits. |
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index 5e5423b2aed2..9961063b90a2 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c | |||
@@ -86,7 +86,7 @@ struct swap_eb { | |||
86 | unsigned int flags; | 86 | unsigned int flags; |
87 | unsigned int active_count; | 87 | unsigned int active_count; |
88 | unsigned int erase_count; | 88 | unsigned int erase_count; |
89 | unsigned int pad; /* speeds up pointer decremtnt */ | 89 | unsigned int pad; /* speeds up pointer decrement */ |
90 | }; | 90 | }; |
91 | 91 | ||
92 | #define MTDSWAP_ECNT_MIN(rbroot) (rb_entry(rb_first(rbroot), struct swap_eb, \ | 92 | #define MTDSWAP_ECNT_MIN(rbroot) (rb_entry(rb_first(rbroot), struct swap_eb, \ |
diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index e3cd1ffad2f6..ac4092591aea 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | /* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the | 33 | /* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the |
34 | * various device information of the NFTL partition and Bad Unit Table. Update | 34 | * various device information of the NFTL partition and Bad Unit Table. Update |
35 | * the ReplUnitTable[] table accroding to the Bad Unit Table. ReplUnitTable[] | 35 | * the ReplUnitTable[] table according to the Bad Unit Table. ReplUnitTable[] |
36 | * is used for management of Erase Unit in other routines in nftl.c and nftlmount.c | 36 | * is used for management of Erase Unit in other routines in nftl.c and nftlmount.c |
37 | */ | 37 | */ |
38 | static int find_boot_record(struct NFTLrecord *nftl) | 38 | static int find_boot_record(struct NFTLrecord *nftl) |
@@ -297,7 +297,7 @@ static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int | |||
297 | * | 297 | * |
298 | * Return: 0 when succeed, -1 on error. | 298 | * Return: 0 when succeed, -1 on error. |
299 | * | 299 | * |
300 | * ToDo: 1. Is it neceressary to check_free_sector after erasing ?? | 300 | * ToDo: 1. Is it necessary to check_free_sector after erasing ?? |
301 | */ | 301 | */ |
302 | int NFTL_formatblock(struct NFTLrecord *nftl, int block) | 302 | int NFTL_formatblock(struct NFTLrecord *nftl, int block) |
303 | { | 303 | { |
@@ -337,7 +337,7 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block) | |||
337 | nb_erases = le32_to_cpu(uci.WearInfo); | 337 | nb_erases = le32_to_cpu(uci.WearInfo); |
338 | nb_erases++; | 338 | nb_erases++; |
339 | 339 | ||
340 | /* wrap (almost impossible with current flashs) or free block */ | 340 | /* wrap (almost impossible with current flash) or free block */ |
341 | if (nb_erases == 0) | 341 | if (nb_erases == 0) |
342 | nb_erases = 1; | 342 | nb_erases = 1; |
343 | 343 | ||
@@ -363,10 +363,10 @@ fail: | |||
363 | * Mark as 'IGNORE' each incorrect sector. This check is only done if the chain | 363 | * Mark as 'IGNORE' each incorrect sector. This check is only done if the chain |
364 | * was being folded when NFTL was interrupted. | 364 | * was being folded when NFTL was interrupted. |
365 | * | 365 | * |
366 | * The check_free_sectors in this function is neceressary. There is a possible | 366 | * The check_free_sectors in this function is necessary. There is a possible |
367 | * situation that after writing the Data area, the Block Control Information is | 367 | * situation that after writing the Data area, the Block Control Information is |
368 | * not updated according (due to power failure or something) which leaves the block | 368 | * not updated according (due to power failure or something) which leaves the block |
369 | * in an umconsistent state. So we have to check if a block is really FREE in this | 369 | * in an inconsistent state. So we have to check if a block is really FREE in this |
370 | * case. */ | 370 | * case. */ |
371 | static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_block) | 371 | static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_block) |
372 | { | 372 | { |
@@ -428,7 +428,7 @@ static int calc_chain_length(struct NFTLrecord *nftl, unsigned int first_block) | |||
428 | 428 | ||
429 | for (;;) { | 429 | for (;;) { |
430 | length++; | 430 | length++; |
431 | /* avoid infinite loops, although this is guaranted not to | 431 | /* avoid infinite loops, although this is guaranteed not to |
432 | happen because of the previous checks */ | 432 | happen because of the previous checks */ |
433 | if (length >= nftl->nb_blocks) { | 433 | if (length >= nftl->nb_blocks) { |
434 | printk("nftl: length too long %d !\n", length); | 434 | printk("nftl: length too long %d !\n", length); |
@@ -447,11 +447,11 @@ static int calc_chain_length(struct NFTLrecord *nftl, unsigned int first_block) | |||
447 | /* format_chain: Format an invalid Virtual Unit chain. It frees all the Erase Units in a | 447 | /* format_chain: Format an invalid Virtual Unit chain. It frees all the Erase Units in a |
448 | * Virtual Unit Chain, i.e. all the units are disconnected. | 448 | * Virtual Unit Chain, i.e. all the units are disconnected. |
449 | * | 449 | * |
450 | * It is not stricly correct to begin from the first block of the chain because | 450 | * It is not strictly correct to begin from the first block of the chain because |
451 | * if we stop the code, we may see again a valid chain if there was a first_block | 451 | * if we stop the code, we may see again a valid chain if there was a first_block |
452 | * flag in a block inside it. But is it really a problem ? | 452 | * flag in a block inside it. But is it really a problem ? |
453 | * | 453 | * |
454 | * FixMe: Figure out what the last statesment means. What if power failure when we are | 454 | * FixMe: Figure out what the last statement means. What if power failure when we are |
455 | * in the for (;;) loop formatting blocks ?? | 455 | * in the for (;;) loop formatting blocks ?? |
456 | */ | 456 | */ |
457 | static void format_chain(struct NFTLrecord *nftl, unsigned int first_block) | 457 | static void format_chain(struct NFTLrecord *nftl, unsigned int first_block) |
@@ -485,7 +485,7 @@ static void format_chain(struct NFTLrecord *nftl, unsigned int first_block) | |||
485 | * totally free (only 0xff). | 485 | * totally free (only 0xff). |
486 | * | 486 | * |
487 | * Definition: Free Erase Unit -- A properly erased/formatted Free Erase Unit should have meet the | 487 | * Definition: Free Erase Unit -- A properly erased/formatted Free Erase Unit should have meet the |
488 | * following critia: | 488 | * following criteria: |
489 | * 1. */ | 489 | * 1. */ |
490 | static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) | 490 | static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) |
491 | { | 491 | { |
@@ -502,7 +502,7 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) | |||
502 | erase_mark = le16_to_cpu ((h1.EraseMark | h1.EraseMark1)); | 502 | erase_mark = le16_to_cpu ((h1.EraseMark | h1.EraseMark1)); |
503 | if (erase_mark != ERASE_MARK) { | 503 | if (erase_mark != ERASE_MARK) { |
504 | /* if no erase mark, the block must be totally free. This is | 504 | /* if no erase mark, the block must be totally free. This is |
505 | possible in two cases : empty filsystem or interrupted erase (very unlikely) */ | 505 | possible in two cases : empty filesystem or interrupted erase (very unlikely) */ |
506 | if (check_free_sectors (nftl, block * nftl->EraseSize, nftl->EraseSize, 1) != 0) | 506 | if (check_free_sectors (nftl, block * nftl->EraseSize, nftl->EraseSize, 1) != 0) |
507 | return -1; | 507 | return -1; |
508 | 508 | ||
@@ -544,7 +544,7 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) | |||
544 | /* get_fold_mark: Read fold mark from Unit Control Information #2, we use FOLD_MARK_IN_PROGRESS | 544 | /* get_fold_mark: Read fold mark from Unit Control Information #2, we use FOLD_MARK_IN_PROGRESS |
545 | * to indicate that we are in the progression of a Virtual Unit Chain folding. If the UCI #2 | 545 | * to indicate that we are in the progression of a Virtual Unit Chain folding. If the UCI #2 |
546 | * is FOLD_MARK_IN_PROGRESS when mounting the NFTL, the (previous) folding process is interrupted | 546 | * is FOLD_MARK_IN_PROGRESS when mounting the NFTL, the (previous) folding process is interrupted |
547 | * for some reason. A clean up/check of the VUC is neceressary in this case. | 547 | * for some reason. A clean up/check of the VUC is necessary in this case. |
548 | * | 548 | * |
549 | * WARNING: return 0 if read error | 549 | * WARNING: return 0 if read error |
550 | */ | 550 | */ |
@@ -657,7 +657,7 @@ int NFTL_mount(struct NFTLrecord *s) | |||
657 | printk("Block %d: incorrect logical block: %d expected: %d\n", | 657 | printk("Block %d: incorrect logical block: %d expected: %d\n", |
658 | block, logical_block, first_logical_block); | 658 | block, logical_block, first_logical_block); |
659 | /* the chain is incorrect : we must format it, | 659 | /* the chain is incorrect : we must format it, |
660 | but we need to read it completly */ | 660 | but we need to read it completely */ |
661 | do_format_chain = 1; | 661 | do_format_chain = 1; |
662 | } | 662 | } |
663 | if (is_first_block) { | 663 | if (is_first_block) { |
@@ -669,7 +669,7 @@ int NFTL_mount(struct NFTLrecord *s) | |||
669 | printk("Block %d: incorrectly marked as first block in chain\n", | 669 | printk("Block %d: incorrectly marked as first block in chain\n", |
670 | block); | 670 | block); |
671 | /* the chain is incorrect : we must format it, | 671 | /* the chain is incorrect : we must format it, |
672 | but we need to read it completly */ | 672 | but we need to read it completely */ |
673 | do_format_chain = 1; | 673 | do_format_chain = 1; |
674 | } else { | 674 | } else { |
675 | printk("Block %d: folding in progress - ignoring first block flag\n", | 675 | printk("Block %d: folding in progress - ignoring first block flag\n", |
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index a8befde81ce9..311a9e39a956 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c | |||
@@ -34,7 +34,7 @@ module_param(debug, int, S_IRUGO | S_IWUSR); | |||
34 | MODULE_PARM_DESC(debug, "Debug level (0-2)"); | 34 | MODULE_PARM_DESC(debug, "Debug level (0-2)"); |
35 | 35 | ||
36 | 36 | ||
37 | /* ------------------- sysfs attributtes ---------------------------------- */ | 37 | /* ------------------- sysfs attributes ---------------------------------- */ |
38 | struct sm_sysfs_attribute { | 38 | struct sm_sysfs_attribute { |
39 | struct device_attribute dev_attr; | 39 | struct device_attribute dev_attr; |
40 | char *data; | 40 | char *data; |
@@ -147,7 +147,7 @@ static int sm_get_lba(uint8_t *lba) | |||
147 | 147 | ||
148 | 148 | ||
149 | /* | 149 | /* |
150 | * Read LBA asscociated with block | 150 | * Read LBA associated with block |
151 | * returns -1, if block is erased | 151 | * returns -1, if block is erased |
152 | * returns -2 if error happens | 152 | * returns -2 if error happens |
153 | */ | 153 | */ |
@@ -252,7 +252,7 @@ static int sm_read_sector(struct sm_ftl *ftl, | |||
252 | return 0; | 252 | return 0; |
253 | } | 253 | } |
254 | 254 | ||
255 | /* User might not need the oob, but we do for data vertification */ | 255 | /* User might not need the oob, but we do for data verification */ |
256 | if (!oob) | 256 | if (!oob) |
257 | oob = &tmp_oob; | 257 | oob = &tmp_oob; |
258 | 258 | ||
@@ -276,7 +276,7 @@ again: | |||
276 | return ret; | 276 | return ret; |
277 | } | 277 | } |
278 | 278 | ||
279 | /* Unfortunelly, oob read will _always_ succeed, | 279 | /* Unfortunately, oob read will _always_ succeed, |
280 | despite card removal..... */ | 280 | despite card removal..... */ |
281 | ret = mtd->read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); | 281 | ret = mtd->read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); |
282 | 282 | ||
@@ -447,14 +447,14 @@ static void sm_mark_block_bad(struct sm_ftl *ftl, int zone, int block) | |||
447 | 447 | ||
448 | /* We aren't checking the return value, because we don't care */ | 448 | /* We aren't checking the return value, because we don't care */ |
449 | /* This also fails on fake xD cards, but I guess these won't expose | 449 | /* This also fails on fake xD cards, but I guess these won't expose |
450 | any bad blocks till fail completly */ | 450 | any bad blocks till fail completely */ |
451 | for (boffset = 0; boffset < ftl->block_size; boffset += SM_SECTOR_SIZE) | 451 | for (boffset = 0; boffset < ftl->block_size; boffset += SM_SECTOR_SIZE) |
452 | sm_write_sector(ftl, zone, block, boffset, NULL, &oob); | 452 | sm_write_sector(ftl, zone, block, boffset, NULL, &oob); |
453 | } | 453 | } |
454 | 454 | ||
455 | /* | 455 | /* |
456 | * Erase a block within a zone | 456 | * Erase a block within a zone |
457 | * If erase succedes, it updates free block fifo, otherwise marks block as bad | 457 | * If erase succeeds, it updates free block fifo, otherwise marks block as bad |
458 | */ | 458 | */ |
459 | static int sm_erase_block(struct sm_ftl *ftl, int zone_num, uint16_t block, | 459 | static int sm_erase_block(struct sm_ftl *ftl, int zone_num, uint16_t block, |
460 | int put_free) | 460 | int put_free) |
@@ -510,7 +510,7 @@ static void sm_erase_callback(struct erase_info *self) | |||
510 | complete(&ftl->erase_completion); | 510 | complete(&ftl->erase_completion); |
511 | } | 511 | } |
512 | 512 | ||
513 | /* Throughtly test that block is valid. */ | 513 | /* Thoroughly test that block is valid. */ |
514 | static int sm_check_block(struct sm_ftl *ftl, int zone, int block) | 514 | static int sm_check_block(struct sm_ftl *ftl, int zone, int block) |
515 | { | 515 | { |
516 | int boffset; | 516 | int boffset; |
@@ -526,7 +526,7 @@ static int sm_check_block(struct sm_ftl *ftl, int zone, int block) | |||
526 | for (boffset = 0; boffset < ftl->block_size; | 526 | for (boffset = 0; boffset < ftl->block_size; |
527 | boffset += SM_SECTOR_SIZE) { | 527 | boffset += SM_SECTOR_SIZE) { |
528 | 528 | ||
529 | /* This shoudn't happen anyway */ | 529 | /* This shouldn't happen anyway */ |
530 | if (sm_read_sector(ftl, zone, block, boffset, NULL, &oob)) | 530 | if (sm_read_sector(ftl, zone, block, boffset, NULL, &oob)) |
531 | return -2; | 531 | return -2; |
532 | 532 | ||