summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-10-05 12:42:20 -0400
committerBrian Behlendorf <[email protected]>2017-10-09 14:27:27 -0700
commitce319db57b1662a21d60550e546592c96c3da7a1 (patch)
treee097eae0949ed5b162e7b17305982e0cc66b8a88
parent4b393c50ae0e74b351534030d8b87f1967832d09 (diff)
Make include/linux/ conform to ZFS style standard
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 <[email protected]>
-rw-r--r--include/linux/bitops_compat.h3
-rw-r--r--include/linux/compiler_compat.h4
-rw-r--r--include/linux/delay_compat.h2
-rw-r--r--include/linux/file_compat.h31
-rw-r--r--include/linux/list_compat.h23
-rw-r--r--include/linux/math64_compat.h4
-rw-r--r--include/linux/mm_compat.h2
-rw-r--r--include/linux/proc_compat.h2
-rw-r--r--include/linux/rwsem_compat.h17
-rw-r--r--include/linux/wait_compat.h10
-rw-r--r--include/linux/zlib_compat.h6
11 files changed, 51 insertions, 53 deletions
diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h
index dc7ed8600..a62b628e8 100644
--- a/include/linux/bitops_compat.h
+++ b/include/linux/bitops_compat.h
@@ -23,9 +23,8 @@
*/
#ifndef _SPL_BITOPS_COMPAT_H
-#define _SPL_BITOPS_COMPAT_H
+#define _SPL_BITOPS_COMPAT_H
#include <linux/bitops.h>
#endif /* _SPL_BITOPS_COMPAT_H */
-
diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h
index 06268bf4c..696d79572 100644
--- a/include/linux/compiler_compat.h
+++ b/include/linux/compiler_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_COMPILER_COMPAT_H
-#define _SPL_COMPILER_COMPAT_H
+#define _SPL_COMPILER_COMPAT_H
#include <linux/compiler.h>
@@ -41,7 +41,7 @@
* 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 */
diff --git a/include/linux/delay_compat.h b/include/linux/delay_compat.h
index 0c91a24d6..c7a381100 100644
--- a/include/linux/delay_compat.h
+++ b/include/linux/delay_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_DELAY_COMPAT_H
-#define _SPL_DELAY_COMPAT_H
+#define _SPL_DELAY_COMPAT_H
#include <linux/delay.h>
#include <linux/time.h>
diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h
index 26299965b..7d61ba5f9 100644
--- a/include/linux/file_compat.h
+++ b/include/linux/file_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_FILE_COMPAT_H
-#define _SPL_FILE_COMPAT_H
+#define _SPL_FILE_COMPAT_H
#include <linux/fs.h>
#ifdef HAVE_FDTABLE_HEADER
@@ -33,22 +33,22 @@
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)
@@ -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 */
-#endif /*HAVE_FILE_FALLOCATE */
+#endif /* HAVE_FILE_FALLOCATE */
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 */
-
diff --git a/include/linux/list_compat.h b/include/linux/list_compat.h
index 63e455318..fece8ad34 100644
--- a/include/linux/list_compat.h
+++ b/include/linux/list_compat.h
@@ -23,29 +23,28 @@
*/
#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
-/**
+/*
* 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.
*/
-#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 */
-
diff --git a/include/linux/math64_compat.h b/include/linux/math64_compat.h
index 83046a05f..e45015bea 100644
--- a/include/linux/math64_compat.h
+++ b/include/linux/math64_compat.h
@@ -23,10 +23,10 @@
*/
#ifndef _SPL_MATH64_COMPAT_H
-#define _SPL_MATH64_COMPAT_H
+#define _SPL_MATH64_COMPAT_H
#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 */
diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h
index 6c285bbbb..c10652efd 100644
--- a/include/linux/mm_compat.h
+++ b/include/linux/mm_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_MM_COMPAT_H
-#define _SPL_MM_COMPAT_H
+#define _SPL_MM_COMPAT_H
#include <linux/mm.h>
#include <linux/fs.h>
diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h
index 3ec66afbc..91d914e10 100644
--- a/include/linux/proc_compat.h
+++ b/include/linux/proc_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_PROC_COMPAT_H
-#define _SPL_PROC_COMPAT_H
+#define _SPL_PROC_COMPAT_H
#include <linux/proc_fs.h>
diff --git a/include/linux/rwsem_compat.h b/include/linux/rwsem_compat.h
index c2f22b060..7a0dcf8dc 100644
--- a/include/linux/rwsem_compat.h
+++ b/include/linux/rwsem_compat.h
@@ -23,7 +23,7 @@
*/
#ifndef _SPL_RWSEM_COMPAT_H
-#define _SPL_RWSEM_COMPAT_H
+#define _SPL_RWSEM_COMPAT_H
#include <linux/rwsem.h>
@@ -53,15 +53,16 @@
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
-#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 */
-#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 */
diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h
index dd0c9323b..10fe2d896 100644
--- a/include/linux/wait_compat.h
+++ b/include/linux/wait_compat.h
@@ -23,23 +23,23 @@
*/
#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
-# 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)
{
- 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 */
diff --git a/include/linux/zlib_compat.h b/include/linux/zlib_compat.h
index d2fefd15a..3c14285d2 100644
--- a/include/linux/zlib_compat.h
+++ b/include/linux/zlib_compat.h
@@ -22,15 +22,15 @@
*/
#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
-#define spl_zlib_deflate_workspacesize(wb, ml) \
+#define spl_zlib_deflate_workspacesize(wb, ml) \
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 */