]> granicus.if.org Git - zfs/commitdiff
codebase style improvements for OpenZFS 6459 port
authorGeorge Melikov <mail@gmelikov.ru>
Fri, 20 Jan 2017 21:17:55 +0000 (00:17 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 22 Jan 2017 21:25:40 +0000 (13:25 -0800)
46 files changed:
cmd/zpool/zpool_main.c
cmd/zpool/zpool_util.c
include/linux/vfs_compat.h
include/sys/trace_acl.h
include/sys/trace_arc.h
include/sys/trace_dbgmsg.h
include/sys/trace_dbuf.h
include/sys/trace_dmu.h
include/sys/trace_dnode.h
include/sys/trace_multilist.h
include/sys/trace_txg.h
include/sys/trace_zil.h
lib/libnvpair/libnvpair.c
lib/libshare/libshare.c
lib/libspl/include/sys/byteorder.h
lib/libspl/include/umem.h
lib/libzpool/taskq.c
module/icp/algs/aes/aes_impl.c
module/icp/algs/modes/ctr.c
module/icp/algs/skein/skein_block.c
module/icp/asm-x86_64/aes/aeskey.c
module/icp/io/aes.c
module/icp/io/edonr_mod.c
module/icp/io/skein_mod.c
module/unicode/u8_textprep.c
module/zcommon/zfs_fletcher_sse.c
module/zfs/abd.c
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dmu.c
module/zfs/dmu_send.c
module/zfs/policy.c
module/zfs/spa_misc.c
module/zfs/vdev.c
module/zfs/vdev_mirror.c
module/zfs/vdev_raidz_math.c
module/zfs/vdev_raidz_math_aarch64_neon.c
module/zfs/vdev_raidz_math_impl.h
module/zfs/vdev_raidz_math_ssse3.c
module/zfs/zfs_ctldir.c
module/zfs/zio.c
module/zfs/zio_checksum.c
module/zfs/zpl_file.c
module/zfs/zvol.c
module/zpios/pios.c
tests/zfs-tests/cmd/xattrtest/xattrtest.c

index c0500ec003f6a8e2be1b9bc9d9bc49217d3d10c6..da6744b76b86baa3c7034031fba58266f588cd13 100644 (file)
@@ -2953,7 +2953,8 @@ struct stat_array {
 };
 
 static uint64_t
-stat_histo_max(struct stat_array *nva, unsigned int len) {
+stat_histo_max(struct stat_array *nva, unsigned int len)
+{
        uint64_t max = 0;
        int i;
        for (i = 0; i < len; i++)
@@ -2969,7 +2970,8 @@ stat_histo_max(struct stat_array *nva, unsigned int len) {
  */
 static int
 nvpair64_to_stat_array(nvlist_t *nvl, const char *name,
-    struct stat_array *nva) {
+    struct stat_array *nva)
+{
        nvpair_t *tmp;
        int ret;
 
@@ -3871,7 +3873,8 @@ is_pool(char *name)
 
 /* Are all our argv[] strings pool names?  If so return 1, 0 otherwise. */
 static int
-are_all_pools(int argc, char **argv) {
+are_all_pools(int argc, char **argv)
+{
        if ((argc == 0) || !*argv)
                return (0);
 
@@ -3952,7 +3955,8 @@ get_interval_count_filter_guids(int *argc, char **argv, float *interval,
  * seconds.
  */
 static void
-fsleep(float sec) {
+fsleep(float sec)
+{
        struct timespec req;
        req.tv_sec = floor(sec);
        req.tv_nsec = (sec - (float)req.tv_sec) * NANOSEC;
index df3f9bf834f4c037a36bb72540d274bb878784fd..43abfa23b0b8212ce686114361ee276210de0d8a 100644 (file)
@@ -88,7 +88,8 @@ num_logs(nvlist_t *nv)
 
 /* Find the max element in an array of uint64_t values */
 uint64_t
-array64_max(uint64_t array[], unsigned int len) {
+array64_max(uint64_t array[], unsigned int len)
+{
        uint64_t max = 0;
        int i;
        for (i = 0; i < len; i++)
@@ -102,7 +103,8 @@ array64_max(uint64_t array[], unsigned int len) {
  * floating point numbers.
  */
 int
-isnumber(char *str) {
+isnumber(char *str)
+{
        for (; *str; str++)
                if (!(isdigit(*str) || (*str == '.')))
                        return (0);
index 7a1cb967b96c57a056d2fb959101684c84b9061a..baa29801822b3f34b7d3af78e2876ce3ff0a278a 100644 (file)
@@ -225,7 +225,8 @@ zpl_posix_acl_release(struct posix_acl *acl)
 #define        zpl_forget_cached_acl(ip, ty)           forget_cached_acl(ip, ty)
 #else
 static inline void
-zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) {
+zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer)
+{
        struct posix_acl *older = NULL;
 
        spin_lock(&ip->i_lock);
@@ -250,7 +251,8 @@ zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) {
 }
 
 static inline void
-zpl_forget_cached_acl(struct inode *ip, int type) {
+zpl_forget_cached_acl(struct inode *ip, int type)
+{
        zpl_set_cached_acl(ip, type, (struct posix_acl *)ACL_NOT_CACHED);
 }
 #endif /* HAVE_SET_CACHED_ACL_USABLE */
@@ -261,7 +263,8 @@ zpl_forget_cached_acl(struct inode *ip, int type) {
 #define        __posix_acl_create(acl, gfp, mode)      posix_acl_create(acl, gfp, mode)
 #else
 static inline int
-__posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) {
+__posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode)
+{
        struct posix_acl *oldacl = *acl;
        mode_t mode = umode;
        int error;
@@ -282,7 +285,8 @@ __posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) {
 }
 
 static inline int
-__posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep) {
+__posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep)
+{
        struct posix_acl *oldacl = *acl;
        mode_t mode = *umodep;
        int error;
index 1d6e15c640bab795e140d1ba1b22faae8a72a767..80c63f743e0fae751cd4568c4a3c83c3e34864a6 100644 (file)
@@ -139,9 +139,11 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
 /* END CSTYLED */
 
 #define        DEFINE_ACE_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_ace_class, name, \
        TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
        TP_ARGS(zn, ace, mask_matched))
+/* END CSTYLED */
 DEFINE_ACE_EVENT(zfs_zfs__ace__denies);
 DEFINE_ACE_EVENT(zfs_zfs__ace__allows);
 
index 9756bd458cc7ddea774f8b5c74ec8e85cd3bf4e8..b4edb514201c623d00af93302dcae66cab79648a 100644 (file)
@@ -98,9 +98,11 @@ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class,
 /* END CSTYLED */
 
 #define        DEFINE_ARC_BUF_HDR_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \
        TP_PROTO(arc_buf_hdr_t *ab), \
        TP_ARGS(ab))
+/* END CSTYLED */
 DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit);
 DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict);
 DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete);
@@ -141,9 +143,11 @@ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class,
 /* END CSTYLED */
 
 #define        DEFINE_L2ARC_RW_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_l2arc_rw_class, name, \
        TP_PROTO(vdev_t *vd, zio_t *zio), \
        TP_ARGS(vd, zio))
+/* END CSTYLED */
 DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read);
 DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write);
 
@@ -166,9 +170,11 @@ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class,
 /* END CSTYLED */
 
 #define        DEFINE_L2ARC_IODONE_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_l2arc_iodone_class, name, \
        TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
        TP_ARGS(zio, cb))
+/* END CSTYLED */
 DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone);
 
 
@@ -278,10 +284,12 @@ DECLARE_EVENT_CLASS(zfs_arc_miss_class,
 /* END CSTYLED */
 
 #define        DEFINE_ARC_MISS_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_arc_miss_class, name, \
        TP_PROTO(arc_buf_hdr_t *hdr, \
            const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
        TP_ARGS(hdr, bp, size, zb))
+/* END CSTYLED */
 DEFINE_ARC_MISS_EVENT(zfs_arc__miss);
 
 /*
@@ -337,10 +345,12 @@ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class,
 /* END CSTYLED */
 
 #define        DEFINE_L2ARC_EVICT_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_l2arc_evict_class, name, \
        TP_PROTO(l2arc_dev_t *dev, \
            list_t *buflist, uint64_t taddr, boolean_t all), \
        TP_ARGS(dev, buflist, taddr, all))
+/* END CSTYLED */
 DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict);
 
 #endif /* _TRACE_ARC_H */
index e5b79f2ff8c9f22a51fffcc4c3e9785c5116f95b..27abe703f4907c068b81da66c24acc4c43effc2c 100644 (file)
@@ -69,10 +69,12 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class,
 /* END CSTYLED */
 
 #define        DEFINE_DPRINTF_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_dprintf_class, name, \
        TP_PROTO(const char *file, const char *function, int line, \
            const char *msg), \
        TP_ARGS(file, function, line, msg))
+/* END CSTYLED */
 DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf);
 
 /*
@@ -109,16 +111,20 @@ DECLARE_EVENT_CLASS(zfs_set_error_class,
 
 #ifdef TP_CONDITION
 #define        DEFINE_SET_ERROR_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT_CONDITION(zfs_set_error_class, name, \
        TP_PROTO(const char *file, const char *function, int line, \
            uintptr_t error), \
        TP_ARGS(file, function, line, error), \
        TP_CONDITION(error))
+/* END CSTYLED */
 #else
 #define        DEFINE_SET_ERROR_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_set_error_class, name, \
        TP_PROTO(const char *file, const char *function, int line, \
            uintptr_t error), \
        TP_ARGS(file, function, line, error))
+/* END CSTYLED */
 #endif
 DEFINE_SET_ERROR_EVENT(zfs_set__error);
index 76274d15257530b8427f5a1e02dd1300805482e8..4c5e51ebe3b103ee3a9d3a0f8db7a5a43c4e2791 100644 (file)
@@ -78,6 +78,7 @@
        __entry->db_blkid, __entry->db_offset,                  \
        __entry->db_size, __entry->db_state, __entry->db_holds
 
+/* BEGIN CSTYLED */
 DECLARE_EVENT_CLASS(zfs_dbuf_class,
        TP_PROTO(dmu_buf_impl_t *db, zio_t *zio),
        TP_ARGS(db, zio),
@@ -85,13 +86,17 @@ DECLARE_EVENT_CLASS(zfs_dbuf_class,
        TP_fast_assign(DBUF_TP_FAST_ASSIGN),
        TP_printk(DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS)
 );
+/* END CSTYLED */
 
 #define        DEFINE_DBUF_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_dbuf_class, name, \
        TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
        TP_ARGS(db, zio))
+/* END CSTYLED */
 DEFINE_DBUF_EVENT(zfs_blocked__read);
 
+/* BEGIN CSTYLED */
 DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class,
        TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls),
        TP_ARGS(db, mls),
