From 02730c333c4fce8c0ead1f7f3404caca5cdb3936 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 12 Dec 2016 10:46:26 -0800 Subject: Use cstyle -cpP in `make cstyle` check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: HÃ¥kan Johansson Signed-off-by: Brian Behlendorf Closes #5465 --- module/zfs/abd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/zfs/abd.c') diff --git a/module/zfs/abd.c b/module/zfs/abd.c index 15d998a3b..dca70d6f2 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -407,7 +407,7 @@ struct page; #define kpm_enable 1 #define abd_alloc_chunk(o) \ - ((struct page *) umem_alloc_aligned(PAGESIZE << (o), 64, KM_SLEEP)) + ((struct page *)umem_alloc_aligned(PAGESIZE << (o), 64, KM_SLEEP)) #define abd_free_chunk(chunk, o) umem_free(chunk, PAGESIZE << (o)) #define zfs_kmap_atomic(chunk, km) ((void *)chunk) #define zfs_kunmap_atomic(addr, km) do { (void)(addr); } while (0) @@ -1486,8 +1486,8 @@ abd_nr_pages_off(abd_t *abd, unsigned int size, size_t off) else pos = abd->abd_u.abd_scatter.abd_offset + off; - return ((pos + size + PAGESIZE - 1) >> PAGE_SHIFT) - - (pos >> PAGE_SHIFT); + return ((pos + size + PAGESIZE - 1) >> PAGE_SHIFT) - + (pos >> PAGE_SHIFT); } /* @@ -1537,6 +1537,7 @@ abd_scatter_bio_map_off(struct bio *bio, abd_t *abd, module_param(zfs_abd_scatter_enabled, int, 0644); MODULE_PARM_DESC(zfs_abd_scatter_enabled, "Toggle whether ABD allocations must be linear."); +/* CSTYLED */ module_param(zfs_abd_scatter_max_order, uint, 0644); MODULE_PARM_DESC(zfs_abd_scatter_max_order, "Maximum order allocation used for a scatter ABD."); -- cgit v1.2.3