Commit 194a4ef9 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs

Pull UBI updates from Richard Weinberger:
 "Minor improvements"

* tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
  UBI: Fix two typos in comments
  ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
  ubi: pr_err() strings should end with newlines
  ubi: pr_err() strings should end with newlines
  ubi: pr_err() strings should end with newlines
parents 2896b80e 89b68cd9
...@@ -383,7 +383,7 @@ int ubiblock_create(struct ubi_volume_info *vi) ...@@ -383,7 +383,7 @@ int ubiblock_create(struct ubi_volume_info *vi)
/* Initialize the gendisk of this ubiblock device */ /* Initialize the gendisk of this ubiblock device */
gd = alloc_disk(1); gd = alloc_disk(1);
if (!gd) { if (!gd) {
pr_err("UBI: block: alloc_disk failed"); pr_err("UBI: block: alloc_disk failed\n");
ret = -ENODEV; ret = -ENODEV;
goto out_free_dev; goto out_free_dev;
} }
...@@ -607,7 +607,7 @@ static void __init ubiblock_create_from_param(void) ...@@ -607,7 +607,7 @@ static void __init ubiblock_create_from_param(void)
desc = open_volume_desc(p->name, p->ubi_num, p->vol_id); desc = open_volume_desc(p->name, p->ubi_num, p->vol_id);
if (IS_ERR(desc)) { if (IS_ERR(desc)) {
pr_err( pr_err(
"UBI: block: can't open volume on ubi%d_%d, err=%ld", "UBI: block: can't open volume on ubi%d_%d, err=%ld\n",
p->ubi_num, p->vol_id, PTR_ERR(desc)); p->ubi_num, p->vol_id, PTR_ERR(desc));
continue; continue;
} }
...@@ -618,7 +618,7 @@ static void __init ubiblock_create_from_param(void) ...@@ -618,7 +618,7 @@ static void __init ubiblock_create_from_param(void)
ret = ubiblock_create(&vi); ret = ubiblock_create(&vi);
if (ret) { if (ret) {
pr_err( pr_err(
"UBI: block: can't add '%s' volume on ubi%d_%d, err=%d", "UBI: block: can't add '%s' volume on ubi%d_%d, err=%d\n",
vi.name, p->ubi_num, p->vol_id, ret); vi.name, p->ubi_num, p->vol_id, ret);
continue; continue;
} }
......
...@@ -825,7 +825,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, ...@@ -825,7 +825,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
for (i = 0; i < UBI_MAX_DEVICES; i++) { for (i = 0; i < UBI_MAX_DEVICES; i++) {
ubi = ubi_devices[i]; ubi = ubi_devices[i];
if (ubi && mtd->index == ubi->mtd->index) { if (ubi && mtd->index == ubi->mtd->index) {
pr_err("ubi: mtd%d is already attached to ubi%d", pr_err("ubi: mtd%d is already attached to ubi%d\n",
mtd->index, i); mtd->index, i);
return -EEXIST; return -EEXIST;
} }
...@@ -840,7 +840,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, ...@@ -840,7 +840,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
* no sense to attach emulated MTD devices, so we prohibit this. * no sense to attach emulated MTD devices, so we prohibit this.
*/ */
if (mtd->type == MTD_UBIVOLUME) { if (mtd->type == MTD_UBIVOLUME) {
pr_err("ubi: refuse attaching mtd%d - it is already emulated on top of UBI", pr_err("ubi: refuse attaching mtd%d - it is already emulated on top of UBI\n",
mtd->index); mtd->index);
return -EINVAL; return -EINVAL;
} }
...@@ -851,7 +851,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, ...@@ -851,7 +851,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
if (!ubi_devices[ubi_num]) if (!ubi_devices[ubi_num])
break; break;
if (ubi_num == UBI_MAX_DEVICES) { if (ubi_num == UBI_MAX_DEVICES) {
pr_err("ubi: only %d UBI devices may be created", pr_err("ubi: only %d UBI devices may be created\n",
UBI_MAX_DEVICES); UBI_MAX_DEVICES);
return -ENFILE; return -ENFILE;
} }
...@@ -861,7 +861,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, ...@@ -861,7 +861,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
/* Make sure ubi_num is not busy */ /* Make sure ubi_num is not busy */
if (ubi_devices[ubi_num]) { if (ubi_devices[ubi_num]) {
pr_err("ubi: ubi%i already exists", ubi_num); pr_err("ubi: ubi%i already exists\n", ubi_num);
return -EEXIST; return -EEXIST;
} }
} }
...@@ -1166,7 +1166,7 @@ static int __init ubi_init(void) ...@@ -1166,7 +1166,7 @@ static int __init ubi_init(void)
BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64); BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64);
if (mtd_devs > UBI_MAX_DEVICES) { if (mtd_devs > UBI_MAX_DEVICES) {
pr_err("UBI error: too many MTD devices, maximum is %d", pr_err("UBI error: too many MTD devices, maximum is %d\n",
UBI_MAX_DEVICES); UBI_MAX_DEVICES);
return -EINVAL; return -EINVAL;
} }
...@@ -1178,7 +1178,7 @@ static int __init ubi_init(void) ...@@ -1178,7 +1178,7 @@ static int __init ubi_init(void)
err = misc_register(&ubi_ctrl_cdev); err = misc_register(&ubi_ctrl_cdev);
if (err) { if (err) {
pr_err("UBI error: cannot register device"); pr_err("UBI error: cannot register device\n");
goto out; goto out;
} }
...@@ -1205,7 +1205,7 @@ static int __init ubi_init(void) ...@@ -1205,7 +1205,7 @@ static int __init ubi_init(void)
mtd = open_mtd_device(p->name); mtd = open_mtd_device(p->name);
if (IS_ERR(mtd)) { if (IS_ERR(mtd)) {
err = PTR_ERR(mtd); err = PTR_ERR(mtd);
pr_err("UBI error: cannot open mtd %s, error %d", pr_err("UBI error: cannot open mtd %s, error %d\n",
p->name, err); p->name, err);
/* See comment below re-ubi_is_module(). */ /* See comment below re-ubi_is_module(). */
if (ubi_is_module()) if (ubi_is_module())
...@@ -1218,7 +1218,7 @@ static int __init ubi_init(void) ...@@ -1218,7 +1218,7 @@ static int __init ubi_init(void)
p->vid_hdr_offs, p->max_beb_per1024); p->vid_hdr_offs, p->max_beb_per1024);
mutex_unlock(&ubi_devices_mutex); mutex_unlock(&ubi_devices_mutex);
if (err < 0) { if (err < 0) {
pr_err("UBI error: cannot attach mtd%d", pr_err("UBI error: cannot attach mtd%d\n",
mtd->index); mtd->index);
put_mtd_device(mtd); put_mtd_device(mtd);
...@@ -1242,7 +1242,7 @@ static int __init ubi_init(void) ...@@ -1242,7 +1242,7 @@ static int __init ubi_init(void)
err = ubiblock_init(); err = ubiblock_init();
if (err) { if (err) {
pr_err("UBI error: block: cannot initialize, error %d", err); pr_err("UBI error: block: cannot initialize, error %d\n", err);
/* See comment above re-ubi_is_module(). */ /* See comment above re-ubi_is_module(). */
if (ubi_is_module()) if (ubi_is_module())
...@@ -1265,7 +1265,7 @@ static int __init ubi_init(void) ...@@ -1265,7 +1265,7 @@ static int __init ubi_init(void)
misc_deregister(&ubi_ctrl_cdev); misc_deregister(&ubi_ctrl_cdev);
out: out:
class_unregister(&ubi_class); class_unregister(&ubi_class);
pr_err("UBI error: cannot initialize UBI, error %d", err); pr_err("UBI error: cannot initialize UBI, error %d\n", err);
return err; return err;
} }
late_initcall(ubi_init); late_initcall(ubi_init);
......
...@@ -1667,7 +1667,7 @@ int ubi_update_fastmap(struct ubi_device *ubi) ...@@ -1667,7 +1667,7 @@ int ubi_update_fastmap(struct ubi_device *ubi)
ret = invalidate_fastmap(ubi); ret = invalidate_fastmap(ubi);
if (ret < 0) { if (ret < 0) {
ubi_err(ubi, "Unable to invalidiate current fastmap!"); ubi_err(ubi, "Unable to invalidate current fastmap!");
ubi_ro_mode(ubi); ubi_ro_mode(ubi);
} else { } else {
return_fm_pebs(ubi, old_fm); return_fm_pebs(ubi, old_fm);
......
...@@ -229,7 +229,7 @@ struct ubi_ec_hdr { ...@@ -229,7 +229,7 @@ struct ubi_ec_hdr {
* copy. UBI also calculates data CRC when the data is moved and stores it at * copy. UBI also calculates data CRC when the data is moved and stores it at
* the @data_crc field of the copy (P1). So when UBI needs to pick one physical * the @data_crc field of the copy (P1). So when UBI needs to pick one physical
* eraseblock of two (P or P1), the @copy_flag of the newer one (P1) is * eraseblock of two (P or P1), the @copy_flag of the newer one (P1) is
* examined. If it is cleared, the situation* is simple and the newer one is * examined. If it is cleared, the situation is simple and the newer one is
* picked. If it is set, the data CRC of the copy (P1) is examined. If the CRC * picked. If it is set, the data CRC of the copy (P1) is examined. If the CRC
* checksum is correct, this physical eraseblock is selected (P1). Otherwise * checksum is correct, this physical eraseblock is selected (P1). Otherwise
* the older one (P) is selected. * the older one (P) is selected.
...@@ -389,7 +389,7 @@ struct ubi_vtbl_record { ...@@ -389,7 +389,7 @@ struct ubi_vtbl_record {
#define UBI_FM_POOL_MAGIC 0x67AF4D08 #define UBI_FM_POOL_MAGIC 0x67AF4D08
#define UBI_FM_EBA_MAGIC 0xf0c040a8 #define UBI_FM_EBA_MAGIC 0xf0c040a8
/* A fastmap supber block can be located between PEB 0 and /* A fastmap super block can be located between PEB 0 and
* UBI_FM_MAX_START */ * UBI_FM_MAX_START */
#define UBI_FM_MAX_START 64 #define UBI_FM_MAX_START 64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment