]> git.proxmox.com Git - mirror_spl.git/commitdiff
Make include/linux/ conform to ZFS style standard
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 5 Oct 2017 16:42:20 +0000 (12:42 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 9 Oct 2017 21:27:27 +0000 (14:27 -0700)
No semantic changes.

Fix the following types of style issues:
blank after preprocessor #
#define followed by space instead of tab
improper first line of block comment
indent by spaces instead of tabs
last line in file is blank
missing blank after open comment
missing space before left brace
non-continuation indented 4 spaces
spaces instead of tabs
unparenthesized return expression

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
include/linux/bitops_compat.h
include/linux/compiler_compat.h
include/linux/delay_compat.h
include/linux/file_compat.h
include/linux/list_compat.h
include/linux/math64_compat.h
include/linux/mm_compat.h
include/linux/proc_compat.h
include/linux/rwsem_compat.h
include/linux/wait_compat.h
include/linux/zlib_compat.h

index dc7ed86007774617b6abf0c66dc268760488b4d1..a62b628e85a0f864ace4bb9ab3ad43b14230d48b 100644 (file)
@@ -23,9 +23,8 @@
  */
 
 #ifndef _SPL_BITOPS_COMPAT_H
  */
 
 #ifndef _SPL_BITOPS_COMPAT_H
-#define _SPL_BITOPS_COMPAT_H
+#define        _SPL_BITOPS_COMPAT_H
 
 #include <linux/bitops.h>
 
 #endif /* _SPL_BITOPS_COMPAT_H */
 
 #include <linux/bitops.h>
 
 #endif /* _SPL_BITOPS_COMPAT_H */
-
index 06268bf4c39efea531c9ecb7cd94b24d14ac91e5..696d7957228314098089cb7c47e3ab46d360664b 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_COMPILER_COMPAT_H
  */
 
 #ifndef _SPL_COMPILER_COMPAT_H
-#define _SPL_COMPILER_COMPAT_H
+#define        _SPL_COMPILER_COMPAT_H
 
 #include <linux/compiler.h>
 
 
 #include <linux/compiler.h>
 
@@ -41,7 +41,7 @@
  * handlers, all running on the same CPU.
  */
 /* Taken from 2.6.33.2 */
  * handlers, all running on the same CPU.
  */
 /* Taken from 2.6.33.2 */
-# define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
+#define        ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
 #endif
 
 #endif /* _SPL_COMPILER_COMPAT_H */
 #endif
 
 #endif /* _SPL_COMPILER_COMPAT_H */
index 0c91a24d6a33c1a1dbc0e19c4c8610667ec1698b..c7a381100c7f3dce238e89c48f17ca7014c046bd 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_DELAY_COMPAT_H
  */
 
 #ifndef _SPL_DELAY_COMPAT_H
-#define _SPL_DELAY_COMPAT_H
+#define        _SPL_DELAY_COMPAT_H
 
 #include <linux/delay.h>
 #include <linux/time.h>
 
 #include <linux/delay.h>
 #include <linux/time.h>
index 26299965b7ad05ee33051cbb2a1f2e7115b3c458..7d61ba5f9ce29044527f29127f549caa1764982f 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_FILE_COMPAT_H
  */
 
 #ifndef _SPL_FILE_COMPAT_H
-#define _SPL_FILE_COMPAT_H
+#define        _SPL_FILE_COMPAT_H
 
 #include <linux/fs.h>
 #ifdef HAVE_FDTABLE_HEADER
 
 #include <linux/fs.h>
 #ifdef HAVE_FDTABLE_HEADER
 static inline struct file *
 spl_filp_open(const char *name, int flags, int mode, int *err)
 {
 static inline struct file *
 spl_filp_open(const char *name, int flags, int mode, int *err)
 {
-        struct file *filp = NULL;
-        int rc;
+       struct file *filp = NULL;
+       int rc;
 
 
-        filp = filp_open(name, flags, mode);
-        if (IS_ERR(filp)) {
-                rc = PTR_ERR(filp);
-                if (err)
-                        *err = rc;
-                filp = NULL;
-        }
-        return filp;
+       filp = filp_open(name, flags, mode);
+       if (IS_ERR(filp)) {
+               rc = PTR_ERR(filp);
+               if (err)
+                       *err = rc;
+               filp = NULL;
+       }
+       return (filp);
 }
 
 }
 
-#define spl_filp_close(f)              filp_close(f, NULL)
-#define spl_filp_poff(f)               (&(f)->f_pos)
-#define spl_filp_write(fp, b, s, p)    (fp)->f_op->write((fp), (b), (s), p)
+#define        spl_filp_close(f)               filp_close(f, NULL)
+#define        spl_filp_poff(f)                (&(f)->f_pos)
+#define        spl_filp_write(fp, b, s, p)     (fp)->f_op->write((fp), (b), (s), p)
 
 static inline int
 spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
 
 static inline int
 spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
@@ -65,7 +65,7 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
                error = fp->f_dentry->d_inode->i_op->fallocate(
                    fp->f_dentry->d_inode, mode, offset, len);
 #endif /* HAVE_INODE_FALLOCATE */
                error = fp->f_dentry->d_inode->i_op->fallocate(
                    fp->f_dentry->d_inode, mode, offset, len);
 #endif /* HAVE_INODE_FALLOCATE */
-#endif /*HAVE_FILE_FALLOCATE */
+#endif /* HAVE_FILE_FALLOCATE */
 
        return (error);
 }
 
        return (error);
 }