@@ -99,11 +104,14 @@ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class,
        TP_fast_assign(DBUF_TP_FAST_ASSIGN),
        TP_printk(DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS)
 );
+/* END CSTYLED */
 
 #define        DEFINE_DBUF_EVICT_ONE_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_dbuf_evict_one_class, name, \
        TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
        TP_ARGS(db, mls))
+/* END CSTYLED */
 DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one);
 
 #endif /* _TRACE_DBUF_H */
index 0f2f49921a0ee000d03557f953a835d3f3e72cd0..844746a9c41e3f0c1c224fd6f899d47ef2f108c7 100644 (file)
@@ -105,9 +105,11 @@ DECLARE_EVENT_CLASS(zfs_delay_mintime_class,
 /* END CSTYLED */
 
 #define        DEFINE_DELAY_MINTIME_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_delay_mintime_class, name, \
        TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
        TP_ARGS(tx, dirty, min_tx_time))
+/* END CSTYLED */
 DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime);
 
 #endif /* _TRACE_DMU_H */
index 292f8e2b7b3bba873afb93f9d7733dee33f14475..a651a56cf2eb5210c2da3dcba13f2d9cea857600 100644 (file)
@@ -105,9 +105,11 @@ DECLARE_EVENT_CLASS(zfs_dnode_move_class,
 /* END CSTYLED */
 
 #define        DEFINE_DNODE_MOVE_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_dnode_move_class, name, \
        TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
        TP_ARGS(dn, refcount, dbufs))
+/* END CSTYLED */
 DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move);
 
 #endif /* _TRACE_DNODE_H */
index 816ba5b0a83146515e4124320bf4499c023f7753..7cf4dc39d6262cfaf984759a7bb529b3b238dd42 100644 (file)
@@ -63,9 +63,11 @@ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class,
 /* END CSTYLED */
 
 #define        DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \
        TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
        TP_ARGS(ml, sublist_idx, obj))
+/* END CSTYLED */
 DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__insert);
 DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__remove);
 
index a408761f9367c6848af40be4e6f02670477136e8..6c414bfce7a08992c798f46da7727b8ba8a0f820 100644 (file)
@@ -55,9 +55,11 @@ DECLARE_EVENT_CLASS(zfs_txg_class,
 /* END CSTYLED */
 
 #define        DEFINE_TXG_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_txg_class, name, \
        TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
        TP_ARGS(dp, txg))
