Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: skein: fix checkpatch block comments warning

Fix the following warnings:
Block comments should align the * on each line

Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Abdul Rauf and committed by
Greg Kroah-Hartman
bb9fdbfd 09249ecd

+99 -89
+59 -53
drivers/staging/skein/skein_base.h
··· 1 1 #ifndef _SKEIN_H_ 2 2 #define _SKEIN_H_ 1 3 - /************************************************************************** 4 - ** 5 - ** Interface declarations and internal definitions for Skein hashing. 6 - ** 7 - ** Source code author: Doug Whiting, 2008. 8 - ** 9 - ** This algorithm and source code is released to the public domain. 10 - ** 11 - *************************************************************************** 12 - ** 13 - ** The following compile-time switches may be defined to control some 14 - ** tradeoffs between speed, code size, error checking, and security. 15 - ** 16 - ** The "default" note explains what happens when the switch is not defined. 17 - ** 18 - ** SKEIN_ERR_CHECK -- how error checking is handled inside Skein 19 - ** code. If not defined, most error checking 20 - ** is disabled (for performance). Otherwise, 21 - ** the switch value is interpreted as: 22 - ** 0: use assert() to flag errors 23 - ** 1: return SKEIN_FAIL to flag errors 24 - ** 25 - ***************************************************************************/ 3 + /* 4 + ************************************************************************** 5 + * 6 + * Interface declarations and internal definitions for Skein hashing. 7 + * 8 + * Source code author: Doug Whiting, 2008. 9 + * 10 + * This algorithm and source code is released to the public domain. 11 + * 12 + ************************************************************************** 13 + * 14 + * The following compile-time switches may be defined to control some 15 + * tradeoffs between speed, code size, error checking, and security. 16 + * 17 + * The "default" note explains what happens when the switch is not defined. 18 + * 19 + * SKEIN_ERR_CHECK -- how error checking is handled inside Skein 20 + * code. If not defined, most error checking 21 + * is disabled (for performance). Otherwise, 22 + * the switch value is interpreted as: 23 + * 0: use assert() to flag errors 24 + * 1: return SKEIN_FAIL to flag errors 25 + * 26 + ************************************************************************** 27 + */ 26 28 27 29 /*Skein digest sizes for crypto api*/ 28 30 #define SKEIN256_DIGEST_BIT_SIZE 256 ··· 103 101 int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val); 104 102 105 103 /* 106 - ** Skein APIs for "extended" initialization: MAC keys, tree hashing. 107 - ** After an init_ext() call, just use update/final calls as with init(). 108 - ** 109 - ** Notes: Same parameters as _init() calls, plus tree_info/key/key_bytes. 110 - ** When key_bytes == 0 and tree_info == SKEIN_SEQUENTIAL, 111 - ** the results of init_ext() are identical to calling init(). 112 - ** The function init() may be called once to "precompute" the IV for 113 - ** a given hash_bit_len value, then by saving a copy of the context 114 - ** the IV computation may be avoided in later calls. 115 - ** Similarly, the function init_ext() may be called once per MAC key 116 - ** to precompute the MAC IV, then a copy of the context saved and 117 - ** reused for each new MAC computation. 118 - **/ 104 + * Skein APIs for "extended" initialization: MAC keys, tree hashing. 105 + * After an init_ext() call, just use update/final calls as with init(). 106 + * 107 + * Notes: Same parameters as _init() calls, plus tree_info/key/key_bytes. 108 + * When key_bytes == 0 and tree_info == SKEIN_SEQUENTIAL, 109 + * the results of init_ext() are identical to calling init(). 110 + * The function init() may be called once to "precompute" the IV for 111 + * a given hash_bit_len value, then by saving a copy of the context 112 + * the IV computation may be avoided in later calls. 113 + * Similarly, the function init_ext() may be called once per MAC key 114 + * to precompute the MAC IV, then a copy of the context saved and 115 + * reused for each new MAC computation. 116 + */ 119 117 int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len, 120 118 u64 tree_info, const u8 *key, size_t key_bytes); 121 119 int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len, ··· 124 122 u64 tree_info, const u8 *key, size_t key_bytes); 125 123 126 124 /* 127 - ** Skein APIs for MAC and tree hash: 128 - ** final_pad: pad, do final block, but no OUTPUT type 129 - ** output: do just the output stage 130 - */ 125 + * Skein APIs for MAC and tree hash: 126 + * final_pad: pad, do final block, but no OUTPUT type 127 + * output: do just the output stage 128 + */ 131 129 int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val); 132 130 int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val); 133 131 int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val); ··· 141 139 int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val); 142 140 #endif 143 141 144 - /***************************************************************** 145 - ** "Internal" Skein definitions 146 - ** -- not needed for sequential hashing API, but will be 147 - ** helpful for other uses of Skein (e.g., tree hash mode). 148 - ** -- included here so that they can be shared between 149 - ** reference and optimized code. 150 - ******************************************************************/ 142 + /* 143 + ***************************************************************** 144 + * "Internal" Skein definitions 145 + * -- not needed for sequential hashing API, but will be 146 + * helpful for other uses of Skein (e.g., tree hash mode). 147 + * -- included here so that they can be shared between 148 + * reference and optimized code. 149 + ***************************************************************** 150 + */ 151 151 152 152 /* tweak word tweak[1]: bit field starting positions */ 153 153 #define SKEIN_T1_BIT(BIT) ((BIT) - 64) /* second word */ ··· 230 226 #define SKEIN_CFG_TREE_INFO_SEQUENTIAL SKEIN_CFG_TREE_INFO(0, 0, 0) 231 227 232 228 /* 233 - ** Skein macros for getting/setting tweak words, etc. 234 - ** These are useful for partial input bytes, hash tree init/update, etc. 235 - **/ 229 + * Skein macros for getting/setting tweak words, etc. 230 + * These are useful for partial input bytes, hash tree init/update, etc. 231 + */ 236 232 #define skein_get_tweak(ctx_ptr, TWK_NUM) ((ctx_ptr)->h.tweak[TWK_NUM]) 237 233 #define skein_set_tweak(ctx_ptr, TWK_NUM, t_val) { \ 238 234 (ctx_ptr)->h.tweak[TWK_NUM] = (t_val); \ ··· 278 274 #define skein_assert_ret(x, ret_code) 279 275 #define skein_assert(x) 280 276 281 - /***************************************************************** 282 - ** Skein block function constants (shared across Ref and Opt code) 283 - ******************************************************************/ 277 + /* 278 + ***************************************************************** 279 + * Skein block function constants (shared across Ref and Opt code) 280 + ***************************************************************** 281 + */ 284 282 enum { 285 283 /* SKEIN_256 round rotation constants */ 286 284 R_256_0_0 = 14, R_256_0_1 = 16,
+17 -15
drivers/staging/skein/skein_block.c
··· 1 - /*********************************************************************** 2 - ** 3 - ** Implementation of the Skein block functions. 4 - ** 5 - ** Source code author: Doug Whiting, 2008. 6 - ** 7 - ** This algorithm and source code is released to the public domain. 8 - ** 9 - ** Compile-time switches: 10 - ** 11 - ** SKEIN_USE_ASM -- set bits (256/512/1024) to select which 12 - ** versions use ASM code for block processing 13 - ** [default: use C for all block sizes] 14 - ** 15 - ************************************************************************/ 1 + /* 2 + *********************************************************************** 3 + * 4 + * Implementation of the Skein block functions. 5 + * 6 + * Source code author: Doug Whiting, 2008. 7 + * 8 + * This algorithm and source code is released to the public domain. 9 + * 10 + * Compile-time switches: 11 + * 12 + * SKEIN_USE_ASM -- set bits (256/512/1024) to select which 13 + * versions use ASM code for block processing 14 + * [default: use C for all block sizes] 15 + * 16 + *********************************************************************** 17 + */ 16 18 17 19 #include <linux/string.h> 18 20 #include <linux/bitops.h>
+11 -9
drivers/staging/skein/skein_block.h
··· 1 - /*********************************************************************** 2 - ** 3 - ** Implementation of the Skein hash function. 4 - ** 5 - ** Source code author: Doug Whiting, 2008. 6 - ** 7 - ** This algorithm and source code is released to the public domain. 8 - ** 9 - ************************************************************************/ 1 + /* 2 + *********************************************************************** 3 + * 4 + * Implementation of the Skein hash function. 5 + * 6 + * Source code author: Doug Whiting, 2008. 7 + * 8 + * This algorithm and source code is released to the public domain. 9 + * 10 + *********************************************************************** 11 + */ 10 12 #ifndef _SKEIN_BLOCK_H_ 11 13 #define _SKEIN_BLOCK_H_ 12 14
+12 -12
drivers/staging/skein/skein_iv.h
··· 4 4 #include "skein_base.h" /* get Skein macros and types */ 5 5 6 6 /* 7 - ***************** Pre-computed Skein IVs ******************* 8 - ** 9 - ** NOTE: these values are not "magic" constants, but 10 - ** are generated using the Threefish block function. 11 - ** They are pre-computed here only for speed; i.e., to 12 - ** avoid the need for a Threefish call during Init(). 13 - ** 14 - ** The IV for any fixed hash length may be pre-computed. 15 - ** Only the most common values are included here. 16 - ** 17 - ************************************************************ 18 - **/ 7 + **************** Pre-computed Skein IVs ******************* 8 + * 9 + * NOTE: these values are not "magic" constants, but 10 + * are generated using the Threefish block function. 11 + * They are pre-computed here only for speed; i.e., to 12 + * avoid the need for a Threefish call during Init(). 13 + * 14 + * The IV for any fixed hash length may be pre-computed. 15 + * Only the most common values are included here. 16 + * 17 + *********************************************************** 18 + */ 19 19 20 20 #define MK_64 SKEIN_MK_64 21 21