diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-28 03:12:25 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-04-14 04:34:41 -0400 |
commit | feddbb34ebd75e9b6bf573b852079e327a88c07a (patch) | |
tree | 99b11dc996e6ce633c332a165a073e76cb05601c /drivers/mtd | |
parent | 3627924acf70a9a26587712e4888ee7144489678 (diff) |
UBI: fix minor stylistic issues
Fix checkpatch.pl errors and warnings:
* space before tab
* line over 80 characters
* include linux/ioctl.h instead of asm/ioctl.h
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/debug.c | 18 | ||||
-rw-r--r-- | drivers/mtd/ubi/io.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 3 |
6 files changed, 18 insertions, 17 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 4119cb857c97..191f3bb3c41a 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -115,7 +115,7 @@ static int vol_cdev_open(struct inode *inode, struct file *file) | |||
115 | mode = UBI_READONLY; | 115 | mode = UBI_READONLY; |
116 | 116 | ||
117 | dbg_gen("open device %d, volume %d, mode %d", | 117 | dbg_gen("open device %d, volume %d, mode %d", |
118 | ubi_num, vol_id, mode); | 118 | ubi_num, vol_id, mode); |
119 | 119 | ||
120 | desc = ubi_open_volume(ubi_num, vol_id, mode); | 120 | desc = ubi_open_volume(ubi_num, vol_id, mode); |
121 | if (IS_ERR(desc)) | 121 | if (IS_ERR(desc)) |
@@ -158,7 +158,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin) | |||
158 | loff_t new_offset; | 158 | loff_t new_offset; |
159 | 159 | ||
160 | if (vol->updating) { | 160 | if (vol->updating) { |
161 | /* Update is in progress, seeking is prohibited */ | 161 | /* Update is in progress, seeking is prohibited */ |
162 | dbg_err("updating"); | 162 | dbg_err("updating"); |
163 | return -EBUSY; | 163 | return -EBUSY; |
164 | } | 164 | } |
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c index d4d07e5f138f..0cd5beabe9c9 100644 --- a/drivers/mtd/ubi/debug.c +++ b/drivers/mtd/ubi/debug.c | |||
@@ -75,15 +75,15 @@ void ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr) | |||
75 | { | 75 | { |
76 | printk(KERN_DEBUG "Volume identifier header dump:\n"); | 76 | printk(KERN_DEBUG "Volume identifier header dump:\n"); |
77 | printk(KERN_DEBUG "\tmagic %08x\n", be32_to_cpu(vid_hdr->magic)); | 77 | printk(KERN_DEBUG "\tmagic %08x\n", be32_to_cpu(vid_hdr->magic)); |
78 | printk(KERN_DEBUG "\tversion %d\n", (int)vid_hdr->version); | 78 | printk(KERN_DEBUG "\tversion %d\n", (int)vid_hdr->version); |
79 | printk(KERN_DEBUG "\tvol_type %d\n", (int)vid_hdr->vol_type); | 79 | printk(KERN_DEBUG "\tvol_type %d\n", (int)vid_hdr->vol_type); |
80 | printk(KERN_DEBUG "\tcopy_flag %d\n", (int)vid_hdr->copy_flag); | 80 | printk(KERN_DEBUG "\tcopy_flag %d\n", (int)vid_hdr->copy_flag); |
81 | printk(KERN_DEBUG "\tcompat %d\n", (int)vid_hdr->compat); | 81 | printk(KERN_DEBUG "\tcompat %d\n", (int)vid_hdr->compat); |
82 | printk(KERN_DEBUG "\tvol_id %d\n", be32_to_cpu(vid_hdr->vol_id)); | 82 | printk(KERN_DEBUG "\tvol_id %d\n", be32_to_cpu(vid_hdr->vol_id)); |
83 | printk(KERN_DEBUG "\tlnum %d\n", be32_to_cpu(vid_hdr->lnum)); | 83 | printk(KERN_DEBUG "\tlnum %d\n", be32_to_cpu(vid_hdr->lnum)); |
84 | printk(KERN_DEBUG "\tdata_size %d\n", be32_to_cpu(vid_hdr->data_size)); | 84 | printk(KERN_DEBUG "\tdata_size %d\n", be32_to_cpu(vid_hdr->data_size)); |
85 | printk(KERN_DEBUG "\tused_ebs %d\n", be32_to_cpu(vid_hdr->used_ebs)); | 85 | printk(KERN_DEBUG "\tused_ebs %d\n", be32_to_cpu(vid_hdr->used_ebs)); |
86 | printk(KERN_DEBUG "\tdata_pad %d\n", be32_to_cpu(vid_hdr->data_pad)); | 86 | printk(KERN_DEBUG "\tdata_pad %d\n", be32_to_cpu(vid_hdr->data_pad)); |
87 | printk(KERN_DEBUG "\tsqnum %llu\n", | 87 | printk(KERN_DEBUG "\tsqnum %llu\n", |
88 | (unsigned long long)be64_to_cpu(vid_hdr->sqnum)); | 88 | (unsigned long long)be64_to_cpu(vid_hdr->sqnum)); |
89 | printk(KERN_DEBUG "\thdr_crc %08x\n", be32_to_cpu(vid_hdr->hdr_crc)); | 89 | printk(KERN_DEBUG "\thdr_crc %08x\n", be32_to_cpu(vid_hdr->hdr_crc)); |
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index e347cc4388ed..d58ceb1ca8fd 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -189,8 +189,8 @@ retry: | |||
189 | } | 189 | } |
190 | 190 | ||
191 | if (retries++ < UBI_IO_RETRIES) { | 191 | if (retries++ < UBI_IO_RETRIES) { |
192 | dbg_io("error %d%s while reading %d bytes from PEB %d:%d," | 192 | dbg_io("error %d%s while reading %d bytes from PEB " |
193 | " read only %zd bytes, retry", | 193 | "%d:%d, read only %zd bytes, retry", |
194 | err, errstr, len, pnum, offset, read); | 194 | err, errstr, len, pnum, offset, read); |
195 | yield(); | 195 | yield(); |
196 | goto retry; | 196 | goto retry; |
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index d2d12ab7def4..2135a53732ff 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -1103,7 +1103,7 @@ static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si) | |||
1103 | * otherwise, only print a warning. | 1103 | * otherwise, only print a warning. |
1104 | */ | 1104 | */ |
1105 | if (si->corr_peb_count >= max_corr) { | 1105 | if (si->corr_peb_count >= max_corr) { |
1106 | ubi_err("too many corrupted PEBs, refusing this device"); | 1106 | ubi_err("too many corrupted PEBs, refusing"); |
1107 | return -EINVAL; | 1107 | return -EINVAL; |
1108 | } | 1108 | } |
1109 | } | 1109 | } |
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index f1be8b79663c..c6c22295898e 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -341,8 +341,8 @@ struct ubi_wl_entry; | |||
341 | * protected from the wear-leveling worker) | 341 | * protected from the wear-leveling worker) |
342 | * @pq_head: protection queue head | 342 | * @pq_head: protection queue head |
343 | * @wl_lock: protects the @used, @free, @pq, @pq_head, @lookuptbl, @move_from, | 343 | * @wl_lock: protects the @used, @free, @pq, @pq_head, @lookuptbl, @move_from, |
344 | * @move_to, @move_to_put @erase_pending, @wl_scheduled, @works, | 344 | * @move_to, @move_to_put @erase_pending, @wl_scheduled, @works, |
345 | * @erroneous, and @erroneous_peb_count fields | 345 | * @erroneous, and @erroneous_peb_count fields |
346 | * @move_mutex: serializes eraseblock moves | 346 | * @move_mutex: serializes eraseblock moves |
347 | * @work_sem: synchronizes the WL worker with use tasks | 347 | * @work_sem: synchronizes the WL worker with use tasks |
348 | * @wl_scheduled: non-zero if the wear-leveling was scheduled | 348 | * @wl_scheduled: non-zero if the wear-leveling was scheduled |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index b4cf57db2556..ff2c4956eeff 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1570,7 +1570,8 @@ void ubi_wl_close(struct ubi_device *ubi) | |||
1570 | * @ec: the erase counter to check | 1570 | * @ec: the erase counter to check |
1571 | * | 1571 | * |
1572 | * This function returns zero if the erase counter of physical eraseblock @pnum | 1572 | * This function returns zero if the erase counter of physical eraseblock @pnum |
1573 | * is equivalent to @ec, and a negative error code if not or if an error occurred. | 1573 | * is equivalent to @ec, and a negative error code if not or if an error |
1574 | * occurred. | ||
1574 | */ | 1575 | */ |
1575 | static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec) | 1576 | static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec) |
1576 | { | 1577 | { |