Skip to contentSkip to conversation

A few cleanups against Linus' master

PATCH In review Shinya Kuribayashi 3 participants 12 messages May 6, 2010 – May 7, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

Noticed and fixed while learning UBI subsystems. As for comment fixes a double-check by native speaker would be appricated.

p.s. UBI fixes can be squashed into one at your option, thanks.

Shinya Kuribayashi (3):
UBI: Fix s/then/than/ typos
UBI: Remaining typos and comments cleanups
mtd: Remove empty mtd/mtdbdi.c and mtd/internal.h files

 drivers/mtd/ubi/Kconfig |    2 +-
 drivers/mtd/ubi/io.c    |    4 ++--
 drivers/mtd/ubi/kapi.c  |    6 +++---
 drivers/mtd/ubi/scan.c  |    4 ++--
 drivers/mtd/ubi/vtbl.c  |    4 ++--
 drivers/mtd/ubi/wl.c    |    2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 drivers/mtd/internal.h
 delete mode 100644 drivers/mtd/mtdbdi.c
Signature · 2 lines
Shinya Kuribayashi
Renesas Electronics
#1 lore raw

PATCH 1/1 UBI: Fix s/then/than/ typos

---
 drivers/mtd/ubi/Kconfig |    2 +-
 drivers/mtd/ubi/io.c    |    2 +-
 drivers/mtd/ubi/kapi.c  |    6 +++---
 drivers/mtd/ubi/scan.c  |    4 ++--
 drivers/mtd/ubi/wl.c    |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
drivers/mtd/ubi/Kconfig +1 -1
index 0a8c7ea..f702a16 100644
@@ -27,7 +27,7 @@ config MTD_UBI_WL_THRESHOLD
 	  The default value should be OK for SLC NAND flashes, NOR flashes and
 	  other flashes which have eraseblock life-cycle 100000 or more.
 	  However, in case of MLC NAND flashes which typically have eraseblock
