UBI: fix minor stylistic issues
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 28 Mar 2011 07:12:25 +0000 (10:12 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 14 Apr 2011 08:34:41 +0000 (11:34 +0300)
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>
drivers/mtd/ubi/cdev.c
drivers/mtd/ubi/debug.c
drivers/mtd/ubi/io.c
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/wl.c
include/linux/mtd/ubi.h
include/mtd/ubi-user.h

index 4119cb857c97d442a9a204a155694ad607877c89..191f3bb3c41a7440a6cf831655c6431f31ec55f6 100644 (file)
@@ -115,7 +115,7 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
                mode = UBI_READONLY;
 
        dbg_gen("open device %d, volume %d, mode %d",
-               ubi_num, vol_id, mode);
+               ubi_num, vol_id, mode);
 
        desc = ubi_open_volume(ubi_num, vol_id, mode);
        if (IS_ERR(desc))
@@ -158,7 +158,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
        loff_t new_offset;
 
        if (vol->updating) {
-                /* Update is in progress, seeking is prohibited */
+               /* Update is in progress, seeking is prohibited */
                dbg_err("updating");
                return -EBUSY;
        }
index d4d07e5f138f2ccdd4267d5166ee93647a71873f..0cd5beabe9c903518e6d0e7b05ac1ad13c43784e 100644 (file)
@@ -75,15 +75,15 @@ void ubi_dbg_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr)
 {
        printk(KERN_DEBUG "Volume identifier header dump:\n");
        printk(KERN_DEBUG "\tmagic     %08x\n", be32_to_cpu(vid_hdr->magic));
-       printk(KERN_DEBUG "\tversion   %d\n",   (int)vid_hdr->version);
-       printk(KERN_DEBUG "\tvol_type  %d\n",   (int)vid_hdr->vol_type);
-       printk(KERN_DEBUG "\tcopy_flag %d\n",   (int)vid_hdr->copy_flag);
-       printk(KERN_DEBUG "\tcompat    %d\n",   (int)vid_hdr->compat);
-       printk(KERN_DEBUG "\tvol_id    %d\n",   be32_to_cpu(vid_hdr->vol_id));
-       printk(KERN_DEBUG "\tlnum      %d\n",   be32_to_cpu(vid_hdr->lnum));
-       printk(KERN_DEBUG "\tdata_size %d\n",   be32_to_cpu(vid_hdr->data_size));
-       printk(KERN_DEBUG "\tused_ebs  %d\n",   be32_to_cpu(vid_hdr->used_ebs));
-       printk(KERN_DEBUG "\tdata_pad  %d\n",   be32_to_cpu(vid_hdr->data_pad));
+       printk(KERN_DEBUG "\tversion   %d\n",  (int)vid_hdr->version);
+       printk(KERN_DEBUG "\tvol_type  %d\n",  (int)vid_hdr->vol_type);
+       printk(KERN_DEBUG "\tcopy_flag %d\n",  (int)vid_hdr->copy_flag);
+       printk(KERN_DEBUG "\tcompat    %d\n",  (int)vid_hdr->compat);
+       printk(KERN_DEBUG "\tvol_id    %d\n",  be32_to_cpu(vid_hdr->vol_id));
+       printk(KERN_DEBUG "\tlnum      %d\n",  be32_to_cpu(vid_hdr->lnum));
+       printk(KERN_DEBUG "\tdata_size %d\n",  be32_to_cpu(vid_hdr->data_size));
+       printk(KERN_DEBUG "\tused_ebs  %d\n",  be32_to_cpu(vid_hdr->used_ebs));
+       printk(KERN_DEBUG "\tdata_pad  %d\n",  be32_to_cpu(vid_hdr->data_pad));
        printk(KERN_DEBUG "\tsqnum     %llu\n",
                (unsigned long long)be64_to_cpu(vid_hdr->sqnum));
        printk(KERN_DEBUG "\thdr_crc   %08x\n", be32_to_cpu(vid_hdr->hdr_crc));
index e347cc4388edd5cad5e96d471458a642450f4271..d58ceb1ca8fd1975b1a299edc83ee13b3c340779 100644 (file)
@@ -189,8 +189,8 @@ retry:
                }
 
                if (retries++ < UBI_IO_RETRIES) {
-                       dbg_io("error %d%s while reading %d bytes from PEB %d:%d,"
-                              " read only %zd bytes, retry",
+                       dbg_io("error %d%s while reading %d bytes from PEB "
+                              "%d:%d, read only %zd bytes, retry",
                               err, errstr, len, pnum, offset, read);
                        yield();
                        goto retry;
index d2d12ab7def427c22cb6303d986ae3206575cb39..2135a53732ffce0dc0b4b7806637449f7ddec1f6 100644 (file)
@@ -1103,7 +1103,7 @@ static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si)
                 * otherwise, only print a warning.
                 */
                if (si->corr_peb_count >= max_corr) {
-                       ubi_err("too many corrupted PEBs, refusing this device");
+                       ubi_err("too many corrupted PEBs, refusing");
                        return -EINVAL;
                }
        }