+/* END CSTYLED */
 DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done);
 DEFINE_TXG_EVENT(zfs_txg__quiescing);
 DEFINE_TXG_EVENT(zfs_txg__opened);
index 389037c21c4448f726f42c72bae7b3e0c3e05a82..fbceee643e0fea888792f89f4e82d99c15f730c0 100644 (file)
@@ -114,11 +114,13 @@ DECLARE_EVENT_CLASS(zfs_zil_class,
 /* END CSTYLED */
 
 #define        DEFINE_ZIL_EVENT(name) \
+/* BEGIN CSTYLED */
 DEFINE_EVENT(zfs_zil_class, name, \
        TP_PROTO(zilog_t *zilog), \
        TP_ARGS(zilog))
 DEFINE_ZIL_EVENT(zfs_zil__cw1);
 DEFINE_ZIL_EVENT(zfs_zil__cw2);
+/* END CSTYLED */
 
 #endif /* _TRACE_ZIL_H */
 
index b852cb6170b15ae9b3eb3632c61c8452729062a5..7e24dd8445d4a245c48eff5b537b41bd2acc561e 100644 (file)
@@ -475,7 +475,8 @@ NVLIST_PRINTCTL_AREPLACE(nvlist_array, nvlist_t **)
  */
 
 
-static const struct nvlist_printops defprtops = {
+static const struct nvlist_printops defprtops =
+{
        { nvprint_boolean, NULL },
        { nvprint_boolean_value, NULL },
        { nvprint_byte, NULL },
index 41fe8bb6cb2601ae8deeeca08cc8e1a909677ee8..aa565ca828622f6cc207288aee60cb9bf2f99c1e 100644 (file)
@@ -108,7 +108,8 @@ libshare_init(void)
 }
 
 static void
-parse_sharetab(sa_handle_impl_t impl_handle) {
+parse_sharetab(sa_handle_impl_t impl_handle)
+{
        FILE *fp;
        char line[512];
        char *eol, *pathname, *resource, *fstype, *options, *description;
@@ -759,7 +760,8 @@ alloc_share(const char *sharepath)
 }
 
 static void
-free_share(sa_share_impl_t impl_share) {
+free_share(sa_share_impl_t impl_share)
+{
        sa_fstype_t *fstype;
 
        fstype = fstypes;
index 7ef1c42959f80f161f46e458be3163a561bfc9ab..72d40b1643a8b7d706a33deb8124bc8ea87f99ed 100644 (file)
@@ -130,22 +130,26 @@ extern    in_port_t ntohs(in_port_t);
 
 #ifdef _BIG_ENDIAN
 static __inline__ uint64_t
-htonll(uint64_t n) {
+htonll(uint64_t n)
+{
        return (n);
 }
 
 static __inline__ uint64_t
-ntohll(uint64_t n) {
+ntohll(uint64_t n)
+{
        return (n);
 }
 #else
 static __inline__ uint64_t
-htonll(uint64_t n) {
+htonll(uint64_t n)
+{
        return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32));
 }
 
 static __inline__ uint64_t
-ntohll(uint64_t n) {
+ntohll(uint64_t n)
+{
        return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32));
 }
 #endif
index a89cb4950db2133c6c72d04613d73e7d6739eb2f..c63026ceed1a8a7f272ee3271a447e5a64750f95 100644 (file)
@@ -131,7 +131,8 @@ umem_free(void *ptr, size_t size)
 }
 
 static inline void
-umem_nofail_callback(umem_nofail_callback_t *cb) {}
+umem_nofail_callback(umem_nofail_callback_t *cb)
+{}
 
 static inline umem_cache_t *
 umem_cache_create(
index 791d509819ea7cbf8233e3ae1def7ce05316c6b7..ae67906fe008ffee50f809324ddcfd8094db1033 100644 (file)
@@ -246,7 +246,7 @@ taskq_thread(void *arg)
 /*ARGSUSED*/
 taskq_t *
 taskq_create(const char *name, int nthreads, pri_t pri,
-       int minalloc, int maxalloc, uint_t flags)
+    int minalloc, int maxalloc, uint_t flags)
 {
        taskq_t *tq = kmem_zalloc(sizeof (taskq_t), KM_SLEEP);
        int t;
index a68a02cdfddd911482d76efb93ad1dd9485bf889..8592386ddbe76a09f6567f0767d314b7f153a99f 100644 (file)
@@ -988,7 +988,8 @@ aes_setupkeys(aes_key_t *key, const uint32_t *keyarr32, int keybits)
  */
 static void
 rijndael_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
-    uint32_t ct[4], int flags) {
+    uint32_t ct[4], int flags)
+{
        if (flags & INTEL_AES_NI_CAPABLE) {
                KPREEMPT_DISABLE;
                aes_encrypt_intel(rk, Nr, pt, ct);
@@ -1015,7 +1016,8 @@ rijndael_encrypt(const uint32_t rk[], int Nr, const uint32_t pt[4],
  */
 static void
 rijndael_decrypt(const uint32_t rk[], int Nr, const uint32_t ct[4],
-    uint32_t pt[4], int flags) {
+    uint32_t pt[4], int flags)
+{
        if (flags & INTEL_AES_NI_CAPABLE) {
                KPREEMPT_DISABLE;
                aes_decrypt_intel(rk, Nr, ct, pt);
index 77ba28dddfc093d233668fb7d6e9a186033b8445..e3b0e123823264edb53661cc4326bdaa9b14be93 100644 (file)
@@ -198,7 +198,7 @@ ctr_mode_final(ctr_ctx_t *ctx, crypto_data_t *out,
 
 int
 ctr_init_ctx(ctr_ctx_t *ctr_ctx, ulong_t count, uint8_t *cb,
-void (*copy_block)(uint8_t *, uint8_t *))
+    void (*copy_block)(uint8_t *, uint8_t *))
 {
        uint64_t upper_mask = 0;
        uint64_t lower_mask = 0;
index d2e81196389e6d620fa60a085f2140d97103902c..6d85cb7d9e98da706695dc900d6100a563e7567e 100644 (file)
 
 /* Skein_256 */
 #if    !(SKEIN_USE_ASM & 256)
-
 void
 Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
     size_t blkCnt, size_t byteCntAdd)
-{                              /* do it in C */
+{
        enum {
                WCNT = SKEIN_256_STATE_WORDS
        };
@@ -132,24 +131,24 @@ Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
                /* run the rounds */
 
 #define        Round256(p0, p1, p2, p3, ROT, rNum)                          \
-    X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
-    X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
+       X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
+       X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
 
 #if    SKEIN_UNROLL_256 == 0
 #define        R256(p0, p1, p2, p3, ROT, rNum)         /* fully unrolled */    \
-    Round256(p0, p1, p2, p3, ROT, rNum)                                        \
-    Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rNum, Xptr);
+       Round256(p0, p1, p2, p3, ROT, rNum)             \
+       Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rNum, Xptr);
 
 #define        I256(R)                                                         \
-    X0 += ks[((R) + 1) % 5];   /* inject the key schedule value */     \
-    X1 += ks[((R) + 2) % 5] + ts[((R) + 1) % 3];                       \
-    X2 += ks[((R) + 3) % 5] + ts[((R) + 2) % 3];                       \
-    X3 += ks[((R) + 4) % 5] + (R) + 1;                                 \
-    Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr);
+       X0 += ks[((R) + 1) % 5]; /* inject the key schedule value */ \
+       X1 += ks[((R) + 2) % 5] + ts[((R) + 1) % 3];                    \
+       X2 += ks[((R) + 3) % 5] + ts[((R) + 2) % 3];                    \
+       X3 += ks[((R) + 4) % 5] + (R) + 1;                      \
+       Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr);
 #else                          /* looping version */
 #define        R256(p0, p1, p2, p3, ROT, rNum)                             \
-    Round256(p0, p1, p2, p3, ROT, rNum)                             \
-    Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rNum, Xptr);
+       Round256(p0, p1, p2, p3, ROT, rNum)                             \
+       Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rNum, Xptr);
 
 #define        I256(R)                                                         \
        X0 += ks[r + (R) + 0];  /* inject the key schedule value */     \
@@ -157,8 +156,8 @@ Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
        X2 += ks[r + (R) + 2] + ts[r + (R) + 1];                        \
        X3 += ks[r + (R) + 3] + r + (R);                                \
        ks[r + (R) + 4] = ks[r + (R) - 1];   /* rotate key schedule */  \
-    ts[r + (R) + 2] = ts[r + (R) - 1];                                 \
-    Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr);
+       ts[r + (R) + 2] = ts[r + (R) - 1];                      \
+       Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr);
 
                /* loop thru it */
                for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_256)
@@ -239,8 +238,7 @@ Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
                Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
                ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-       }
-       while (--blkCnt);
+       } while (--blkCnt);
        ctx->h.T[0] = ts[0];
        ctx->h.T[1] = ts[1];
 }
