Use cstyle -cpP in make cstyle check

Enable picky cstyle checks and resolve the new warnings.  The vast
majority of the changes needed were to handle minor issues with
whitespace formatting.  This patch contains no functional changes.

Non-whitespace changes are as follows:

* 8 times ; to { } in for/while loop
* fix missing ; in cmd/zed/agents/zfs_diagnosis.c
* comment (confim -> confirm)
* change endline , to ; in cmd/zpool/zpool_main.c
* a number of /* BEGIN CSTYLED */ /* END CSTYLED */ blocks
* /* CSTYLED */ markers
* change == 0 to !
* ulong to unsigned long in module/zfs/dsl_scan.c
* rearrangement of module_param lines in module/zfs/metaslab.c
* add { } block around statement after for_each_online_node

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Håkan Johansson <f96hajo@chalmers.se>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5465
This commit is contained in:
Brian Behlendorf
2016-12-12 10:46:26 -08:00
committed by GitHub
parent d57f03e40e
commit 02730c333c
96 changed files with 501 additions and 478 deletions
+15 -15
View File
@@ -178,12 +178,12 @@ extern const raidz_impl_ops_t vdev_raidz_aarch64_neonx2_impl;
* @code parity the function produce
* @impl name of the implementation
*/
#define _RAIDZ_GEN_WRAP(code, impl) \
#define _RAIDZ_GEN_WRAP(code, impl) \
static void \
impl ## _gen_ ## code(void *rmp) \
{ \
raidz_map_t *rm = (raidz_map_t *) rmp; \
raidz_generate_## code ## _impl(rm); \
raidz_map_t *rm = (raidz_map_t *)rmp; \
raidz_generate_## code ## _impl(rm); \
}
/*
@@ -192,11 +192,11 @@ impl ## _gen_ ## code(void *rmp) \
* @code parity the function produce
* @impl name of the implementation
*/
#define _RAIDZ_REC_WRAP(code, impl) \
static int \
#define _RAIDZ_REC_WRAP(code, impl) \
static int \
impl ## _rec_ ## code(void *rmp, const int *tgtidx) \
{ \
raidz_map_t *rm = (raidz_map_t *) rmp; \
raidz_map_t *rm = (raidz_map_t *)rmp; \
return (raidz_reconstruct_## code ## _impl(rm, tgtidx)); \
}
@@ -295,7 +295,7 @@ vdev_raidz_exp2(const uint8_t a, const unsigned exp)
if (a == 0)
return (0);
return (vdev_raidz_pow2[(exp + (unsigned) vdev_raidz_log2[a]) % 255]);
return (vdev_raidz_pow2[(exp + (unsigned)vdev_raidz_log2[a]) % 255]);
}
/*
@@ -318,9 +318,9 @@ gf_mul(const gf_t a, const gf_t b)
if (a == 0 || b == 0)
return (0);
logsum = (gf_log_t) vdev_raidz_log2[a] + (gf_log_t) vdev_raidz_log2[b];
logsum = (gf_log_t)vdev_raidz_log2[a] + (gf_log_t)vdev_raidz_log2[b];
return ((gf_t) vdev_raidz_pow2[logsum % 255]);
return ((gf_t)vdev_raidz_pow2[logsum % 255]);
}
static inline gf_t
@@ -332,10 +332,10 @@ gf_div(const gf_t a, const gf_t b)
if (a == 0)
return (0);
logsum = (gf_log_t) 255 + (gf_log_t) vdev_raidz_log2[a] -
(gf_log_t) vdev_raidz_log2[b];
logsum = (gf_log_t)255 + (gf_log_t)vdev_raidz_log2[a] -
(gf_log_t)vdev_raidz_log2[b];
return ((gf_t) vdev_raidz_pow2[logsum % 255]);
return ((gf_t)vdev_raidz_pow2[logsum % 255]);
}
static inline gf_t
@@ -345,9 +345,9 @@ gf_inv(const gf_t a)
ASSERT3U(a, >, 0);
logsum = (gf_log_t) 255 - (gf_log_t) vdev_raidz_log2[a];
logsum = (gf_log_t)255 - (gf_log_t)vdev_raidz_log2[a];
return ((gf_t) vdev_raidz_pow2[logsum]);
return ((gf_t)vdev_raidz_pow2[logsum]);
}
static inline gf_t
@@ -360,7 +360,7 @@ static inline gf_t
gf_exp4(gf_log_t exp)
{
ASSERT3U(exp, <=, 255);
return ((gf_t) vdev_raidz_pow2[(2 * exp) % 255]);
return ((gf_t)vdev_raidz_pow2[(2 * exp) % 255]);
}
#ifdef __cplusplus