index f1be8b79663cbfc3a5d87828cf8b12c2cd7d4c28..c6c22295898e97ef3fdbfa16fd4171ec650fb55a 100644 (file)
@@ -341,8 +341,8 @@ struct ubi_wl_entry;
  *      protected from the wear-leveling worker)
  * @pq_head: protection queue head
  * @wl_lock: protects the @used, @free, @pq, @pq_head, @lookuptbl, @move_from,
- *          @move_to, @move_to_put @erase_pending, @wl_scheduled, @works,
- *          @erroneous, and @erroneous_peb_count fields
+ *          @move_to, @move_to_put @erase_pending, @wl_scheduled, @works,
+ *          @erroneous, and @erroneous_peb_count fields
  * @move_mutex: serializes eraseblock moves
  * @work_sem: synchronizes the WL worker with use tasks
  * @wl_scheduled: non-zero if the wear-leveling was scheduled
index b4cf57db25561c8323ba97dbccdbc53a50d51306..ff2c4956eeff0aa08bbe0e528151104dd04fba68 100644 (file)
@@ -1570,7 +1570,8 @@ void ubi_wl_close(struct ubi_device *ubi)
  * @ec: the erase counter to check
  *
  * This function returns zero if the erase counter of physical eraseblock @pnum
- * is equivalent to @ec, and a negative error code if not or if an error occurred.
+ * is equivalent to @ec, and a negative error code if not or if an error
+ * occurred.
  */
 static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec)
 {
index 84854edf4436f2a62ff7bc956101a6953236726e..15da0e99f48aef0615fafeefb9c3142a0f2bfa5a 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __LINUX_UBI_H__
 #define __LINUX_UBI_H__
 
-#include <asm/ioctl.h>
+#include <linux/ioctl.h>
 #include <linux/types.h>
 #include <mtd/ubi-user.h>
 
@@ -87,7 +87,7 @@ enum {
  * physical eraseblock size and on how much bytes UBI headers consume. But
  * because of the volume alignment (@alignment), the usable size of logical
  * eraseblocks if a volume may be less. The following equation is true:
- *     @usable_leb_size = LEB size - (LEB size mod @alignment),
+ *     @usable_leb_size = LEB size - (LEB size mod @alignment),
  * where LEB size is the logical eraseblock size defined by the UBI device.
  *
  * The alignment is multiple to the minimal flash input/output unit size or %1
index a3903423c005ab0e2f9bbdfcfb6acb9cb22ddaff..3c4109777afff101c192b880ca1072978eddf3d8 100644 (file)
@@ -406,9 +406,9 @@ struct ubi_map_req {
  * @value: value to set
  */
 struct ubi_set_vol_prop_req {
-       __u8  property;
-       __u8  padding[7];
-       __u64 value;
+       __u8  property;
+       __u8  padding[7];
+       __u64 value;
 }  __packed;
 
 #endif /* __UBI_USER_H__ */