@@ -266,7 +264,7 @@ Skein_256_Unroll_Cnt(void)
 void
 Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
     size_t blkCnt, size_t byteCntAdd)
-{                              /* do it in C */
+{
        enum {
                WCNT = SKEIN_512_STATE_WORDS
        };
@@ -470,8 +468,7 @@ Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
                Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
                ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-       }
-       while (--blkCnt);
+       } while (--blkCnt);
        ctx->h.T[0] = ts[0];
        ctx->h.T[1] = ts[1];
 }
index 96767fbea06a22c1b5cb4ed15bfe179e1812bbb5..c3d1f2990874bdf5dc57a0b2edf58b17aaabba63 100644 (file)
@@ -212,7 +212,7 @@ aes_encrypt_key256(const unsigned char *key, uint32_t rk[])
  */
 int
 rijndael_key_setup_enc_amd64(uint32_t rk[], const uint32_t cipherKey[],
-       int keyBits)
+    int keyBits)
 {
        switch (keyBits) {
        case 128:
@@ -560,7 +560,7 @@ aes_decrypt_key256(const unsigned char *key, uint32_t rk[])
  */
 int
 rijndael_key_setup_dec_amd64(uint32_t rk[], const uint32_t cipherKey[],
-       int keyBits)
+    int keyBits)
 {
        switch (keyBits) {
        case 128:
index 7fd66be3e063261782e9d13d0c7b8b187d5c766b..12d57ed79eeeb288a7ff86c972f9cab339e02506 100644 (file)
@@ -321,14 +321,16 @@ aes_provider_status(crypto_provider_handle_t provider, uint_t *status)
 static int
 aes_encrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism,
     crypto_key_t *key, crypto_spi_ctx_template_t template,
-    crypto_req_handle_t req) {
+    crypto_req_handle_t req)
+{
        return (aes_common_init(ctx, mechanism, key, template, req, B_TRUE));
 }
 
 static int
 aes_decrypt_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism,
     crypto_key_t *key, crypto_spi_ctx_template_t template,
-    crypto_req_handle_t req) {
+    crypto_req_handle_t req)
+{
        return (aes_common_init(ctx, mechanism, key, template, req, B_FALSE));
 }
 
index 19b5c963d805ce59a556d1c267519d13830cbd9a..cb748a954e254874f23db7ca60524e77b1117ef9 100644 (file)
@@ -57,6 +57,7 @@ edonr_mod_init(void)
 }
 
 int
-edonr_mod_fini(void) {
+edonr_mod_fini(void)
+{
        return (mod_remove(&modlinkage));
 }
index 705b1e819078d2e71444ce971e77231d78e3e5d9..6db31c3559ac9658c077229741e6cb40aa0a33c5 100644 (file)
@@ -230,7 +230,8 @@ skein_mod_init(void)
 }
 
 int
