aboutsummaryrefslogtreecommitdiffstats
path: root/module/zcommon
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-12-12 10:46:26 -0800
committerGitHub <[email protected]>2016-12-12 10:46:26 -0800
commit02730c333c4fce8c0ead1f7f3404caca5cdb3936 (patch)
treee3943bf33ee177c50004a08d1d4ea4188dbfc542 /module/zcommon
parentd57f03e40ec3bbf109e75b83699b58157b9a867d (diff)
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 <[email protected]> Reviewed-by: HÃ¥kan Johansson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5465
Diffstat (limited to 'module/zcommon')
-rw-r--r--module/zcommon/zfs_fletcher.c10
-rw-r--r--module/zcommon/zfs_uio.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c
index fb0a14991..1d1ea2e24 100644
--- a/module/zcommon/zfs_fletcher.c
+++ b/module/zcommon/zfs_fletcher.c
@@ -608,7 +608,7 @@ fletcher_4_kstat_data(char *buf, size_t size, void *data)
{
struct fletcher_4_kstat *fastest_stat =
&fletcher_4_stat_data[fletcher_4_supp_impls_cnt];
- struct fletcher_4_kstat *curr_stat = (struct fletcher_4_kstat *) data;
+ struct fletcher_4_kstat *curr_stat = (struct fletcher_4_kstat *)data;
ssize_t off = 0;
if (curr_stat == fastest_stat) {
@@ -623,9 +623,9 @@ fletcher_4_kstat_data(char *buf, size_t size, void *data)
off += snprintf(buf + off, size - off, "%-17s",
fletcher_4_supp_impls[id]->name);
off += snprintf(buf + off, size - off, "%-15llu",
- (u_longlong_t) curr_stat->native);
+ (u_longlong_t)curr_stat->native);
off += snprintf(buf + off, size - off, "%-15llu\n",
- (u_longlong_t) curr_stat->byteswap);
+ (u_longlong_t)curr_stat->byteswap);
}
return (0);
@@ -723,7 +723,7 @@ fletcher_4_init(void)
/* move supported impl into fletcher_4_supp_impls */
for (i = 0, c = 0; i < ARRAY_SIZE(fletcher_4_impls); i++) {
- curr_impl = (fletcher_4_ops_t *) fletcher_4_impls[i];
+ curr_impl = (fletcher_4_ops_t *)fletcher_4_impls[i];
if (curr_impl->valid && curr_impl->valid())
fletcher_4_supp_impls[c++] = curr_impl;
@@ -754,7 +754,7 @@ fletcher_4_init(void)
/* install kstats for all implementations */
fletcher_4_kstat = kstat_create("zfs", 0, "fletcher_4_bench", "misc",
- KSTAT_TYPE_RAW, 0, KSTAT_FLAG_VIRTUAL);
+ KSTAT_TYPE_RAW, 0, KSTAT_FLAG_VIRTUAL);
if (fletcher_4_kstat != NULL) {
fletcher_4_kstat->ks_data = NULL;
fletcher_4_kstat->ks_ndata = UINT32_MAX;
diff --git a/module/zcommon/zfs_uio.c b/module/zcommon/zfs_uio.c
index 9ec3002a2..7b4175bbe 100644
--- a/module/zcommon/zfs_uio.c
+++ b/module/zcommon/zfs_uio.c
@@ -193,7 +193,7 @@ uio_prefaultpages(ssize_t n, struct uio *uio)
*/
p = iov->iov_base + skip;
while (cnt) {
- if (fuword8((uint8_t *) p, &tmp))
+ if (fuword8((uint8_t *)p, &tmp))
return;
incr = MIN(cnt, PAGESIZE);
p += incr;
@@ -203,7 +203,7 @@ uio_prefaultpages(ssize_t n, struct uio *uio)
* touch the last byte in case it straddles a page.
*/
p--;
- if (fuword8((uint8_t *) p, &tmp))
+ if (fuword8((uint8_t *)p, &tmp))
return;
}
}