Skip to content

Commit feddbb3

Browse files
Artem BityutskiyArtem Bityutskiy
authored andcommitted
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>
1 parent 3627924 commit feddbb3

8 files changed

Lines changed: 23 additions & 22 deletions

File tree

‎drivers/mtd/ubi/cdev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
115115
mode = UBI_READONLY;
116116

117117
dbg_gen("open device %d, volume %d, mode %d",
118-
ubi_num, vol_id, mode);
118+
ubi_num, vol_id, mode);
119119

120120
desc = ubi_open_volume(ubi_num, vol_id, mode);
121121
if (IS_ERR(desc))
@@ -158,7 +158,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
158158
loff_t new_offset;
159159

160160
if (vol->updating) {
161-
/* Update is in progress, seeking is prohibited */
161+
/* Update is in progress, seeking is prohibited */
162162
dbg_err("updating");
163163
return -EBUSY;
164164
}

‎drivers/mtd/ubi/debug.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ void ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr)
7575
{
7676
printk(KERN_DEBUG "Volume identifier header dump:\n");
7777
printk(KERN_DEBUG "\tmagic %08x\n", be32_to_cpu(vid_hdr->magic));
78-
printk(KERN_DEBUG "\tversion %d\n", (int)vid_hdr->version);
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);
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));
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));
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));
78+
printk(KERN_DEBUG "\tversion %d\n", (int)vid_hdr->version);
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);
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));
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));
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));
8787
printk(KERN_DEBUG "\tsqnum %llu\n",
8888
(unsigned long long)be64_to_cpu(vid_hdr->sqnum));
8989
printk(KERN_DEBUG "\thdr_crc %08x\n", be32_to_cpu(vid_hdr->hdr_crc));

‎drivers/mtd/ubi/io.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset,
189189
}
190190

191191
if (retries++ < UBI_IO_RETRIES) {
192-
dbg_io("error %d%s while reading %d bytes from PEB %d:%d,"
193-
" read only %zd bytes, retry",
192+
dbg_io("error %d%s while reading %d bytes from PEB "
193+
"%d:%d, read only %zd bytes, retry",
194194
err, errstr, len, pnum, offset, read);
195195
yield();
196196
goto retry;

‎drivers/mtd/ubi/scan.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si)
11031103
* otherwise, only print a warning.
11041104
*/
11051105
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");
11071107
return -EINVAL;
11081108
}
11091109
}

‎drivers/mtd/ubi/ubi.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ struct ubi_wl_entry;
341341
* protected from the wear-leveling worker)
342342
* @pq_head: protection queue head
343343
* @wl_lock: protects the @used, @free, @pq, @pq_head, @lookuptbl, @move_from,
344-
* @move_to, @move_to_put @erase_pending, @wl_scheduled, @works,
345-
* @erroneous, and @erroneous_peb_count fields
344+
* @move_to, @move_to_put @erase_pending, @wl_scheduled, @works,
345+
* @erroneous, and @erroneous_peb_count fields
346346
* @move_mutex: serializes eraseblock moves
347347
* @work_sem: synchronizes the WL worker with use tasks
348348
* @wl_scheduled: non-zero if the wear-leveling was scheduled

‎drivers/mtd/ubi/wl.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,8 @@ void ubi_wl_close(struct ubi_device *ubi)
15701570
* @ec: the erase counter to check
15711571
*
15721572
* 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.
15741575
*/
15751576
static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec)
15761577
{

‎include/linux/mtd/ubi.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#ifndef __LINUX_UBI_H__
2222
#define __LINUX_UBI_H__
2323

24-
#include <asm/ioctl.h>
24+
#include <linux/ioctl.h>
2525
#include <linux/types.h>
2626
#include <mtd/ubi-user.h>
2727

@@ -87,7 +87,7 @@ enum {
8787
* physical eraseblock size and on how much bytes UBI headers consume. But
8888
* because of the volume alignment (@alignment), the usable size of logical
8989
* eraseblocks if a volume may be less. The following equation is true:
90-
* @usable_leb_size = LEB size - (LEB size mod @alignment),
90+
* @usable_leb_size = LEB size - (LEB size mod @alignment),
9191
* where LEB size is the logical eraseblock size defined by the UBI device.
9292
*
9393
* The alignment is multiple to the minimal flash input/output unit size or %1

‎include/mtd/ubi-user.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@ struct ubi_map_req {
406406
* @value: value to set
407407
*/
408408
struct ubi_set_vol_prop_req {
409-
__u8 property;
410-
__u8 padding[7];
411-
__u64 value;
409+
__u8 property;
410+
__u8 padding[7];
411+
__u64 value;
412412
} __packed;
413413

414414
#endif /* __UBI_USER_H__ */

0 commit comments

Comments
 (0)