@@ -97,4 +97,3 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
 #endif
 
 #endif /* SPL_FILE_COMPAT_H */
 #endif
 
 #endif /* SPL_FILE_COMPAT_H */
-
index 63e4553184077bb5e76eafc45d4a8ba5b7986c31..fece8ad345d985c3734baa34291480ab2f42e4af 100644 (file)
  */
 
 #ifndef _SPL_LIST_COMPAT_H
  */
 
 #ifndef _SPL_LIST_COMPAT_H
-#define _SPL_LIST_COMPAT_H
+#define        _SPL_LIST_COMPAT_H
 
 #include <linux/list.h>
 
 #ifndef list_for_each_entry_safe_reverse
 
 
 #include <linux/list.h>
 
 #ifndef list_for_each_entry_safe_reverse
 
-/**
+/*
  * list_for_each_entry_safe_reverse
  * list_for_each_entry_safe_reverse
- * @pos:        the type * to use as a loop cursor.
- * @n:          another type * to use as temporary storage
- * @head:       the head for your list.
- * @member:     the name of the list_struct within the struct.
+ * @pos:       the type * to use as a loop cursor.
+ * @n:         another type * to use as temporary storage
+ * @head:      the head for your list.
+ * @member:    the name of the list_struct within the struct.
  *
  * Iterate backwards over list of given type, safe against removal
  * of list entry.
  */
  *
  * Iterate backwards over list of given type, safe against removal
  * of list entry.
  */
-#define list_for_each_entry_safe_reverse(pos, n, head, member)          \
-        for (pos = list_entry((head)->prev, typeof(*pos), member),      \
-                n = list_entry(pos->member.prev, typeof(*pos), member); \
-             &pos->member != (head);                                    \
-             pos = n, n = list_entry(n->member.prev, typeof(*n), member))
+#define        list_for_each_entry_safe_reverse(pos, n, head, member)          \
+       for (pos = list_entry((head)->prev, typeof(*pos), member),      \
+           n = list_entry(pos->member.prev, typeof(*pos), member);     \
+           &pos->member != (head);                                     \
+           pos = n, n = list_entry(n->member.prev, typeof(*n), member))
 
 #endif /* list_for_each_entry_safe_reverse */
 
 #endif /* SPL_LIST_COMPAT_H */
 
 #endif /* list_for_each_entry_safe_reverse */
 
 #endif /* SPL_LIST_COMPAT_H */
-
index 83046a05f83b0805fe15190d2d433592ed30dda8..e45015bea9abd823637bbbe124eba1327510b0c8 100644 (file)
  */
 
 #ifndef _SPL_MATH64_COMPAT_H
  */
 
 #ifndef _SPL_MATH64_COMPAT_H
-#define _SPL_MATH64_COMPAT_H
+#define        _SPL_MATH64_COMPAT_H
 
 #ifndef abs64
 
 #ifndef abs64
-#define abs64(x)       ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; })
+#define        abs64(x)        ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; })
 #endif
 
 #endif /* _SPL_MATH64_COMPAT_H */
 #endif
 
 #endif /* _SPL_MATH64_COMPAT_H */
index 6c285bbbbd5523d613794d453a5f6f3142356538..c10652efd057dcf93ac65f4757de3181a3ab4722 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_MM_COMPAT_H
  */
 
 #ifndef _SPL_MM_COMPAT_H
-#define _SPL_MM_COMPAT_H
+#define        _SPL_MM_COMPAT_H
 
 #include <linux/mm.h>
 #include <linux/fs.h>
 
 #include <linux/mm.h>
 #include <linux/fs.h>
index 3ec66afbc1194f9f6fe5406b2bf054e9044c4cfc..91d914e102684da2efe9ed819d05975604988b78 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_PROC_COMPAT_H
  */
 
 #ifndef _SPL_PROC_COMPAT_H
-#define _SPL_PROC_COMPAT_H
+#define        _SPL_PROC_COMPAT_H
 
 #include <linux/proc_fs.h>
 
 
 #include <linux/proc_fs.h>
 
index c2f22b060675f9b4edb7aece339019b88ab20ca1..7a0dcf8dc3fe611178356ed5bd29ef2fd658f64e 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #ifndef _SPL_RWSEM_COMPAT_H
  */
 
 #ifndef _SPL_RWSEM_COMPAT_H