-	  life-cycle less then 10000, the threshold should be lessened (e.g.,
+	  life-cycle less than 10000, the threshold should be lessened (e.g.,
 	  to 128 or 256, although it does not have to be power of 2).
 
 config MTD_UBI_BEB_RESERVE
drivers/mtd/ubi/io.c +1 -1
index 533b1a4..016ec13 100644
@@ -65,7 +65,7 @@
  *
  * A: because when writing a sub-page, MTD still writes a full 2K page but the
  * bytes which are no relevant to the sub-page are 0xFF. So, basically, writing
- * 4x512 sub-pages is 4 times slower then writing one 2KiB NAND page. Thus, we
+ * 4x512 sub-pages is 4 times slower than writing one 2KiB NAND page. Thus, we
  * prefer to use sub-pages only for EV and VID headers.
  *
  * As it was noted above, the VID header may start at a non-aligned offset.
drivers/mtd/ubi/kapi.c +3 -3
index 17f287d..69fa4ef 100644
@@ -488,7 +488,7 @@ EXPORT_SYMBOL_GPL(ubi_leb_write);
  *
  * This function changes the contents of a logical eraseblock atomically. @buf
  * has to contain new logical eraseblock data, and @len - the length of the
- * data, which has to be aligned. The length may be shorter then the logical
+ * data, which has to be aligned. The length may be shorter than the logical
  * eraseblock size, ant the logical eraseblock may be appended to more times
  * later on. This function guarantees that in case of an unclean reboot the old
  * contents is preserved. Returns zero in case of success and a negative error
@@ -571,7 +571,7 @@ EXPORT_SYMBOL_GPL(ubi_leb_erase);
  *
  * This function un-maps logical eraseblock @lnum and schedules the
  * corresponding physical eraseblock for erasure, so that it will eventually be
- * physically erased in background. This operation is much faster then the
+ * physically erased in background. This operation is much faster than the
  * erase operation.
  *
  * Unlike erase, the un-map operation does not guarantee that the logical
@@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(ubi_leb_erase);
  *
  * The main and obvious use-case of this function is when the contents of a
  * logical eraseblock has to be re-written. Then it is much more efficient to
- * first un-map it, then write new data, rather then first erase it, then write
+ * first un-map it, then write new data, rather than first erase it, then write
  * new data. Note, once new data has been written to the logical eraseblock,
  * UBI guarantees that the old contents has gone forever. In other words, if an
  * unclean reboot happens after the logical eraseblock has been un-mapped and
drivers/mtd/ubi/scan.c +2 -2
index dc5f688..aed19f3 100644
@@ -231,7 +231,7 @@ static struct ubi_scan_volume *add_volume(struct ubi_scan_info *si, int vol_id,
  * case of success this function returns a positive value, in case of failure, a
  * negative error code is returned. The success return codes use the following
  * bits:
- *     o bit 0 is cleared: the first PEB (described by @seb) is newer then the
+ *     o bit 0 is cleared: the first PEB (described by @seb) is newer than the
  *       second PEB (described by @pnum and @vid_hdr);
  *     o bit 0 is set: the second PEB is newer;
  *     o bit 1 is cleared: no bit-flips were detected in the newer LEB;
@@ -452,7 +452,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
 
 		if (cmp_res & 1) {
 			/*
-			 * This logical eraseblock is newer then the one
+			 * This logical eraseblock is newer than the one
 			 * found earlier.
 			 */
 			err = validate_vid_hdr(vid_hdr, sv, pnum);
drivers/mtd/ubi/wl.c +1 -1
index f64ddab..ee7b1d8 100644
@@ -350,7 +350,7 @@ static void prot_queue_add(struct ubi_device *ubi, struct ubi_wl_entry *e)
  * @max: highest possible erase counter
  *
  * This function looks for a wear leveling entry with erase counter closest to
- * @max and less then @max.
+ * @max and less than @max.
  */
 static struct ubi_wl_entry *find_wl_entry(struct rb_root *root, int max)
 {
Signature · 1 line
1.7.1
#2 lore raw

Re: [PATCH] UBI: Fix s/then/than/ typos

drivers/mtd/ubi/Kconfig

Quoted 11 lines · Shinya Kuribayashi
---
  drivers/mtd/ubi/Kconfig |    2 +-
  drivers/mtd/ubi/io.c    |    2 +-
  drivers/mtd/ubi/kapi.c  |    6 +++---
  drivers/mtd/ubi/scan.c  |    4 ++--
  drivers/mtd/ubi/wl.c    |    2 +-
  5 files changed, 8 insertions(+), 8 deletions(-)
drivers/mtd/ubi/Kconfig +0 -0
index 0a8c7ea..f702a16 100644

Weird, but I cannot apply this patch. Could you please save it from the mailing list and try to apply? For me, all hunks fail:

[dedekind@eru ubi-2.6]$ patch -p1 < ~/tmp/shinya1
patching file drivers/mtd/ubi/Kconfig
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file
drivers/mtd/ubi/Kconfig.rej
patching file drivers/mtd/ubi/io.c
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file
drivers/mtd/ubi/io.c.rej
patching file drivers/mtd/ubi/kapi.c
Hunk #1 FAILED at 488.
Hunk #2 FAILED at 571.
Hunk #3 FAILED at 590.
3 out of 3 hunks FAILED -- saving rejects to file
drivers/mtd/ubi/kapi.c.rej
patching file drivers/mtd/ubi/scan.c
Hunk #1 FAILED at 231.
Hunk #2 FAILED at 452.
2 out of 2 hunks FAILED -- saving rejects to file
drivers/mtd/ubi/scan.c.rej
patching file drivers/mtd/ubi/wl.c
Hunk #1 FAILED at 350.
1 out of 1 hunk FAILED -- saving rejects to file
drivers/mtd/ubi/wl.c.rej

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#3 lore raw

Re: [PATCH] UBI: Fix s/then/than/ typos

In reply to Shinya Kuribayashi
Quoted 14 lines · Shinya Kuribayashi
---
  drivers/mtd/ubi/Kconfig |    2 +-
  drivers/mtd/ubi/io.c    |    2 +-
  drivers/mtd/ubi/kapi.c  |    6 +++---
  drivers/mtd/ubi/scan.c  |    4 ++--
  drivers/mtd/ubi/wl.c    |    2 +-
  5 files changed, 8 insertions(+), 8 deletions(-)
drivers/mtd/ubi/Kconfig +0 -0
index 0a8c7ea..f702a16 100644

drivers/mtd/ubi/Kconfig config MTD_UBI_WL_THRESHOLD · line 31

Quoted 6 lines
drivers/mtd/ubi/Kconfig +1 -1
@@ -27,7 +27,7 @@ config MTD_UBI_WL_THRESHOLD
  	  The default value should be OK for SLC NAND flashes, NOR flashes and
  	  other flashes which have eraseblock life-cycle 100000 or more.
  	  However, in case of MLC NAND flashes which typically have eraseblock
-	  life-cycle less then 10000, the threshold should be lessened (e.g.,
+	  life-cycle less than 10000, the threshold should be lessened (e.g.,
  	  to 128 or 256, although it does not have to be power of 2).

Thanks for the patches, but they really look corrupted. Could you please send applicable versions?

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#4 lore raw

Re: [PATCH] UBI: Fix s/then/than/ typos

Quoted 2 lines · Artem Bityutskiy

Thanks for the patches, but they really look corrupted. Could you please send applicable versions?

Ah, the culprit must be 'format=flowed'. Recently I've migrated to Thunderbird3 and this was my first patch submission to communities. Should have disabled that option, sorry for inconvenience!

Will fix and resubmit a few hours later to wait for any feedbacks.

Signature · 2 lines
Shinya Kuribayashi
Renesas Electronics
#5 lore raw

Re: [PATCH] UBI: Fix s/then/than/ typos

Quoted 9 lines · Shinya Kuribayashi
Quoted 2 lines · Artem Bityutskiy

Thanks for the patches, but they really look corrupted. Could you please send applicable versions?

Ah, the culprit must be 'format=flowed'. Recently I've migrated to Thunderbird3 and this was my first patch submission to communities. Should have disabled that option, sorry for inconvenience!

Will fix and resubmit a few hours later to wait for any feedbacks.

AFAIK, format=flowed is just about displaying quoted text, not changing the contents.

I also tried to use thunderbird in the past, but it is very unfrienly to patch submitters. So I switched to Evolution which is much better. But for sending patches git send-email is the tool to use in most of the cases, IMO.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#6 lore raw

Re: [PATCH] UBI: Fix s/then/than/ typos

Quoted 2 lines · Artem Bityutskiy

AFAIK, format=flowed is just about displaying quoted text, not changing the contents.

No, it affects all text - it allows the MUA to re-wrap text in paragraphs to fit within the display regardless of the original line wrapping. It's very useful for human languages but unfortunate for patches.

#7 lore raw

PATCH 1/1 UBI: Remaining typos and comments cleanups

In reply to Shinya Kuribayashi
---
 drivers/mtd/ubi/io.c   |    2 +-
 drivers/mtd/ubi/vtbl.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/mtd/ubi/io.c +1 -1
index 016ec13..cd0bf57 100644
@@ -64,7 +64,7 @@
  * device, e.g., make @ubi->min_io_size = 512 in the example above?
  *
  * A: because when writing a sub-page, MTD still writes a full 2K page but the
- * bytes which are no relevant to the sub-page are 0xFF. So, basically, writing
+ * bytes which are not relevant to the sub-page are 0xFF. So, basically, writing
  * 4x512 sub-pages is 4 times slower than writing one 2KiB NAND page. Thus, we
  * prefer to use sub-pages only for EV and VID headers.
  *
drivers/mtd/ubi/vtbl.c +2 -2
index cd90ff3..14c10be 100644
@@ -414,7 +414,7 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
 	 * 0 contains more recent information.
 	 *
 	 * So the plan is to first check LEB 0. Then
-	 * a. if LEB 0 is OK, it must be containing the most resent data; then
+	 * a. if LEB 0 is OK, it must be containing the most recent data; then
 	 *    we compare it with LEB 1, and if they are different, we copy LEB
 	 *    0 to LEB 1;
 	 * b. if LEB 0 is corrupted, but LEB 1 has to be OK, and we copy LEB 1
@@ -848,7 +848,7 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si)
 		goto out_free;
 
 	/*
-	 * Get sure that the scanning information is consistent to the
+	 * Make sure that the scanning information is consistent to the
 	 * information stored in the volume table.
 	 */
 	err = check_scanning_info(ubi, si);
Signature · 1 line
1.7.1
#8 lore raw

Re: [PATCH] UBI: Remaining typos and comments cleanups

Artem-san,

drivers/mtd/ubi/io.c line 70

Quoted 13 lines · Shinya Kuribayashi
drivers/mtd/ubi/io.c +1 -1
index 016ec13..cd0bf57 100644
@@ -64,7 +64,7 @@
  * device, e.g., make @ubi->min_io_size = 512 in the example above?
  *
  * A: because when writing a sub-page, MTD still writes a full 2K page but the
- * bytes which are no relevant to the sub-page are 0xFF. So, basically, writing
+ * bytes which are not relevant to the sub-page are 0xFF. So, basically, writing
  * 4x512 sub-pages is 4 times slower than writing one 2KiB NAND page.  Thus, we
  * prefer to use sub-pages only for EV and VID headers.
  *                                 ^^^^

Looking at the last line, I think above 'EV' is a typo of 'EC', right? I'll incorporate it in the next submission,

Signature · 2 lines
Shinya Kuribayashi
Renesas Electronics
#9 lore raw

Re: [PATCH] UBI: Remaining typos and comments cleanups

Quoted 19 lines · Shinya Kuribayashi

Artem-san,

drivers/mtd/ubi/io.c line 70

Quoted 13 lines · Shinya Kuribayashi
drivers/mtd/ubi/io.c +1 -1
index 016ec13..cd0bf57 100644
@@ -64,7 +64,7 @@
  * device, e.g., make @ubi->min_io_size = 512 in the example above?
  *
  * A: because when writing a sub-page, MTD still writes a full 2K page but the
- * bytes which are no relevant to the sub-page are 0xFF. So, basically, writing
+ * bytes which are not relevant to the sub-page are 0xFF. So, basically, writing
  * 4x512 sub-pages is 4 times slower than writing one 2KiB NAND page.  Thus, we
  * prefer to use sub-pages only for EV and VID headers.
  *                                 ^^^^

Looking at the last line, I think above 'EV' is a typo of 'EC', right? I'll incorporate it in the next submission,

Right

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#10 lore raw

PATCH 1/1 mtd: Remove empty mtd/mtdbdi.c and mtd/internal.h files

In reply to Shinya Kuribayashi

Commit a33eb6b9 (Move mtd_bdi_*mappable to mtdcore.c) forgot to 'git rm' these files.

---

 0 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 drivers/mtd/internal.h
 delete mode 100644 drivers/mtd/mtdbdi.c
drivers/mtd/internal.h deleted +0 -0
deleted file mode 100644
index e69de29..0000000
drivers/mtd/mtdbdi.c deleted +0 -0
deleted file mode 100644
index e69de29..0000000
Signature · 1 line
1.7.1
#11 lore raw

Re: [PATCH] mtd: Remove empty mtd/mtdbdi.c and mtd/internal.h files

drivers/mtd/mtdbdi.c

Quoted 16 lines · Shinya Kuribayashi

Commit a33eb6b9 (Move mtd_bdi_*mappable to mtdcore.c) forgot to 'git rm' these files.

---

  0 files changed, 0 insertions(+), 0 deletions(-)

delete mode 100644 drivers/mtd/internal.h
delete mode 100644 drivers/mtd/mtdbdi.c

drivers/mtd/internal.h deleted +0 -0
deleted file mode 100644
index e69de29..0000000
drivers/mtd/mtdbdi.c deleted +0 -0
deleted file mode 100644
index e69de29..0000000

Jeff Garzik just sent a pull request which takes care of this.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)