-skein_mod_fini(void) {
+skein_mod_fini(void)
+{
        int ret;
 
        if (skein_prov_handle != 0) {
index 74253c50d9b058d72511800403a8875f9fad71e8..0330032fa0ef2fcaf5b5a33c0711486ba9f3db10 100644 (file)
@@ -567,7 +567,7 @@ do_case_conv(int uv, uchar_t *u8s, uchar_t *s, int sz, boolean_t is_it_toupper)
  */
 static int
 do_case_compare(size_t uv, uchar_t *s1, uchar_t *s2, size_t n1,
-       size_t n2, boolean_t is_it_toupper, int *errnum)
+    size_t n2, boolean_t is_it_toupper, int *errnum)
 {
        int f;
        int sz1;
@@ -745,7 +745,7 @@ combining_class(size_t uv, uchar_t *s, size_t sz)
  */
 static size_t
 do_decomp(size_t uv, uchar_t *u8s, uchar_t *s, int sz,
-       boolean_t canonical_decomposition, u8_normalization_states_t *state)
+    boolean_t canonical_decomposition, u8_normalization_states_t *state)
 {
        uint16_t b1 = 0;
        uint16_t b2 = 0;
@@ -1057,7 +1057,7 @@ blocked(uchar_t *comb_class, size_t last)
  */
 static size_t
 do_composition(size_t uv, uchar_t *s, uchar_t *comb_class, uchar_t *start,
-       uchar_t *disp, size_t last, uchar_t **os, uchar_t *oslast)
+    uchar_t *disp, size_t last, uchar_t **os, uchar_t *oslast)
 {
        uchar_t t[U8_STREAM_SAFE_TEXT_MAX + 1];
        uchar_t tc[U8_MB_CUR_MAX] = { '\0' };
@@ -1379,12 +1379,10 @@ SAFE_RETURN:
  */
 static size_t
 collect_a_seq(size_t uv, uchar_t *u8s, uchar_t **source, uchar_t *slast,
-       boolean_t is_it_toupper,
-       boolean_t is_it_tolower,
-       boolean_t canonical_decomposition,
-       boolean_t compatibility_decomposition,
-       boolean_t canonical_composition,
-       int *errnum, u8_normalization_states_t *state)
+    boolean_t is_it_toupper, boolean_t is_it_tolower,
+    boolean_t canonical_decomposition, boolean_t compatibility_decomposition,
+    boolean_t canonical_composition,
+    int *errnum, u8_normalization_states_t *state)
 {
        uchar_t *s;
        int sz;
@@ -1727,7 +1725,7 @@ TURN_STREAM_SAFE:
  */
 static int
 do_norm_compare(size_t uv, uchar_t *s1, uchar_t *s2, size_t n1, size_t n2,
-       int flag, int *errnum)
+    int flag, int *errnum)
 {
        int result;
        size_t sz1;
@@ -1843,7 +1841,7 @@ do_norm_compare(size_t uv, uchar_t *s1, uchar_t *s2, size_t n1, size_t n2,
  */
 int
 u8_strcmp(const char *s1, const char *s2, size_t n, int flag, size_t uv,
-               int *errnum)
+    int *errnum)
 {
        int f;
        size_t n1;
@@ -1913,7 +1911,7 @@ u8_strcmp(const char *s1, const char *s2, size_t n, int flag, size_t uv,
 
 size_t
 u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
-       int flag, size_t unicode_version, int *errnum)
+    int flag, size_t unicode_version, int *errnum)
 {
        int f;
        int sz;
@@ -2134,7 +2132,8 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
 
 #if defined(_KERNEL) && defined(HAVE_SPL)
 static int __init
-unicode_init(void) {
+unicode_init(void)
+{
        return (0);
 }
 
index df8f80ee4de76a76b83a8cc7b52e30924869eea1..90b7d7d4ef722f1c0fa63f85fe573e7d9b9db1b0 100644 (file)
 #include <strings.h>
 
 static void
-fletcher_4_sse2_init(fletcher_4_ctx_t *ctx) {
+fletcher_4_sse2_init(fletcher_4_ctx_t *ctx)
+{
        bzero(ctx->sse, 4 * sizeof (zfs_fletcher_sse_t));
 }
 
 static void
-fletcher_4_sse2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) {
+fletcher_4_sse2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp)
+{
        uint64_t A, B, C, D;
 
        /*
index dca70d6f2bca0e717b583c4a5137a1f30e5c9965..6ff266bd6ef873816caac932931193e6bd2094a4 100644 (file)
@@ -423,7 +423,8 @@ struct scatterlist {
 };
 
 static void
-sg_init_table(struct scatterlist *sg, int nr) {
+sg_init_table(struct scatterlist *sg, int nr)
+{
        memset(sg, 0, nr * sizeof (struct scatterlist));
        sg[nr - 1].end = 1;
 }
@@ -1315,8 +1316,8 @@ abd_cmp(abd_t *dabd, abd_t *sabd)
  */
 void
 abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd,
-       ssize_t csize, ssize_t dsize, const unsigned parity,
-       void (*func_raidz_gen)(void **, const void *, size_t, size_t))
+    ssize_t csize, ssize_t dsize, const unsigned parity,
+    void (*func_raidz_gen)(void **, const void *, size_t, size_t))
 {
        int i;
        ssize_t len, dlen;
@@ -1407,10 +1408,10 @@ abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd,
  */
 void
 abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds,
-       ssize_t tsize, const unsigned parity,
-       void (*func_raidz_rec)(void **t, const size_t tsize, void **c,
-       const unsigned *mul),
-       const unsigned *mul)
+    ssize_t tsize, const unsigned parity,
+    void (*func_raidz_rec)(void **t, const size_t tsize, void **c,
+    const unsigned *mul),
+    const unsigned *mul)
 {
        int i;
        ssize_t len;
@@ -1497,7 +1498,7 @@ abd_nr_pages_off(abd_t *abd, unsigned int size, size_t off)
  */
 unsigned int
 abd_scatter_bio_map_off(struct bio *bio, abd_t *abd,
-                       unsigned int io_size, size_t off)
+    unsigned int io_size, size_t off)
 {
        int i;
        struct abd_iter aiter;
index 2ce8cf628f1d7333fab1500e8c6a6d7a0ca8d620..351e50e404a329146053b8c65477d3d44deaf772 100644 (file)
@@ -4336,7 +4336,8 @@ arc_reclaim_thread(void)
  *         increase this negative difference.
  */
 static uint64_t
-arc_evictable_memory(void) {
+arc_evictable_memory(void)
+{
        uint64_t arc_clean =
            refcount_count(&arc_mru->arcs_esize[ARC_BUFC_DATA]) +
            refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA]) +
index b7dfb858721a416173004b339ff471b61db9a005..ca1a443032c8f7779b5d3138afdf398779112296 100644 (file)
@@ -2787,8 +2787,8 @@ dbuf_hold_impl(dnode_t *dn, uint8_t level, uint64_t blkid,
 static void
 __dbuf_hold_impl_init(struct dbuf_hold_impl_data *dh,
     dnode_t *dn, uint8_t level, uint64_t blkid,
-       boolean_t fail_sparse, boolean_t fail_uncached,
-       void *tag, dmu_buf_impl_t **dbp, int depth)
+    boolean_t fail_sparse, boolean_t fail_uncached,
+    void *tag, dmu_buf_impl_t **dbp, int depth)
 {
        dh->dh_dn = dn;
        dh->dh_level = level;
index fec02eb8b61d5da76ebb7c1052621644a53ff0c2..30c3b2cd07f714021732f6fa5ec9b3cf1c7c20c3 100644 (file)
@@ -1745,7 +1745,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd)
 
 int
 dmu_object_set_blocksize(objset_t *os, uint64_t object, uint64_t size, int ibs,
-       dmu_tx_t *tx)
+    dmu_tx_t *tx)
 {
        dnode_t *dn;
        int err;
@@ -1760,7 +1760,7 @@ dmu_object_set_blocksize(objset_t *os, uint64_t object, uint64_t size, int ibs,
 
 void
 dmu_object_set_checksum(objset_t *os, uint64_t object, uint8_t checksum,
-       dmu_tx_t *tx)
+    dmu_tx_t *tx)
 {
        dnode_t *dn;
 
@@ -1780,7 +1780,7 @@ dmu_object_set_checksum(objset_t *os, uint64_t object, uint8_t checksum,
 
 void
 dmu_object_set_compress(objset_t *os, uint64_t object, uint8_t compress,
-       dmu_tx_t *tx)
+    dmu_tx_t *tx)
 {
        dnode_t *dn;
 
index d73993428e8134896590c0e0c608d6fb0d026e05..e31f6e3c04a678195f81e8d1b8ad6c981960ed41 100644 (file)
@@ -2090,7 +2090,7 @@ save_resume_state(struct receive_writer_arg *rwa,
 
 noinline static int
 receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
-       void *data)
+    void *data)
 {
        dmu_object_info_t doi;
        dmu_tx_t *tx;
@@ -2226,7 +2226,7 @@ receive_freeobjects(struct receive_writer_arg *rwa,
 
 noinline static int
 receive_write(struct receive_writer_arg *rwa, struct drr_write *drrw,
-       arc_buf_t *abuf)
+    arc_buf_t *abuf)
 {
        dmu_tx_t *tx;
        dmu_buf_t *bonus;
index 5b1de29e4a6ef4dd86fc99ad5d32b6b1ed14982b..03e8f748b746878a05b0919ff56008c0ae2e9193 100644 (file)
@@ -82,7 +82,7 @@ secpolicy_sys_config(const cred_t *cr, boolean_t checkonly)
  */
 int
 secpolicy_vnode_access2(const cred_t *cr, struct inode *ip, uid_t owner,
-       mode_t curmode, mode_t wantmode)
+    mode_t curmode, mode_t wantmode)
 {
        return (0);
 }
index 84c19c7ca0f02be21ca8f72894e8e0031f50388b..fa9bdd7b8e10dc8b8e815cbbfde45e88f8fad626 100644 (file)
@@ -1612,7 +1612,8 @@ spa_get_asize(spa_t *spa, uint64_t lsize)
  * See the comment above spa_slop_shift for details.
  */
 uint64_t
-spa_get_slop_space(spa_t *spa) {
+spa_get_slop_space(spa_t *spa)
+{
        uint64_t space = spa_get_dspace(spa);
        return (MAX(space >> spa_slop_shift, SPA_MINDEVSIZE >> 1));
 }
index 77bfef3a0a9bdca64754b9bdfd7c0ada11d6db93..c8f896276aa6323cb15ec011a3bb58530772e7ee 100644 (file)
@@ -3676,9 +3676,10 @@ EXPORT_SYMBOL(vdev_degrade);
 EXPORT_SYMBOL(vdev_online);
 EXPORT_SYMBOL(vdev_offline);
 EXPORT_SYMBOL(vdev_clear);
-
+/* BEGIN CSTYLED */
 module_param(metaslabs_per_vdev, int, 0644);
 MODULE_PARM_DESC(metaslabs_per_vdev,
        "Divide added vdev into approximately (but no more than) this number "
        "of metaslabs");
+/* END CSTYLED */
 #endif
index dc2a346426ca4375e48cfba383fa9e34e462735a..256431e6b334974924edec9a86057bf8c4278671 100644 (file)
@@ -646,6 +646,7 @@ vdev_ops_t vdev_spare_ops = {
 };
 
 #if defined(_KERNEL) && defined(HAVE_SPL)
+/* BEGIN CSTYLED */
 module_param(zfs_vdev_mirror_rotating_inc, int, 0644);
 MODULE_PARM_DESC(zfs_vdev_mirror_rotating_inc,
        "Rotating media load increment for non-seeking I/O's");
@@ -655,6 +656,7 @@ MODULE_PARM_DESC(zfs_vdev_mirror_rotating_seek_inc,
        "Rotating media load increment for seeking I/O's");
 
 module_param(zfs_vdev_mirror_rotating_seek_offset, int, 0644);
+
 MODULE_PARM_DESC(zfs_vdev_mirror_rotating_seek_offset,
        "Offset in bytes from the last I/O which "
        "triggers a reduced rotating media seek increment");
@@ -666,5 +668,5 @@ MODULE_PARM_DESC(zfs_vdev_mirror_non_rotating_inc,
 module_param(zfs_vdev_mirror_non_rotating_seek_inc, int, 0644);
 MODULE_PARM_DESC(zfs_vdev_mirror_non_rotating_seek_inc,
        "Non-rotating media load increment for seeking I/O's");
-
+/* END CSTYLED */
 #endif
index a175bcf770d9e095da74077cb5837f29b4ae1cb7..a64e3b023574dea667f96fdf2a2ef74a370680f9 100644 (file)
@@ -177,7 +177,7 @@ vdev_raidz_math_generate(raidz_map_t *rm)
 
 static raidz_rec_f
 reconstruct_fun_p_sel(raidz_map_t *rm, const int *parity_valid,
-       const int nbaddata)
+    const int nbaddata)
 {
        if (nbaddata == 1 && parity_valid[CODE_P]) {
                return (rm->rm_ops->rec[RAIDZ_REC_P]);
@@ -187,7 +187,7 @@ reconstruct_fun_p_sel(raidz_map_t *rm, const int *parity_valid,
 
 static raidz_rec_f
 reconstruct_fun_pq_sel(raidz_map_t *rm, const int *parity_valid,
-       const int nbaddata)
+    const int nbaddata)
 {
        if (nbaddata == 1) {
                if (parity_valid[CODE_P]) {
@@ -204,7 +204,7 @@ reconstruct_fun_pq_sel(raidz_map_t *rm, const int *parity_valid,
 
 static raidz_rec_f
 reconstruct_fun_pqr_sel(raidz_map_t *rm, const int *parity_valid,
-       const int nbaddata)
+    const int nbaddata)
 {
        if (nbaddata == 1) {
                if (parity_valid[CODE_P]) {
@@ -238,7 +238,7 @@ reconstruct_fun_pqr_sel(raidz_map_t *rm, const int *parity_valid,
  */
 int
 vdev_raidz_math_reconstruct(raidz_map_t *rm, const int *parity_valid,
-       const int *dt, const int nbaddata)
+    const int *dt, const int nbaddata)
 {
        raidz_rec_f rec_fn = NULL;
 
@@ -647,6 +647,6 @@ zfs_vdev_raidz_impl_get(char *buffer, zfs_kernel_param_t *kp)
 }
 
 module_param_call(zfs_vdev_raidz_impl, zfs_vdev_raidz_impl_set,
-       zfs_vdev_raidz_impl_get, NULL, 0644);
+    zfs_vdev_raidz_impl_get, NULL, 0644);
 MODULE_PARM_DESC(zfs_vdev_raidz_impl, "Select raidz implementation.");
 #endif
index c7b8afd38893fc038dc0c69c96ac8b95a9df772b..e3ad06776503415f4f74265180a257d89eb7038a 100644 (file)
@@ -223,7 +223,7 @@ const raidz_impl_ops_t vdev_raidz_aarch64_neon_impl = {
 
 
 #if defined(__aarch64__)
-
+/* BEGIN CSTYLED */
 const uint8_t
 __attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] = {
        { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2275,5 +2275,5 @@ __attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] = {
        { 0x00, 0xff, 0xfe, 0x01, 0xfc, 0x03, 0x02, 0xfd,
            0xf8, 0x07, 0x06, 0xf9, 0x04, 0xfb, 0xfa, 0x05  }
 };
-
+/* END CSTYLED */
 #endif /* defined(__aarch64__) */
index 0a40677b612d2475342b176f3c9df05d49a0d6c1..ea592c0f12da69ae97cbdd750d1d0af0adbcd848 100644 (file)
@@ -387,7 +387,7 @@ raidz_generate_p_impl(raidz_map_t * const rm)
  */
 static void
 raidz_gen_pq_add(void **c, const void *dc, const size_t csize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *p = (v_t *)c[0];
        v_t *q = (v_t *)c[1];
@@ -457,7 +457,7 @@ raidz_generate_pq_impl(raidz_map_t * const rm)
  */
 static void
 raidz_gen_pqr_add(void **c, const void *dc, const size_t csize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *p = (v_t *)c[0];
        v_t *q = (v_t *)c[1];
@@ -626,7 +626,7 @@ raidz_reconstruct_p_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_q_abd(void **xc, const void *dc, const size_t xsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)xc[TARGET_X];
        const v_t *d = (v_t *)dc;
@@ -717,7 +717,7 @@ raidz_reconstruct_q_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_r_abd(void **xc, const void *dc, const size_t tsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)xc[TARGET_X];
        const v_t *d = (v_t *)dc;
@@ -809,7 +809,7 @@ raidz_reconstruct_r_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_pq_abd(void **tc, const void *dc, const size_t tsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)tc[TARGET_X];
        v_t *y = (v_t *)tc[TARGET_Y];
@@ -841,7 +841,7 @@ raidz_syn_pq_abd(void **tc, const void *dc, const size_t tsize,
  */
 static void
 raidz_rec_pq_abd(void **tc, const size_t tsize, void **c,
-       const unsigned *mul)
+    const unsigned *mul)
 {
        v_t *x = (v_t *)tc[TARGET_X];
        v_t *y = (v_t *)tc[TARGET_Y];
@@ -967,7 +967,7 @@ raidz_reconstruct_pq_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_pr_abd(void **c, const void *dc, const size_t tsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)c[TARGET_X];
        v_t *y = (v_t *)c[TARGET_Y];
@@ -999,7 +999,7 @@ raidz_syn_pr_abd(void **c, const void *dc, const size_t tsize,
  */
 static void
 raidz_rec_pr_abd(void **t, const size_t tsize, void **c,
-       const unsigned *mul)
+    const unsigned *mul)
 {
        v_t *x = (v_t *)t[TARGET_X];
        v_t *y = (v_t *)t[TARGET_Y];
@@ -1125,7 +1125,7 @@ raidz_reconstruct_pr_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_qr_abd(void **c, const void *dc, const size_t tsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)c[TARGET_X];
        v_t *y = (v_t *)c[TARGET_Y];
@@ -1159,7 +1159,7 @@ raidz_syn_qr_abd(void **c, const void *dc, const size_t tsize,
  */
 static void
 raidz_rec_qr_abd(void **t, const size_t tsize, void **c,
-       const unsigned *mul)
+    const unsigned *mul)
 {
        v_t *x = (v_t *)t[TARGET_X];
        v_t *y = (v_t *)t[TARGET_Y];
@@ -1289,7 +1289,7 @@ raidz_reconstruct_qr_impl(raidz_map_t *rm, const int *tgtidx)
  */
 static void
 raidz_syn_pqr_abd(void **c, const void *dc, const size_t tsize,
-       const size_t dsize)
+    const size_t dsize)
 {
        v_t *x = (v_t *)c[TARGET_X];
        v_t *y = (v_t *)c[TARGET_Y];
@@ -1326,7 +1326,7 @@ raidz_syn_pqr_abd(void **c, const void *dc, const size_t tsize,
  */
 static void
 raidz_rec_pqr_abd(void **t, const size_t tsize, void **c,
-       const unsigned * const mul)
+    const unsigned * const mul)
 {
        v_t *x = (v_t *)t[TARGET_X];
        v_t *y = (v_t *)t[TARGET_Y];
index cebb0fe2b15da9563059d935d02d3467507add9f..a015baab2d83114da6ec4029a43b1ffcdc37e94c 100644 (file)
@@ -417,9 +417,10 @@ const raidz_impl_ops_t vdev_raidz_ssse3_impl = {
 
 #if defined(__x86_64)
 #if defined(HAVE_SSSE3) || defined(HAVE_AVX2) || defined(HAVE_AVX512BW)
-
+/* BEGIN CSTYLED */
 const uint8_t
-__attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] = {
+__attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] =
+{
        { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  },
        { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2469,6 +2470,6 @@ __attribute__((aligned(256))) gf_clmul_mod_lt[4*256][16] = {
        { 0x00, 0xff, 0xfe, 0x01, 0xfc, 0x03, 0x02, 0xfd,
            0xf8, 0x07, 0x06, 0xf9, 0x04, 0xfb, 0xfa, 0x05  }
 };
-
+/* END CSTYLED */
 #endif /* defined(HAVE_SSSE3) || defined(HAVE_AVX2) || defined(HAVE_AVX512BW) */
 #endif /* defined(__x86_64) */
index d0e2f7ee0409cf03be1733596d48f118e0248671..e340462fb91a4c903eabf60d968510cd53c68825 100644 (file)
@@ -958,7 +958,7 @@ out:
  */
 int
 zfsctl_snapdir_mkdir(struct inode *dip, char *dirname, vattr_t *vap,
-       struct inode **ipp, cred_t *cr, int flags)
+    struct inode **ipp, cred_t *cr, int flags)
 {
        zfs_sb_t *zsb = ITOZSB(dip);
        char *dsname;
index 36b90596971c27d921f559200e7601c8aed17e41..b4f9b0b5031294ced8ba9af66b2bef288232b696 100644 (file)
@@ -1043,8 +1043,8 @@ zio_write_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size,
  */
 zio_t *
 zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset,
-       abd_t *data, uint64_t size, int type, zio_priority_t priority,
-       enum zio_flag flags, zio_done_func_t *done, void *private)
+    abd_t *data, uint64_t size, int type, zio_priority_t priority,
+    enum zio_flag flags, zio_done_func_t *done, void *private)
 {
        enum zio_stage pipeline = ZIO_VDEV_CHILD_PIPELINE;
        zio_t *zio;
index 37116f049748caeb74f264949e41e50f030d2ec6..53658daca8e91c8dd0f106344c5cc5de14bd23be 100644 (file)
@@ -94,7 +94,7 @@
 /*ARGSUSED*/
 static void
 abd_checksum_off(abd_t *abd, uint64_t size,
-       const void *ctx_template, zio_cksum_t *zcp)
+    const void *ctx_template, zio_cksum_t *zcp)
 {
        ZIO_SET_CHECKSUM(zcp, 0, 0, 0, 0);
 }
index 332fb992e7a2bfc25832b68ca85140dcd7122507..356fa78f83afd4728cdecfa54e32e4ace47f2a5c 100644 (file)
@@ -559,7 +559,7 @@ zpl_readpage(struct file *filp, struct page *pp)
  */
 static int
 zpl_readpages(struct file *filp, struct address_space *mapping,
-       struct list_head *pages, unsigned nr_pages)
+    struct list_head *pages, unsigned nr_pages)
 {
        return (read_cache_pages(mapping, pages,
            (filler_t *)zpl_readpage, filp));
index aad110b1bc067d783552fb9979c01fe2d822f9c6..e5cd47afd8cb2fd1fe45bfce5c1b2af5714a2f06 100644 (file)
@@ -1934,7 +1934,8 @@ typedef struct zvol_snapdev_cb_arg {
 } zvol_snapdev_cb_arg_t;
 
 static int
-zvol_set_snapdev_cb(const char *dsname, void *param) {
+zvol_set_snapdev_cb(const char *dsname, void *param)
+{
        zvol_snapdev_cb_arg_t *arg = param;
 
        if (strchr(dsname, '@') == NULL)
index 297d35bba949f83df610830bbdf4953e50c749c3..c70c0d6f1c9e402052ae6d617bad9e05db7ab6e0 100644 (file)
@@ -328,7 +328,7 @@ zpios_setup_run(run_args_t **run_args, zpios_cmd_t *kcmd, struct file *file)
 
 static int
 zpios_get_work_item(run_args_t *run_args, dmu_obj_t *obj, __u64 *offset,
-                   __u32 *chunk_size, zpios_region_t **region, __u32 flags)
+    __u32 *chunk_size, zpios_region_t **region, __u32 flags)
 {
        int i, j, count = 0;
        unsigned int random_int;
@@ -476,7 +476,7 @@ zpios_cleanup_run(run_args_t *run_args)
 
 static int
 zpios_dmu_write(run_args_t *run_args, objset_t *os, uint64_t object,
-               uint64_t offset, uint64_t size, const void *buf)
+    uint64_t offset, uint64_t size, const void *buf)
 {
        struct dmu_tx *tx;
        int rc, how = TXG_WAIT;
index c8921fb69d77c86b89e7a2bbb952854e012b7bc9..a93cce7f18cfef90153732eefcb619c07bacab7d 100644 (file)
@@ -98,31 +98,32 @@ static char script[PATH_MAX] = "/bin/true";
 static char xattrbytes[XATTR_SIZE_MAX];
 
 static int
-usage(int argc, char **argv) {
+usage(int argc, char **argv)
+{
        fprintf(stderr,
-       "usage: %s [-hvycdrRk] [-n <nth>] [-f <files>] [-x <xattrs>]\n"
-       "       [-s <bytes>] [-p <path>] [-t <script> ] [-o <phase>]\n",
-       argv[0]);
+           "usage: %s [-hvycdrRk] [-n <nth>] [-f <files>] [-x <xattrs>]\n"
+           "       [-s <bytes>] [-p <path>] [-t <script> ] [-o <phase>]\n",
+           argv[0]);
 
        fprintf(stderr,
-       "  --help        -h           This help\n"
-       "  --verbose     -v           Increase verbosity\n"
-       "  --verify      -y           Verify xattr contents\n"
-       "  --nth         -n <nth>     Print every nth file\n"
-       "  --files       -f <files>   Set xattrs on N files\n"
-       "  --xattrs      -x <xattrs>  Set N xattrs on each file\n"
-       "  --size        -s <bytes>   Set N bytes per xattr\n"
-       "  --path        -p <path>    Path to files\n"
-       "  --synccaches  -c           Sync caches between phases\n"
-       "  --dropcaches  -d           Drop caches between phases\n"
-       "  --script      -t <script>  Exec script between phases\n"
-       "  --seed        -e <seed>    Random seed value\n"
-       "  --random      -r           Randomly sized xattrs [16-size]\n"
-       "  --randomvalue -R           Random xattr values\n"
-       "  --keep        -k           Don't unlink files\n"
-       "  --only        -o <num>     Only run phase N\n"
-       "                             0=all, 1=create, 2=setxattr,\n"
-       "                             3=getxattr, 4=unlink\n\n");
+           "  --help        -h           This help\n"
+           "  --verbose     -v           Increase verbosity\n"
+           "  --verify      -y           Verify xattr contents\n"
+           "  --nth         -n <nth>     Print every nth file\n"
+           "  --files       -f <files>   Set xattrs on N files\n"
+           "  --xattrs      -x <xattrs>  Set N xattrs on each file\n"
+           "  --size        -s <bytes>   Set N bytes per xattr\n"
+           "  --path        -p <path>    Path to files\n"
+           "  --synccaches  -c           Sync caches between phases\n"
+           "  --dropcaches  -d           Drop caches between phases\n"
+           "  --script      -t <script>  Exec script between phases\n"
+           "  --seed        -e <seed>    Random seed value\n"
+           "  --random      -r           Randomly sized xattrs [16-size]\n"
+           "  --randomvalue -R           Random xattr values\n"
+           "  --keep        -k           Don't unlink files\n"
+           "  --only        -o <num>     Only run phase N\n"
+           "                             0=all, 1=create, 2=setxattr,\n"
+           "                             3=getxattr, 4=unlink\n\n");
 
        return (1);
 }