-#define _SPL_RWSEM_COMPAT_H
+#define        _SPL_RWSEM_COMPAT_H
 
 #include <linux/rwsem.h>
 
 
 #include <linux/rwsem.h>
 
 int rwsem_tryupgrade(struct rw_semaphore *rwsem);
 
 #if defined(RWSEM_SPINLOCK_IS_RAW)
 int rwsem_tryupgrade(struct rw_semaphore *rwsem);
 
 #if defined(RWSEM_SPINLOCK_IS_RAW)
-#define spl_rwsem_lock_irqsave(lk, fl)       raw_spin_lock_irqsave(lk, fl)
-#define spl_rwsem_unlock_irqrestore(lk, fl)  raw_spin_unlock_irqrestore(lk, fl)
-#define spl_rwsem_trylock_irqsave(lk, fl)    raw_spin_trylock_irqsave(lk, fl)
+#define        spl_rwsem_lock_irqsave(lk, fl)          raw_spin_lock_irqsave(lk, fl)
+#define        spl_rwsem_unlock_irqrestore(lk, fl)     \
+    raw_spin_unlock_irqrestore(lk, fl)
+#define        spl_rwsem_trylock_irqsave(lk, fl)       raw_spin_trylock_irqsave(lk, fl)
 #else
 #else
-#define spl_rwsem_lock_irqsave(lk, fl)       spin_lock_irqsave(lk, fl)
-#define spl_rwsem_unlock_irqrestore(lk, fl)  spin_unlock_irqrestore(lk, fl)
-#define spl_rwsem_trylock_irqsave(lk, fl)    spin_trylock_irqsave(lk, fl)
+#define        spl_rwsem_lock_irqsave(lk, fl)          spin_lock_irqsave(lk, fl)
+#define        spl_rwsem_unlock_irqrestore(lk, fl)     spin_unlock_irqrestore(lk, fl)
+#define        spl_rwsem_trylock_irqsave(lk, fl)       spin_trylock_irqsave(lk, fl)
 #endif /* RWSEM_SPINLOCK_IS_RAW */
 
 #endif /* RWSEM_SPINLOCK_IS_RAW */
 
-#define spl_rwsem_is_locked(rwsem)           rwsem_is_locked(rwsem)
+#define        spl_rwsem_is_locked(rwsem)              rwsem_is_locked(rwsem)
 
 #endif /* _SPL_RWSEM_COMPAT_H */
 
 #endif /* _SPL_RWSEM_COMPAT_H */
index dd0c9323ba6d14e94b54669f0c646f82d775c422..10fe2d8960955654119e755c32b1e199224775af 100644 (file)
  */
 
 #ifndef _SPL_WAIT_COMPAT_H
  */
 
 #ifndef _SPL_WAIT_COMPAT_H
-#define _SPL_WAIT_COMPAT_H
+#define        _SPL_WAIT_COMPAT_H
 
 #include <linux/sched.h>
 #include <linux/wait.h>
 
 #ifndef HAVE_WAIT_ON_BIT_ACTION
 
 #include <linux/sched.h>
 #include <linux/wait.h>
 
 #ifndef HAVE_WAIT_ON_BIT_ACTION
-#  define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode)
+#define        spl_wait_on_bit(word, bit, mode)        wait_on_bit(word, bit, mode)
 #else
 
 static inline int
 spl_bit_wait(void *word)
 {
 #else
 
 static inline int
 spl_bit_wait(void *word)
 {
-        schedule();
-        return 0;
+       schedule();
+       return (0);
 }
 
 }
 
-#define spl_wait_on_bit(word, bit, mode)                       \
+#define        spl_wait_on_bit(word, bit, mode)                \
        wait_on_bit(word, bit, spl_bit_wait, mode)
 
 #endif /* HAVE_WAIT_ON_BIT_ACTION */
        wait_on_bit(word, bit, spl_bit_wait, mode)
 
 #endif /* HAVE_WAIT_ON_BIT_ACTION */
index d2fefd15a89a82f1975d06c561ed77094116419b..3c14285d278ad21c45487b396df2dcb7d42e041f 100644 (file)
  */
 
 #ifndef _SPL_ZLIB_COMPAT_H
  */
 
 #ifndef _SPL_ZLIB_COMPAT_H
-#define _SPL_ZLIB_COMPAT_H
+#define        _SPL_ZLIB_COMPAT_H
 
 #include <linux/zlib.h>
 
 #ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
 
 #include <linux/zlib.h>
 
 #ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
-#define spl_zlib_deflate_workspacesize(wb, ml) \
+#define        spl_zlib_deflate_workspacesize(wb, ml) \
        zlib_deflate_workspacesize(wb, ml)
 #else
        zlib_deflate_workspacesize(wb, ml)
 #else
-#define spl_zlib_deflate_workspacesize(wb, ml) \
+#define        spl_zlib_deflate_workspacesize(wb, ml) \
        zlib_deflate_workspacesize()
 #endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */
 
        zlib_deflate_workspacesize()
 #endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */