diff options
author | Michael Kjorling <[email protected]> | 2013-11-01 20:26:11 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-12-18 16:46:35 -0800 |
commit | d1d7e2689db9e03f11c069ebc9f1ba12829e5dac (patch) | |
tree | 75b9a2b23334d5f673fb31f142f74146d351865c /module/zfs/lz4.c | |
parent | 8ffef572ed2ba97e0c2d6a8aa2240012e611dc6f (diff) |
cstyle: Resolve C style issues
The vast majority of these changes are in Linux specific code.
They are the result of not having an automated style checker to
validate the code when it was originally written. Others were
caused when the common code was slightly adjusted for Linux.
This patch contains no functional changes. It only refreshes
the code to conform to style guide.
Everyone submitting patches for inclusion upstream should now
run 'make checkstyle' and resolve any warning prior to opening
a pull request. The automated builders have been updated to
fail a build if when 'make checkstyle' detects an issue.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1821
Diffstat (limited to 'module/zfs/lz4.c')
-rw-r--r-- | module/zfs/lz4.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/module/zfs/lz4.c b/module/zfs/lz4.c index ae5d5a23a..6fc6201ee 100644 --- a/module/zfs/lz4.c +++ b/module/zfs/lz4.c @@ -47,7 +47,8 @@ static kmem_cache_t *lz4_cache; /*ARGSUSED*/ size_t -lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, + size_t d_len, int n) { uint32_t bufsiz; char *dest = d_start; @@ -74,7 +75,8 @@ lz4_compress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n /*ARGSUSED*/ int -lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, + size_t d_len, int n) { const char *src = s_start; uint32_t bufsiz = BE_IN32(src); @@ -143,16 +145,16 @@ lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int * This function explicitly handles the CTX memory structure. * * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated - * by the caller (either on the stack or using kmem_cache_alloc). Passing NULL - * isn't valid. + * by the caller (either on the stack or using kmem_cache_alloc). Passing + * NULL isn't valid. * * LZ4_compress64kCtx() : * Same as LZ4_compressCtx(), but specific to small inputs (<64KB). * isize *Must* be <64KB, otherwise the output will be corrupted. * * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated - * by the caller (either on the stack or using kmem_cache_alloc). Passing NULL - * isn't valid. + * by the caller (either on the stack or using kmem_cache_alloc). Passing + * NULL isn't valid. */ /* @@ -267,7 +269,7 @@ lz4_decompress_zfs(void *s_start, void *d_start, size_t s_len, size_t d_len, int #define unlikely(expr) expect((expr) != 0, 0) #endif -#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ (((x) & 0xffu) << 8))) /* Basic types */ @@ -1009,4 +1011,3 @@ lz4_fini(void) lz4_cache = NULL; } } - |