public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/06] staging: crypto: skein: fixing style issues
@ 2014-05-19  8:09 Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 01/06] staging: crypto: skein: rename camelcase functions Anton Saraev
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

Hi! To prepare skein driver for mainline inclusion we fixing most of
style issues (wrong names of functions, vars, macros, files) and 
checkpatch problems in this patch set. For example, existing code 
is widely use camelCase names. This patch fix it.

Anton Saraev (6):
  staging: crypto: skein: rename camelcase functions
  staging: crypto: skein: rename camelcase vars
  staging: crypto: skein: rename skein1024_ctx to skein_1024_ctx
  staging: crypto: skein: rename enums
  staging: crypto: skein: rename macros
  staging: crypto: skein: rename files

 drivers/staging/skein/Makefile                     |  10 +-
 drivers/staging/skein/TODO                         |   3 -
 drivers/staging/skein/include/skein.h              | 180 +++----
 .../skein/include/{skeinApi.h => skein_api.h}      |  66 +--
 drivers/staging/skein/include/skein_block.h        |  12 +-
 drivers/staging/skein/include/skein_iv.h           |   6 +-
 .../include/{threefishApi.h => threefish_api.h}    |  84 +--
 drivers/staging/skein/skein.c                      | 577 +++++++++++----------
 drivers/staging/skein/{skeinApi.c => skein_api.c}  | 170 +++---
 drivers/staging/skein/skein_block.c                | 411 +++++++--------
 .../{skeinBlockNo3F.c => skein_block_no_3f.c}      |  62 +--
 drivers/staging/skein/threefishApi.c               |  79 ---
 ...threefish1024Block.c => threefish_1024_block.c} |  80 +--
 .../{threefish256Block.c => threefish_256_block.c} |  32 +-
 .../{threefish512Block.c => threefish_512_block.c} |  48 +-
 drivers/staging/skein/threefish_api.c              |  78 +++
 16 files changed, 959 insertions(+), 939 deletions(-)
 rename drivers/staging/skein/include/{skeinApi.h => skein_api.h} (79%)
 rename drivers/staging/skein/include/{threefishApi.h => threefish_api.h} (66%)
 rename drivers/staging/skein/{skeinApi.c => skein_api.c} (52%)
 rename drivers/staging/skein/{skeinBlockNo3F.c => skein_block_no_3f.c} (66%)
 delete mode 100644 drivers/staging/skein/threefishApi.c
 rename drivers/staging/skein/{threefish1024Block.c => threefish_1024_block.c} (98%)
 rename drivers/staging/skein/{threefish256Block.c => threefish_256_block.c} (96%)
 rename drivers/staging/skein/{threefish512Block.c => threefish_512_block.c} (97%)
 create mode 100644 drivers/staging/skein/threefish_api.c

-- 
1.9.2


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v2 01/06] staging: crypto: skein: rename camelcase functions
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars Anton Saraev
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

camelCase is not accepted in the Linux Kernel. To prepare skein
driver for mainline inclusion, we rename all functions to
non-camelCase equivalents.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/TODO                   |   1 -
 drivers/staging/skein/include/skein.h        |  66 ++++++++--------
 drivers/staging/skein/include/skeinApi.h     |  38 ++++-----
 drivers/staging/skein/include/skein_block.h  |  12 +--
 drivers/staging/skein/include/threefishApi.h |  44 ++++++-----
 drivers/staging/skein/skein.c                | 114 +++++++++++++--------------
 drivers/staging/skein/skeinApi.c             |  72 ++++++++---------
 drivers/staging/skein/skeinBlockNo3F.c       |  24 +++---
 drivers/staging/skein/skein_block.c          |  40 +++++-----
 drivers/staging/skein/threefish1024Block.c   |   6 +-
 drivers/staging/skein/threefish256Block.c    |   6 +-
 drivers/staging/skein/threefish512Block.c    |   6 +-
 drivers/staging/skein/threefishApi.c         |  38 ++++-----
 13 files changed, 239 insertions(+), 228 deletions(-)

diff --git a/drivers/staging/skein/TODO b/drivers/staging/skein/TODO
index f5c167a..bc42fb8 100644
--- a/drivers/staging/skein/TODO
+++ b/drivers/staging/skein/TODO
@@ -1,7 +1,6 @@
 skein/threefish TODO
 
  - rename camelcase vars
- - rename camelcase functions
  - rename files
  - move macros into appropriate header files
  - add / pass test vectors
diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index 0a2abce..15ff60f 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -86,59 +86,59 @@ struct skein1024_ctx { /* 1024-bit Skein hash context structure */
 	u8  b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
-/*   Skein APIs for (incremental) "straight hashing" */
-int  Skein_256_Init(struct skein_256_ctx *ctx, size_t hashBitLen);
-int  Skein_512_Init(struct skein_512_ctx *ctx, size_t hashBitLen);
-int  Skein1024_Init(struct skein1024_ctx *ctx, size_t hashBitLen);
-
-int  Skein_256_Update(struct skein_256_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt);
-int  Skein_512_Update(struct skein_512_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt);
-int  Skein1024_Update(struct skein1024_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt);
-
-int  Skein_256_Final(struct skein_256_ctx *ctx, u8 *hashVal);
-int  Skein_512_Final(struct skein_512_ctx *ctx, u8 *hashVal);
-int  Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal);
+/* Skein APIs for (incremental) "straight hashing" */
+int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen);
+int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen);
+int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen);
+
+int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
+		     size_t msgByteCnt);
+int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
+		     size_t msgByteCnt);
+int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
+		      size_t msgByteCnt);
+
+int skein_256_final(struct skein_256_ctx *ctx, u8 *hashVal);
+int skein_512_final(struct skein_512_ctx *ctx, u8 *hashVal);
+int skein_1024_final(struct skein1024_ctx *ctx, u8 *hashVal);
 
 /*
 **   Skein APIs for "extended" initialization: MAC keys, tree hashing.
-**   After an InitExt() call, just use Update/Final calls as with Init().
+**   After an init_ext() call, just use update/final calls as with init().
 **
-**   Notes: Same parameters as _Init() calls, plus treeInfo/key/keyBytes.
+**   Notes: Same parameters as _init() calls, plus treeInfo/key/keyBytes.
 **          When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL,
-**              the results of InitExt() are identical to calling Init().
-**          The function Init() may be called once to "precompute" the IV for
+**              the results of init_ext() are identical to calling init().
+**          The function init() may be called once to "precompute" the IV for
 **              a given hashBitLen value, then by saving a copy of the context
 **              the IV computation may be avoided in later calls.
-**          Similarly, the function InitExt() may be called once per MAC key
+**          Similarly, the function init_ext() may be called once per MAC key
 **              to precompute the MAC IV, then a copy of the context saved and
 **              reused for each new MAC computation.
 **/
-int  Skein_256_InitExt(struct skein_256_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes);
-int  Skein_512_InitExt(struct skein_512_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes);
-int  Skein1024_InitExt(struct skein1024_ctx *ctx, size_t hashBitLen,
+int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
+		       u64 treeInfo, const u8 *key, size_t keyBytes);
+int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
+		       u64 treeInfo, const u8 *key, size_t keyBytes);
+int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
 			u64 treeInfo, const u8 *key, size_t keyBytes);
 
 /*
 **   Skein APIs for MAC and tree hash:
-**      Final_Pad:  pad, do final block, but no OUTPUT type
-**      Output:     do just the output stage
+**      final_pad:  pad, do final block, but no OUTPUT type
+**      output:     do just the output stage
 */
-int  Skein_256_Final_Pad(struct skein_256_ctx *ctx, u8 *hashVal);
-int  Skein_512_Final_Pad(struct skein_512_ctx *ctx, u8 *hashVal);
-int  Skein1024_Final_Pad(struct skein1024_ctx *ctx, u8 *hashVal);
+int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hashVal);
+int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hashVal);
+int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hashVal);
 
 #ifndef SKEIN_TREE_HASH
 #define SKEIN_TREE_HASH (1)
 #endif
 #if  SKEIN_TREE_HASH
-int  Skein_256_Output(struct skein_256_ctx *ctx, u8 *hashVal);
-int  Skein_512_Output(struct skein_512_ctx *ctx, u8 *hashVal);
-int  Skein1024_Output(struct skein1024_ctx *ctx, u8 *hashVal);
+int skein_256_output(struct skein_256_ctx *ctx, u8 *hashVal);
+int skein_512_output(struct skein_512_ctx *ctx, u8 *hashVal);
+int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal);
 #endif
 
 /*****************************************************************
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skeinApi.h
index ace931a..ea54546 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skeinApi.h
@@ -50,31 +50,31 @@ OTHER DEALINGS IN THE SOFTWARE.
  * struct skein_ctx ctx;             // a Skein hash or MAC context
  *
  * // prepare context, here for a Skein with a state size of 512 bits.
- * skeinCtxPrepare(&ctx, Skein512);
+ * skein_ctx_prepare(&ctx, Skein512);
  *
  * // Initialize the context to set the requested hash length in bits
  * // here request a output hash size of 31 bits (Skein supports variable
  * // output sizes even very strange sizes)
- * skeinInit(&ctx, 31);
+ * skein_init(&ctx, 31);
  *
  * // Now update Skein with any number of message bits. A function that
  * // takes a number of bytes is also available.
- * skeinUpdateBits(&ctx, message, msgLength);
+ * skein_update_bits(&ctx, message, msgLength);
  *
  * // Now get the result of the Skein hash. The output buffer must be
  * // large enough to hold the request number of output bits. The application
  * // may now extract the bits.
- * skeinFinal(&ctx, result);
+ * skein_final(&ctx, result);
  * ...
  * @endcode
  *
- * An application may use @c skeinReset to reset a Skein context and use
+ * An application may use @c skein_reset to reset a Skein context and use
  * it for creation of another hash with the same Skein state size and output
  * bit length. In this case the API implementation restores some internal
  * internal state data and saves a full Skein initialization round.
  *
- * To create a MAC the application just uses @c skeinMacInit instead of
- * @c skeinInit. All other functions calls remain the same.
+ * To create a MAC the application just uses @c skein_mac_init instead of
+ * @c skein_init. All other functions calls remain the same.
  *
  */
 
@@ -123,7 +123,7 @@ struct skein_ctx {
  * @return
  *     SKEIN_SUCESS of SKEIN_FAIL
  */
-int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size);
+int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size);
 
 /**
  * Initialize a Skein context.
@@ -137,9 +137,9 @@ int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size);
  *     Number of MAC hash bits to compute
  * @return
  *     SKEIN_SUCESS of SKEIN_FAIL
- * @see skeinReset
+ * @see skein_reset
  */
-int skeinInit(struct skein_ctx *ctx, size_t hashBitLen);
+int skein_init(struct skein_ctx *ctx, size_t hashBitLen);
 
 /**
  * Resets a Skein context for further use.
@@ -151,7 +151,7 @@ int skeinInit(struct skein_ctx *ctx, size_t hashBitLen);
  * @param ctx
  *     Pointer to a pre-initialized Skein MAC context
  */
-void skeinReset(struct skein_ctx *ctx);
+void skein_reset(struct skein_ctx *ctx);
 
 /**
  * Initializes a Skein context for MAC usage.
@@ -173,8 +173,8 @@ void skeinReset(struct skein_ctx *ctx);
  * @return
  *     SKEIN_SUCESS of SKEIN_FAIL
  */
-int skeinMacInit(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
-		 size_t hashBitLen);
+int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
+		   size_t hashBitLen);
 
 /**
  * Update Skein with the next part of the message.
@@ -188,8 +188,8 @@ int skeinMacInit(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
  * @return
  *     Success or error code.
  */
-int skeinUpdate(struct skein_ctx *ctx, const u8 *msg,
-		size_t msgByteCnt);
+int skein_update(struct skein_ctx *ctx, const u8 *msg,
+		 size_t msgByteCnt);
 
 /**
  * Update the hash with a message bit string.
@@ -204,8 +204,8 @@ int skeinUpdate(struct skein_ctx *ctx, const u8 *msg,
  * @param msgBitCnt
  *     Length of the message in @b bits.
  */
-int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
-		    size_t msgBitCnt);
+int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
+		      size_t msgBitCnt);
 
 /**
  * Finalize Skein and return the hash.
@@ -220,9 +220,9 @@ int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
  *     enough to store @c hashBitLen bits.
  * @return
  *     Success or error code.
- * @see skeinReset
+ * @see skein_reset
  */
-int skeinFinal(struct skein_ctx *ctx, u8 *hash);
+int skein_final(struct skein_ctx *ctx, u8 *hash);
 
 /**
  * @}
diff --git a/drivers/staging/skein/include/skein_block.h b/drivers/staging/skein/include/skein_block.h
index b15c079..41cae89 100644
--- a/drivers/staging/skein/include/skein_block.h
+++ b/drivers/staging/skein/include/skein_block.h
@@ -12,11 +12,11 @@
 
 #include <skein.h> /* get the Skein API definitions   */
 
-void Skein_256_Process_Block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd);
-void Skein_512_Process_Block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd);
-void Skein1024_Process_Block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd);
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd);
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd);
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
+			      size_t blkCnt, size_t byteCntAdd);
 
 #endif
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h
index e81675d..6cdad46 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefishApi.h
@@ -21,10 +21,10 @@
     struct threefish_key keyCtx;
 
     // Initialize the context
-    threefishSetKey(&keyCtx, Threefish512, key, tweak);
+    threefish_set_key(&keyCtx, Threefish512, key, tweak);
 
     // Encrypt
-    threefishEncryptBlockBytes(&keyCtx, input, cipher);
+    threefish_encrypt_block_bytes(&keyCtx, input, cipher);
 @endcode
  */
 
@@ -72,9 +72,9 @@ struct threefish_key {
  * @param tweak
  *     Pointer to the two tweak words (word has 64 bits).
  */
-void threefishSetKey(struct threefish_key *keyCtx,
-			enum threefish_size stateSize,
-			u64 *keyData, u64 *tweak);
+void threefish_set_key(struct threefish_key *keyCtx,
+		       enum threefish_size stateSize,
+		       u64 *keyData, u64 *tweak);
 
 /**
  * Encrypt Threefisch block (bytes).
@@ -91,7 +91,8 @@ void threefishSetKey(struct threefish_key *keyCtx,
  * @param out
  *     Pointer to cipher buffer.
  */
-void threefishEncryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
+void threefish_encrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+				   u8 *out);
 
 /**
  * Encrypt Threefisch block (words).
@@ -110,8 +111,8 @@ void threefishEncryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
  * @param out
  *     Pointer to cipher buffer.
  */
-void threefishEncryptBlockWords(struct threefish_key *keyCtx, u64 *in,
-				u64 *out);
+void threefish_encrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+				   u64 *out);
 
 /**
  * Decrypt Threefisch block (bytes).
@@ -128,7 +129,8 @@ void threefishEncryptBlockWords(struct threefish_key *keyCtx, u64 *in,
  * @param out
  *     Pointer to plaintext buffer.
  */
-void threefishDecryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
+void threefish_decrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+				   u8 *out);
 
 /**
  * Decrypt Threefisch block (words).
@@ -147,17 +149,21 @@ void threefishDecryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
  * @param out
  *     Pointer to plaintext buffer.
  */
-void threefishDecryptBlockWords(struct threefish_key *keyCtx, u64 *in,
-				u64 *out);
+void threefish_decrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+				   u64 *out);
 
-void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output);
-void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output);
-void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input,
-			u64 *output);
-void threefishDecrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output);
-void threefishDecrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output);
-void threefishDecrypt1024(struct threefish_key *keyCtx, u64 *input,
-			u64 *output);
+void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output);
+void threefish_encrypt_512(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output);
+void threefish_encrypt_1024(struct threefish_key *keyCtx, u64 *input,
+			    u64 *output);
+void threefish_decrypt_256(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output);
+void threefish_decrypt_512(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output);
+void threefish_decrypt_1024(struct threefish_key *keyCtx, u64 *input,
+			    u64 *output);
 /**
  * @}
  */
diff --git a/drivers/staging/skein/skein.c b/drivers/staging/skein/skein.c
index 096b86b..ac64d9f 100644
--- a/drivers/staging/skein/skein.c
+++ b/drivers/staging/skein/skein.c
@@ -21,7 +21,7 @@
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int Skein_256_Init(struct skein_256_ctx *ctx, size_t hashBitLen)
+int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen)
 {
 	union {
 		u8  b[SKEIN_256_STATE_BYTES];
@@ -64,7 +64,7 @@ int Skein_256_Init(struct skein_256_ctx *ctx, size_t hashBitLen)
 		/* compute the initial chaining values from config block */
 		/* zero the chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
-		Skein_256_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+		skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 		break;
 	}
 	/* The chaining vars ctx->X are now initialized for hashBitLen. */
@@ -76,9 +76,9 @@ int Skein_256_Init(struct skein_256_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to Skein_256_Init() when keyBytes == 0 && \
+/* [identical to skein_256_init() when keyBytes == 0 && \
  *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int Skein_256_InitExt(struct skein_256_ctx *ctx, size_t hashBitLen,
+int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
 			u64 treeInfo, const u8 *key, size_t keyBytes)
 {
 	union {
@@ -103,9 +103,9 @@ int Skein_256_InitExt(struct skein_256_ctx *ctx, size_t hashBitLen,
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		Skein_256_Update(ctx, key, keyBytes);
+		skein_256_update(ctx, key, keyBytes);
 		/* put result into cfg.b[] */
-		Skein_256_Final_Pad(ctx, cfg.b);
+		skein_256_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
 		memcpy(ctx->X, cfg.b, sizeof(cfg.b));
 	}
@@ -128,7 +128,7 @@ int Skein_256_InitExt(struct skein_256_ctx *ctx, size_t hashBitLen,
 	Skein_Show_Key(256, &ctx->h, key, keyBytes);
 
 	/* compute the initial chaining values from config block */
-	Skein_256_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+	skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
@@ -139,8 +139,8 @@ int Skein_256_InitExt(struct skein_256_ctx *ctx, size_t hashBitLen,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
-int Skein_256_Update(struct skein_256_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt)
+int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
+		     size_t msgByteCnt)
 {
 	size_t n;
 
@@ -162,7 +162,7 @@ int Skein_256_Update(struct skein_256_ctx *ctx, const u8 *msg,
 				ctx->h.bCnt += n;
 			}
 			Skein_assert(ctx->h.bCnt == SKEIN_256_BLOCK_BYTES);
-			Skein_256_Process_Block(ctx, ctx->b, 1,
+			skein_256_process_block(ctx, ctx->b, 1,
 						SKEIN_256_BLOCK_BYTES);
 			ctx->h.bCnt = 0;
 		}
@@ -173,7 +173,7 @@ int Skein_256_Update(struct skein_256_ctx *ctx, const u8 *msg,
 		if (msgByteCnt > SKEIN_256_BLOCK_BYTES) {
 			/* number of full blocks to process */
 			n = (msgByteCnt-1) / SKEIN_256_BLOCK_BYTES;
-			Skein_256_Process_Block(ctx, msg, n,
+			skein_256_process_block(ctx, msg, n,
 						SKEIN_256_BLOCK_BYTES);
 			msgByteCnt -= n * SKEIN_256_BLOCK_BYTES;
 			msg        += n * SKEIN_256_BLOCK_BYTES;
@@ -193,7 +193,7 @@ int Skein_256_Update(struct skein_256_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int Skein_256_Final(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_final(struct skein_256_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN_256_STATE_WORDS];
@@ -208,7 +208,7 @@ int Skein_256_Final(struct skein_256_ctx *ctx, u8 *hashVal)
 			SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
 
 	/* process the final block */
-	Skein_256_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_256_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -224,7 +224,7 @@ int Skein_256_Final(struct skein_256_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein_256_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN_256_BLOCK_BYTES;
 		if (n >= SKEIN_256_BLOCK_BYTES)
@@ -246,7 +246,7 @@ int Skein_256_Final(struct skein_256_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int Skein_512_Init(struct skein_512_ctx *ctx, size_t hashBitLen)
+int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen)
 {
 	union {
 		u8  b[SKEIN_512_STATE_BYTES];
@@ -289,7 +289,7 @@ int Skein_512_Init(struct skein_512_ctx *ctx, size_t hashBitLen)
 		/* compute the initial chaining values from config block */
 		/* zero the chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
-		Skein_512_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+		skein_512_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 		break;
 	}
 
@@ -305,10 +305,10 @@ int Skein_512_Init(struct skein_512_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to Skein_512_Init() when keyBytes == 0 && \
+/* [identical to skein_512_init() when keyBytes == 0 && \
  *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int Skein_512_InitExt(struct skein_512_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes)
+int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
+		       u64 treeInfo, const u8 *key, size_t keyBytes)
 {
 	union {
 		u8  b[SKEIN_512_STATE_BYTES];
@@ -332,9 +332,9 @@ int Skein_512_InitExt(struct skein_512_ctx *ctx, size_t hashBitLen,
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		Skein_512_Update(ctx, key, keyBytes);
+		skein_512_update(ctx, key, keyBytes);
 		/* put result into cfg.b[] */
-		Skein_512_Final_Pad(ctx, cfg.b);
+		skein_512_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
 		memcpy(ctx->X, cfg.b, sizeof(cfg.b));
 	}
@@ -356,7 +356,7 @@ int Skein_512_InitExt(struct skein_512_ctx *ctx, size_t hashBitLen,
 	Skein_Show_Key(512, &ctx->h, key, keyBytes);
 
 	/* compute the initial chaining values from config block */
-	Skein_512_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+	skein_512_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
@@ -367,8 +367,8 @@ int Skein_512_InitExt(struct skein_512_ctx *ctx, size_t hashBitLen,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
-int Skein_512_Update(struct skein_512_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt)
+int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
+		     size_t msgByteCnt)
 {
 	size_t n;
 
@@ -390,7 +390,7 @@ int Skein_512_Update(struct skein_512_ctx *ctx, const u8 *msg,
 				ctx->h.bCnt += n;
 			}
 			Skein_assert(ctx->h.bCnt == SKEIN_512_BLOCK_BYTES);
-			Skein_512_Process_Block(ctx, ctx->b, 1,
+			skein_512_process_block(ctx, ctx->b, 1,
 						SKEIN_512_BLOCK_BYTES);
 			ctx->h.bCnt = 0;
 		}
@@ -401,7 +401,7 @@ int Skein_512_Update(struct skein_512_ctx *ctx, const u8 *msg,
 		if (msgByteCnt > SKEIN_512_BLOCK_BYTES) {
 			/* number of full blocks to process */
 			n = (msgByteCnt-1) / SKEIN_512_BLOCK_BYTES;
-			Skein_512_Process_Block(ctx, msg, n,
+			skein_512_process_block(ctx, msg, n,
 						SKEIN_512_BLOCK_BYTES);
 			msgByteCnt -= n * SKEIN_512_BLOCK_BYTES;
 			msg        += n * SKEIN_512_BLOCK_BYTES;
@@ -421,7 +421,7 @@ int Skein_512_Update(struct skein_512_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int Skein_512_Final(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_final(struct skein_512_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN_512_STATE_WORDS];
@@ -436,7 +436,7 @@ int Skein_512_Final(struct skein_512_ctx *ctx, u8 *hashVal)
 			SKEIN_512_BLOCK_BYTES - ctx->h.bCnt);
 
 	/* process the final block */
-	Skein_512_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_512_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -452,7 +452,7 @@ int Skein_512_Final(struct skein_512_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein_512_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN_512_BLOCK_BYTES;
 		if (n >= SKEIN_512_BLOCK_BYTES)
@@ -474,7 +474,7 @@ int Skein_512_Final(struct skein_512_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int Skein1024_Init(struct skein1024_ctx *ctx, size_t hashBitLen)
+int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen)
 {
 	union {
 		u8  b[SKEIN1024_STATE_BYTES];
@@ -514,7 +514,7 @@ int Skein1024_Init(struct skein1024_ctx *ctx, size_t hashBitLen)
 		/* compute the initial chaining values from config block */
 		/* zero the chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
-		Skein1024_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+		skein_1024_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 		break;
 	}
 
@@ -527,9 +527,9 @@ int Skein1024_Init(struct skein1024_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to Skein1024_Init() when keyBytes == 0 && \
+/* [identical to skein_1024_init() when keyBytes == 0 && \
  *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int Skein1024_InitExt(struct skein1024_ctx *ctx, size_t hashBitLen,
+int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
 			u64 treeInfo, const u8 *key, size_t keyBytes)
 {
 	union {
@@ -554,9 +554,9 @@ int Skein1024_InitExt(struct skein1024_ctx *ctx, size_t hashBitLen,
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		Skein1024_Update(ctx, key, keyBytes);
+		skein_1024_update(ctx, key, keyBytes);
 		/* put result into cfg.b[] */
-		Skein1024_Final_Pad(ctx, cfg.b);
+		skein_1024_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
 		memcpy(ctx->X, cfg.b, sizeof(cfg.b));
 	}
@@ -579,7 +579,7 @@ int Skein1024_InitExt(struct skein1024_ctx *ctx, size_t hashBitLen,
 	Skein_Show_Key(1024, &ctx->h, key, keyBytes);
 
 	/* compute the initial chaining values from config block */
-	Skein1024_Process_Block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
+	skein_1024_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
@@ -590,8 +590,8 @@ int Skein1024_InitExt(struct skein1024_ctx *ctx, size_t hashBitLen,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
-int Skein1024_Update(struct skein1024_ctx *ctx, const u8 *msg,
-			size_t msgByteCnt)
+int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
+		      size_t msgByteCnt)
 {
 	size_t n;
 
@@ -613,8 +613,8 @@ int Skein1024_Update(struct skein1024_ctx *ctx, const u8 *msg,
 				ctx->h.bCnt += n;
 			}
 			Skein_assert(ctx->h.bCnt == SKEIN1024_BLOCK_BYTES);
-			Skein1024_Process_Block(ctx, ctx->b, 1,
-						SKEIN1024_BLOCK_BYTES);
+			skein_1024_process_block(ctx, ctx->b, 1,
+						 SKEIN1024_BLOCK_BYTES);
 			ctx->h.bCnt = 0;
 		}
 		/*
@@ -624,8 +624,8 @@ int Skein1024_Update(struct skein1024_ctx *ctx, const u8 *msg,
 		if (msgByteCnt > SKEIN1024_BLOCK_BYTES) {
 			/* number of full blocks to process */
 			n = (msgByteCnt-1) / SKEIN1024_BLOCK_BYTES;
-			Skein1024_Process_Block(ctx, msg, n,
-						SKEIN1024_BLOCK_BYTES);
+			skein_1024_process_block(ctx, msg, n,
+						 SKEIN1024_BLOCK_BYTES);
 			msgByteCnt -= n * SKEIN1024_BLOCK_BYTES;
 			msg        += n * SKEIN1024_BLOCK_BYTES;
 		}
@@ -644,7 +644,7 @@ int Skein1024_Update(struct skein1024_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_final(struct skein1024_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN1024_STATE_WORDS];
@@ -659,7 +659,7 @@ int Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal)
 			SKEIN1024_BLOCK_BYTES - ctx->h.bCnt);
 
 	/* process the final block */
-	Skein1024_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -675,7 +675,7 @@ int Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein1024_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN1024_BLOCK_BYTES;
 		if (n >= SKEIN1024_BLOCK_BYTES)
@@ -696,7 +696,7 @@ int Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int Skein_256_Final_Pad(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hashVal)
 {
 	/* catch uninitialized context */
 	Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
@@ -708,7 +708,7 @@ int Skein_256_Final_Pad(struct skein_256_ctx *ctx, u8 *hashVal)
 		memset(&ctx->b[ctx->h.bCnt], 0,
 			SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
 	/* process the final block */
-	Skein_256_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_256_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* "output" the state bytes */
 	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN_256_BLOCK_BYTES);
@@ -718,7 +718,7 @@ int Skein_256_Final_Pad(struct skein_256_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int Skein_512_Final_Pad(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hashVal)
 {
 	/* catch uninitialized context */
 	Skein_Assert(ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
@@ -730,7 +730,7 @@ int Skein_512_Final_Pad(struct skein_512_ctx *ctx, u8 *hashVal)
 		memset(&ctx->b[ctx->h.bCnt], 0,
 			SKEIN_512_BLOCK_BYTES - ctx->h.bCnt);
 	/* process the final block */
-	Skein_512_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_512_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* "output" the state bytes */
 	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN_512_BLOCK_BYTES);
@@ -740,7 +740,7 @@ int Skein_512_Final_Pad(struct skein_512_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int Skein1024_Final_Pad(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hashVal)
 {
 	/* catch uninitialized context */
 	Skein_Assert(ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
@@ -752,7 +752,7 @@ int Skein1024_Final_Pad(struct skein1024_ctx *ctx, u8 *hashVal)
 		memset(&ctx->b[ctx->h.bCnt], 0,
 			SKEIN1024_BLOCK_BYTES - ctx->h.bCnt);
 	/* process the final block */
-	Skein1024_Process_Block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
 
 	/* "output" the state bytes */
 	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN1024_BLOCK_BYTES);
@@ -763,7 +763,7 @@ int Skein1024_Final_Pad(struct skein1024_ctx *ctx, u8 *hashVal)
 #if SKEIN_TREE_HASH
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int Skein_256_Output(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_output(struct skein_256_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN_256_STATE_WORDS];
@@ -784,7 +784,7 @@ int Skein_256_Output(struct skein_256_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein_256_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN_256_BLOCK_BYTES;
 		if (n >= SKEIN_256_BLOCK_BYTES)
@@ -802,7 +802,7 @@ int Skein_256_Output(struct skein_256_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int Skein_512_Output(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_output(struct skein_512_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN_512_STATE_WORDS];
@@ -823,7 +823,7 @@ int Skein_512_Output(struct skein_512_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein_512_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN_512_BLOCK_BYTES;
 		if (n >= SKEIN_512_BLOCK_BYTES)
@@ -841,7 +841,7 @@ int Skein_512_Output(struct skein_512_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int Skein1024_Output(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal)
 {
 	size_t i, n, byteCnt;
 	u64 X[SKEIN1024_STATE_WORDS];
@@ -862,7 +862,7 @@ int Skein1024_Output(struct skein1024_ctx *ctx, u8 *hashVal)
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
-		Skein1024_Process_Block(ctx, ctx->b, 1, sizeof(u64));
+		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
 		n = byteCnt - i*SKEIN1024_BLOCK_BYTES;
 		if (n >= SKEIN1024_BLOCK_BYTES)
diff --git a/drivers/staging/skein/skeinApi.c b/drivers/staging/skein/skeinApi.c
index dd109bf..c4f5333 100644
--- a/drivers/staging/skein/skeinApi.c
+++ b/drivers/staging/skein/skeinApi.c
@@ -27,7 +27,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <linux/string.h>
 #include <skeinApi.h>
 
-int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size)
+int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size)
 {
 	Skein_Assert(ctx && size, SKEIN_FAIL);
 
@@ -37,7 +37,7 @@ int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size)
 	return SKEIN_SUCCESS;
 }
 
-int skeinInit(struct skein_ctx *ctx, size_t hashBitLen)
+int skein_init(struct skein_ctx *ctx, size_t hashBitLen)
 {
 	int ret = SKEIN_FAIL;
 	size_t Xlen = 0;
@@ -58,16 +58,16 @@ int skeinInit(struct skein_ctx *ctx, size_t hashBitLen)
 	 */
 	switch (ctx->skeinSize) {
 	case Skein256:
-		ret = Skein_256_InitExt(&ctx->m.s256, hashBitLen,
-					treeInfo, NULL, 0);
+		ret = skein_256_init_ext(&ctx->m.s256, hashBitLen,
+					 treeInfo, NULL, 0);
 		break;
 	case Skein512:
-		ret = Skein_512_InitExt(&ctx->m.s512, hashBitLen,
-					treeInfo, NULL, 0);
+		ret = skein_512_init_ext(&ctx->m.s512, hashBitLen,
+					 treeInfo, NULL, 0);
 		break;
 	case Skein1024:
-		ret = Skein1024_InitExt(&ctx->m.s1024, hashBitLen,
-					treeInfo, NULL, 0);
+		ret = skein_1024_init_ext(&ctx->m.s1024, hashBitLen,
+					  treeInfo, NULL, 0);
 		break;
 	}
 
@@ -81,8 +81,8 @@ int skeinInit(struct skein_ctx *ctx, size_t hashBitLen)
 	return ret;
 }
 
-int skeinMacInit(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
-		size_t hashBitLen)
+int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
+		   size_t hashBitLen)
 {
 	int ret = SKEIN_FAIL;
 	u64 *X = NULL;
@@ -98,20 +98,20 @@ int skeinMacInit(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
 
 	switch (ctx->skeinSize) {
 	case Skein256:
-		ret = Skein_256_InitExt(&ctx->m.s256, hashBitLen,
-					treeInfo,
-					(const u8 *)key, keyLen);
+		ret = skein_256_init_ext(&ctx->m.s256, hashBitLen,
+					 treeInfo,
+					 (const u8 *)key, keyLen);
 
 		break;
 	case Skein512:
-		ret = Skein_512_InitExt(&ctx->m.s512, hashBitLen,
-					treeInfo,
-					(const u8 *)key, keyLen);
+		ret = skein_512_init_ext(&ctx->m.s512, hashBitLen,
+					 treeInfo,
+					 (const u8 *)key, keyLen);
 		break;
 	case Skein1024:
-		ret = Skein1024_InitExt(&ctx->m.s1024, hashBitLen,
-					treeInfo,
-					(const u8 *)key, keyLen);
+		ret = skein_1024_init_ext(&ctx->m.s1024, hashBitLen,
+					  treeInfo,
+					  (const u8 *)key, keyLen);
 
 		break;
 	}
@@ -125,7 +125,7 @@ int skeinMacInit(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
 	return ret;
 }
 
-void skeinReset(struct skein_ctx *ctx)
+void skein_reset(struct skein_ctx *ctx)
 {
 	size_t Xlen = 0;
 	u64 *X = NULL;
@@ -144,23 +144,23 @@ void skeinReset(struct skein_ctx *ctx)
 	Skein_Start_New_Type(&ctx->m, MSG);
 }
 
-int skeinUpdate(struct skein_ctx *ctx, const u8 *msg,
-		size_t msgByteCnt)
+int skein_update(struct skein_ctx *ctx, const u8 *msg,
+		 size_t msgByteCnt)
 {
 	int ret = SKEIN_FAIL;
 	Skein_Assert(ctx, SKEIN_FAIL);
 
 	switch (ctx->skeinSize) {
 	case Skein256:
-		ret = Skein_256_Update(&ctx->m.s256, (const u8 *)msg,
-					msgByteCnt);
+		ret = skein_256_update(&ctx->m.s256, (const u8 *)msg,
+				       msgByteCnt);
 		break;
 	case Skein512:
-		ret = Skein_512_Update(&ctx->m.s512, (const u8 *)msg,
-					msgByteCnt);
+		ret = skein_512_update(&ctx->m.s512, (const u8 *)msg,
+				       msgByteCnt);
 		break;
 	case Skein1024:
-		ret = Skein1024_Update(&ctx->m.s1024, (const u8 *)msg,
+		ret = skein_1024_update(&ctx->m.s1024, (const u8 *)msg,
 					msgByteCnt);
 		break;
 	}
@@ -168,8 +168,8 @@ int skeinUpdate(struct skein_ctx *ctx, const u8 *msg,
 
 }
 
-int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
-			size_t msgBitCnt)
+int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
+		      size_t msgBitCnt)
 {
 	/*
 	 * I've used the bit pad implementation from skein_test.c (see NIST CD)
@@ -189,9 +189,9 @@ int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
 
 	/* if number of bits is a multiple of bytes - that's easy */
 	if ((msgBitCnt & 0x7) == 0)
-		return skeinUpdate(ctx, msg, msgBitCnt >> 3);
+		return skein_update(ctx, msg, msgBitCnt >> 3);
 
-	skeinUpdate(ctx, msg, (msgBitCnt >> 3) + 1);
+	skein_update(ctx, msg, (msgBitCnt >> 3) + 1);
 
 	/*
 	 * The next line rely on the fact that the real Skein contexts
@@ -201,7 +201,7 @@ int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
 	 */
 	up = (u8 *)ctx->m.s256.X + ctx->skeinSize / 8;
 
-	/* set tweak flag for the skeinFinal call */
+	/* set tweak flag for the skein_final call */
 	Skein_Set_Bit_Pad_Flag(ctx->m.h);
 
 	/* now "pad" the final partial byte the way NIST likes */
@@ -217,20 +217,20 @@ int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
 	return SKEIN_SUCCESS;
 }
 
-int skeinFinal(struct skein_ctx *ctx, u8 *hash)
+int skein_final(struct skein_ctx *ctx, u8 *hash)
 {
 	int ret = SKEIN_FAIL;
 	Skein_Assert(ctx, SKEIN_FAIL);
 
 	switch (ctx->skeinSize) {
 	case Skein256:
-		ret = Skein_256_Final(&ctx->m.s256, (u8 *)hash);
+		ret = skein_256_final(&ctx->m.s256, (u8 *)hash);
 		break;
 	case Skein512:
-		ret = Skein_512_Final(&ctx->m.s512, (u8 *)hash);
+		ret = skein_512_final(&ctx->m.s512, (u8 *)hash);
 		break;
 	case Skein1024:
-		ret = Skein1024_Final(&ctx->m.s1024, (u8 *)hash);
+		ret = skein_1024_final(&ctx->m.s1024, (u8 *)hash);
 		break;
 	}
 	return ret;
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skeinBlockNo3F.c
index 6917638..0acb617 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skeinBlockNo3F.c
@@ -5,8 +5,8 @@
 
 
 /*****************************  Skein_256 ******************************/
-void Skein_256_Process_Block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -34,12 +34,12 @@ void Skein_256_Process_Block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefishSetKey(&key, Threefish256, ctx->X, tweak);
+		threefish_set_key(&key, Threefish256, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blkPtr, SKEIN_256_STATE_WORDS);
 
-		threefishEncryptBlockWords(&key, w, ctx->X);
+		threefish_encrypt_block_words(&key, w, ctx->X);
 
 		blkPtr += SKEIN_256_BLOCK_BYTES;
 
@@ -56,8 +56,8 @@ void Skein_256_Process_Block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 	ctx->h.T[1] = tweak[1];
 }
 
-void Skein_512_Process_Block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -85,12 +85,12 @@ void Skein_512_Process_Block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefishSetKey(&key, Threefish512, ctx->X, tweak);
+		threefish_set_key(&key, Threefish512, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blkPtr, SKEIN_512_STATE_WORDS);
 
-		threefishEncryptBlockWords(&key, w, ctx->X);
+		threefish_encrypt_block_words(&key, w, ctx->X);
 
 		blkPtr += SKEIN_512_BLOCK_BYTES;
 
@@ -111,8 +111,8 @@ void Skein_512_Process_Block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 	ctx->h.T[1] = tweak[1];
 }
 
-void Skein1024_Process_Block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
+			      size_t blkCnt, size_t byteCntAdd)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -140,12 +140,12 @@ void Skein1024_Process_Block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefishSetKey(&key, Threefish1024, ctx->X, tweak);
+		threefish_set_key(&key, Threefish1024, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blkPtr, SKEIN1024_STATE_WORDS);
 
-		threefishEncryptBlockWords(&key, w, ctx->X);
+		threefish_encrypt_block_words(&key, w, ctx->X);
 
 		blkPtr += SKEIN1024_BLOCK_BYTES;
 
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index fd96ca0..1195aec 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -39,8 +39,8 @@
 
 /*****************************  Skein_256 ******************************/
 #if !(SKEIN_USE_ASM & 256)
-void Skein_256_Process_Block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd)
 	{ /* do it in C */
 	enum {
 		WCNT = SKEIN_256_STATE_WORDS
@@ -215,7 +215,7 @@ do { \
 		R256_8_rounds(14);
 	#endif
 	#if  (SKEIN_UNROLL_256 > 14)
-#error  "need more unrolling in Skein_256_Process_Block"
+#error  "need more unrolling in skein_256_process_block"
 	#endif
 		}
 		/* do the final "feedforward" xor, update context chaining */
@@ -233,12 +233,12 @@ do { \
 }
 
 #if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
-size_t Skein_256_Process_Block_CodeSize(void)
+size_t skein_256_process_block_code_size(void)
 {
-	return ((u8 *) Skein_256_Process_Block_CodeSize) -
-		((u8 *) Skein_256_Process_Block);
+	return ((u8 *) skein_256_process_block_code_size) -
+		((u8 *) skein_256_process_block);
 }
-unsigned int Skein_256_Unroll_Cnt(void)
+unsigned int skein_256_unroll_cnt(void)
 {
 	return SKEIN_UNROLL_256;
 }
@@ -247,8 +247,8 @@ unsigned int Skein_256_Unroll_Cnt(void)
 
 /*****************************  Skein_512 ******************************/
 #if !(SKEIN_USE_ASM & 512)
-void Skein_512_Process_Block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
+			     size_t blkCnt, size_t byteCntAdd)
 { /* do it in C */
 	enum {
 		WCNT = SKEIN_512_STATE_WORDS
@@ -441,7 +441,7 @@ do { \
 			R512_8_rounds(14);
 	#endif
 	#if  (SKEIN_UNROLL_512 > 14)
-#error  "need more unrolling in Skein_512_Process_Block"
+#error  "need more unrolling in skein_512_process_block"
 	#endif
 		}
 
@@ -463,12 +463,12 @@ do { \
 }
 
 #if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
-size_t Skein_512_Process_Block_CodeSize(void)
+size_t skein_512_process_block_code_size(void)
 {
-	return ((u8 *) Skein_512_Process_Block_CodeSize) -
-		((u8 *) Skein_512_Process_Block);
+	return ((u8 *) skein_512_process_block_code_size) -
+		((u8 *) skein_512_process_block);
 }
-unsigned int Skein_512_Unroll_Cnt(void)
+unsigned int skein_512_unroll_cnt(void)
 {
 	return SKEIN_UNROLL_512;
 }
@@ -477,8 +477,8 @@ unsigned int Skein_512_Unroll_Cnt(void)
 
 /*****************************  Skein1024 ******************************/
 #if !(SKEIN_USE_ASM & 1024)
-void Skein1024_Process_Block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-				size_t blkCnt, size_t byteCntAdd)
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
+			      size_t blkCnt, size_t byteCntAdd)
 { /* do it in C, always looping (unrolled is bigger AND slower!) */
 	enum {
 		WCNT = SKEIN1024_STATE_WORDS
@@ -757,12 +757,12 @@ do { \
 }
 
 #if defined(SKEIN_CODE_SIZE) || defined(SKEIN_PERF)
-size_t Skein1024_Process_Block_CodeSize(void)
+size_t skein_1024_process_block_code_size(void)
 {
-	return ((u8 *) Skein1024_Process_Block_CodeSize) -
-		((u8 *) Skein1024_Process_Block);
+	return ((u8 *) skein_1024_process_block_code_size) -
+		((u8 *) skein_1024_process_block);
 }
-unsigned int Skein1024_Unroll_Cnt(void)
+unsigned int skein_1024_unroll_cnt(void)
 {
 	return SKEIN_UNROLL_1024;
 }
diff --git a/drivers/staging/skein/threefish1024Block.c b/drivers/staging/skein/threefish1024Block.c
index fe7517b..113019f 100644
--- a/drivers/staging/skein/threefish1024Block.c
+++ b/drivers/staging/skein/threefish1024Block.c
@@ -2,7 +2,8 @@
 #include <threefishApi.h>
 
 
-void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_encrypt_1024(struct threefish_key *keyCtx, u64 *input,
+			    u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3],
@@ -2122,7 +2123,8 @@ void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output)
 	output[15] = b15 + k1 + 20;
 }
 
-void threefishDecrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_decrypt_1024(struct threefish_key *keyCtx, u64 *input,
+			    u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3],
diff --git a/drivers/staging/skein/threefish256Block.c b/drivers/staging/skein/threefish256Block.c
index 2ae746a..ee21aef 100644
--- a/drivers/staging/skein/threefish256Block.c
+++ b/drivers/staging/skein/threefish256Block.c
@@ -2,7 +2,8 @@
 #include <threefishApi.h>
 
 
-void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3];
@@ -494,7 +495,8 @@ void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output)
 	output[3] = b3 + k1 + 18;
 }
 
-void threefishDecrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_decrypt_256(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3];
diff --git a/drivers/staging/skein/threefish512Block.c b/drivers/staging/skein/threefish512Block.c
index f428fd6..c4ad1b4 100644
--- a/drivers/staging/skein/threefish512Block.c
+++ b/drivers/staging/skein/threefish512Block.c
@@ -2,7 +2,8 @@
 #include <threefishApi.h>
 
 
-void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_encrypt_512(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3],
@@ -962,7 +963,8 @@ void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output)
 	output[7] = b7 + k7 + 18;
 }
 
-void threefishDecrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output)
+void threefish_decrypt_512(struct threefish_key *keyCtx, u64 *input,
+			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
 	  b2 = input[2], b3 = input[3],
diff --git a/drivers/staging/skein/threefishApi.c b/drivers/staging/skein/threefishApi.c
index 1e70f66..fce613b 100644
--- a/drivers/staging/skein/threefishApi.c
+++ b/drivers/staging/skein/threefishApi.c
@@ -3,9 +3,9 @@
 #include <linux/string.h>
 #include <threefishApi.h>
 
-void threefishSetKey(struct threefish_key *keyCtx,
-			enum threefish_size stateSize,
-			u64 *keyData, u64 *tweak)
+void threefish_set_key(struct threefish_key *keyCtx,
+		       enum threefish_size stateSize,
+		       u64 *keyData, u64 *tweak)
 {
 	int keyWords = stateSize / 64;
 	int i;
@@ -23,56 +23,56 @@ void threefishSetKey(struct threefish_key *keyCtx,
 	keyCtx->stateSize = stateSize;
 }
 
-void threefishEncryptBlockBytes(struct threefish_key *keyCtx, u8 *in,
-				u8 *out)
+void threefish_encrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+				   u8 *out)
 {
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
 	Skein_Get64_LSB_First(plain, in, keyCtx->stateSize / 64);
-	threefishEncryptBlockWords(keyCtx, plain, cipher);
+	threefish_encrypt_block_words(keyCtx, plain, cipher);
 	Skein_Put64_LSB_First(out, cipher, keyCtx->stateSize / 8);
 }
 
-void threefishEncryptBlockWords(struct threefish_key *keyCtx, u64 *in,
-				u64 *out)
+void threefish_encrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+				   u64 *out)
 {
 	switch (keyCtx->stateSize) {
 	case Threefish256:
-		threefishEncrypt256(keyCtx, in, out);
+		threefish_encrypt_256(keyCtx, in, out);
 		break;
 	case Threefish512:
-		threefishEncrypt512(keyCtx, in, out);
+		threefish_encrypt_512(keyCtx, in, out);
 		break;
 	case Threefish1024:
-		threefishEncrypt1024(keyCtx, in, out);
+		threefish_encrypt_1024(keyCtx, in, out);
 		break;
 	}
 }
 
-void threefishDecryptBlockBytes(struct threefish_key *keyCtx, u8 *in,
-				u8 *out)
+void threefish_decrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+				   u8 *out)
 {
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
 	Skein_Get64_LSB_First(cipher, in, keyCtx->stateSize / 64);
-	threefishDecryptBlockWords(keyCtx, cipher, plain);
+	threefish_decrypt_block_words(keyCtx, cipher, plain);
 	Skein_Put64_LSB_First(out, plain, keyCtx->stateSize / 8);
 }
 
-void threefishDecryptBlockWords(struct threefish_key *keyCtx, u64 *in,
-				u64 *out)
+void threefish_decrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+				   u64 *out)
 {
 	switch (keyCtx->stateSize) {
 	case Threefish256:
-		threefishDecrypt256(keyCtx, in, out);
+		threefish_decrypt_256(keyCtx, in, out);
 		break;
 	case Threefish512:
-		threefishDecrypt512(keyCtx, in, out);
+		threefish_decrypt_512(keyCtx, in, out);
 		break;
 	case Threefish1024:
-		threefishDecrypt1024(keyCtx, in, out);
+		threefish_decrypt_1024(keyCtx, in, out);
 		break;
 	}
 }
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 01/06] staging: crypto: skein: rename camelcase functions Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19  9:02   ` Dan Carpenter
  2014-05-19 14:40   ` Jake Edge
  2014-05-19  8:09 ` [PATCH v2 03/06] staging: crypto: skein: rename skein1024_ctx to skein_1024_ctx Anton Saraev
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

camelCase is not accepted in the Linux Kernel. To prepare skein
driver for mainline inclusion, we rename all vars to
non-camelCase equivalents.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/TODO                   |   1 -
 drivers/staging/skein/include/skein.h        | 119 ++++----
 drivers/staging/skein/include/skeinApi.h     |  28 +-
 drivers/staging/skein/include/skein_block.h  |  12 +-
 drivers/staging/skein/include/threefishApi.h |  54 ++--
 drivers/staging/skein/skein.c                | 415 ++++++++++++++-------------
 drivers/staging/skein/skeinApi.c             | 102 +++----
 drivers/staging/skein/skeinBlockNo3F.c       |  42 +--
 drivers/staging/skein/skein_block.c          | 125 ++++----
 drivers/staging/skein/threefish1024Block.c   |  76 ++---
 drivers/staging/skein/threefish256Block.c    |  28 +-
 drivers/staging/skein/threefish512Block.c    |  44 +--
 drivers/staging/skein/threefishApi.c         |  60 ++--
 13 files changed, 558 insertions(+), 548 deletions(-)

diff --git a/drivers/staging/skein/TODO b/drivers/staging/skein/TODO
index bc42fb8..88a6e81 100644
--- a/drivers/staging/skein/TODO
+++ b/drivers/staging/skein/TODO
@@ -1,6 +1,5 @@
 skein/threefish TODO
 
- - rename camelcase vars
  - rename files
  - move macros into appropriate header files
  - add / pass test vectors
diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index 15ff60f..deaa9c8 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -33,8 +33,9 @@
 #endif
 
 /* below two prototype assume we are handed aligned data */
-#define Skein_Put64_LSB_First(dst08, src64, bCnt) memcpy(dst08, src64, bCnt)
-#define Skein_Get64_LSB_First(dst64, src08, wCnt) memcpy(dst64, src08, 8*(wCnt))
+#define Skein_Put64_LSB_First(dst08, src64, b_cnt) memcpy(dst08, src64, b_cnt)
+#define Skein_Get64_LSB_First(dst64, src08, w_cnt) \
+		memcpy(dst64, src08, 8*(w_cnt))
 #define Skein_Swap64(w64)  (w64)
 
 enum {
@@ -63,82 +64,82 @@ enum {
 #define  SKEIN1024_BLOCK_BYTES  (8*SKEIN1024_STATE_WORDS)
 
 struct skein_ctx_hdr {
-	size_t  hashBitLen;		/* size of hash result, in bits */
-	size_t  bCnt;			/* current byte count in buffer b[] */
-	u64  T[SKEIN_MODIFIER_WORDS];	/* tweak: T[0]=byte cnt, T[1]=flags */
+	size_t hash_bit_len;		/* size of hash result, in bits */
+	size_t b_cnt;			/* current byte count in buffer b[] */
+	u64 T[SKEIN_MODIFIER_WORDS];	/* tweak: T[0]=byte cnt, T[1]=flags */
 };
 
 struct skein_256_ctx { /* 256-bit Skein hash context structure */
 	struct skein_ctx_hdr h;		/* common header context variables */
-	u64  X[SKEIN_256_STATE_WORDS];	/* chaining variables */
-	u8  b[SKEIN_256_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
+	u64 X[SKEIN_256_STATE_WORDS];	/* chaining variables */
+	u8 b[SKEIN_256_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
 struct skein_512_ctx { /* 512-bit Skein hash context structure */
 	struct skein_ctx_hdr h;		/* common header context variables */
-	u64  X[SKEIN_512_STATE_WORDS];	/* chaining variables */
-	u8  b[SKEIN_512_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
+	u64 X[SKEIN_512_STATE_WORDS];	/* chaining variables */
+	u8 b[SKEIN_512_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
 struct skein1024_ctx { /* 1024-bit Skein hash context structure */
 	struct skein_ctx_hdr h;		/* common header context variables */
-	u64  X[SKEIN1024_STATE_WORDS];	/* chaining variables */
-	u8  b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
+	u64 X[SKEIN1024_STATE_WORDS];	/* chaining variables */
+	u8 b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
 /* Skein APIs for (incremental) "straight hashing" */
-int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen);
-int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen);
-int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen);
+int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len);
+int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len);
+int skein_1024_init(struct skein1024_ctx *ctx, size_t hash_bit_len);
 
 int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
-		     size_t msgByteCnt);
+		     size_t msg_byte_cnt);
 int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
-		     size_t msgByteCnt);
+		     size_t msg_byte_cnt);
 int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
-		      size_t msgByteCnt);
+		      size_t msg_byte_cnt);
 
-int skein_256_final(struct skein_256_ctx *ctx, u8 *hashVal);
-int skein_512_final(struct skein_512_ctx *ctx, u8 *hashVal);
-int skein_1024_final(struct skein1024_ctx *ctx, u8 *hashVal);
+int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val);
+int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val);
+int skein_1024_final(struct skein1024_ctx *ctx, u8 *hash_val);
 
 /*
 **   Skein APIs for "extended" initialization: MAC keys, tree hashing.
 **   After an init_ext() call, just use update/final calls as with init().
 **
-**   Notes: Same parameters as _init() calls, plus treeInfo/key/keyBytes.
-**          When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL,
+**   Notes: Same parameters as _init() calls, plus tree_info/key/key_bytes.
+**          When key_bytes == 0 and tree_info == SKEIN_SEQUENTIAL,
 **              the results of init_ext() are identical to calling init().
 **          The function init() may be called once to "precompute" the IV for
-**              a given hashBitLen value, then by saving a copy of the context
+**              a given hash_bit_len value, then by saving a copy of the context
 **              the IV computation may be avoided in later calls.
 **          Similarly, the function init_ext() may be called once per MAC key
 **              to precompute the MAC IV, then a copy of the context saved and
 **              reused for each new MAC computation.
 **/
-int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
-		       u64 treeInfo, const u8 *key, size_t keyBytes);
-int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
-		       u64 treeInfo, const u8 *key, size_t keyBytes);
-int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes);
+int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
+		       u64 tree_info, const u8 *key, size_t key_bytes);
+int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
+		       u64 tree_info, const u8 *key, size_t key_bytes);
+int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
+			u64 tree_info, const u8 *key, size_t key_bytes);
 
 /*
 **   Skein APIs for MAC and tree hash:
 **      final_pad:  pad, do final block, but no OUTPUT type
 **      output:     do just the output stage
 */
-int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hashVal);
-int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hashVal);
-int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hashVal);
+int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val);
+int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val);
+int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hash_val);
 
 #ifndef SKEIN_TREE_HASH
 #define SKEIN_TREE_HASH (1)
 #endif
 #if  SKEIN_TREE_HASH
-int skein_256_output(struct skein_256_ctx *ctx, u8 *hashVal);
-int skein_512_output(struct skein_512_ctx *ctx, u8 *hashVal);
-int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal);
+int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val);
+int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val);
+int skein_1024_output(struct skein1024_ctx *ctx, u8 *hash_val);
 #endif
 
 /*****************************************************************
@@ -207,7 +208,7 @@ int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal);
 
 #define SKEIN_CFG_STR_LEN       (4*8)
 
-/* bit field definitions in config block treeInfo word */
+/* bit field definitions in config block tree_info word */
 #define SKEIN_CFG_TREE_LEAF_SIZE_POS  (0)
 #define SKEIN_CFG_TREE_NODE_SIZE_POS  (8)
 #define SKEIN_CFG_TREE_MAX_LEVEL_POS  (16)
@@ -219,46 +220,46 @@ int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal);
 #define SKEIN_CFG_TREE_MAX_LEVEL_MSK (((u64)0xFF) << \
 					SKEIN_CFG_TREE_MAX_LEVEL_POS)
 
-#define SKEIN_CFG_TREE_INFO(leaf, node, maxLvl)                   \
+#define SKEIN_CFG_TREE_INFO(leaf, node, max_lvl)                   \
 	((((u64)(leaf))   << SKEIN_CFG_TREE_LEAF_SIZE_POS) |    \
 	 (((u64)(node))   << SKEIN_CFG_TREE_NODE_SIZE_POS) |    \
-	 (((u64)(maxLvl)) << SKEIN_CFG_TREE_MAX_LEVEL_POS))
+	 (((u64)(max_lvl)) << SKEIN_CFG_TREE_MAX_LEVEL_POS))
 
-/* use as treeInfo in InitExt() call for sequential processing */
+/* use as tree_info in InitExt() call for sequential processing */
 #define SKEIN_CFG_TREE_INFO_SEQUENTIAL SKEIN_CFG_TREE_INFO(0, 0, 0)
 
 /*
 **   Skein macros for getting/setting tweak words, etc.
 **   These are useful for partial input bytes, hash tree init/update, etc.
 **/
-#define Skein_Get_Tweak(ctxPtr, TWK_NUM)          ((ctxPtr)->h.T[TWK_NUM])
-#define Skein_Set_Tweak(ctxPtr, TWK_NUM, tVal) { \
-		(ctxPtr)->h.T[TWK_NUM] = (tVal); \
+#define Skein_Get_Tweak(ctx_ptr, TWK_NUM)          ((ctx_ptr)->h.T[TWK_NUM])
+#define Skein_Set_Tweak(ctx_ptr, TWK_NUM, t_val) { \
+		(ctx_ptr)->h.T[TWK_NUM] = (t_val); \
 	}
 
-#define Skein_Get_T0(ctxPtr)     Skein_Get_Tweak(ctxPtr, 0)
-#define Skein_Get_T1(ctxPtr)     Skein_Get_Tweak(ctxPtr, 1)
-#define Skein_Set_T0(ctxPtr, T0) Skein_Set_Tweak(ctxPtr, 0, T0)
-#define Skein_Set_T1(ctxPtr, T1) Skein_Set_Tweak(ctxPtr, 1, T1)
+#define Skein_Get_T0(ctx_ptr)     Skein_Get_Tweak(ctx_ptr, 0)
+#define Skein_Get_T1(ctx_ptr)     Skein_Get_Tweak(ctx_ptr, 1)
+#define Skein_Set_T0(ctx_ptr, T0) Skein_Set_Tweak(ctx_ptr, 0, T0)
+#define Skein_Set_T1(ctx_ptr, T1) Skein_Set_Tweak(ctx_ptr, 1, T1)
 
 /* set both tweak words at once */
-#define Skein_Set_T0_T1(ctxPtr, T0, T1)           \
+#define Skein_Set_T0_T1(ctx_ptr, T0, T1)           \
 	{                                           \
-	Skein_Set_T0(ctxPtr, (T0));                  \
-	Skein_Set_T1(ctxPtr, (T1));                  \
+	Skein_Set_T0(ctx_ptr, (T0));                  \
+	Skein_Set_T1(ctx_ptr, (T1));                  \
 	}
 
-#define Skein_Set_Type(ctxPtr, BLK_TYPE)         \
-	Skein_Set_T1(ctxPtr, SKEIN_T1_BLK_TYPE_##BLK_TYPE)
+#define Skein_Set_Type(ctx_ptr, BLK_TYPE)         \
+	Skein_Set_T1(ctx_ptr, SKEIN_T1_BLK_TYPE_##BLK_TYPE)
 
 /*
  * setup for starting with a new type:
- * h.T[0]=0; h.T[1] = NEW_TYPE; h.bCnt=0;
+ * h.T[0]=0; h.T[1] = NEW_TYPE; h.b_cnt=0;
  */
-#define Skein_Start_New_Type(ctxPtr, BLK_TYPE) { \
-		Skein_Set_T0_T1(ctxPtr, 0, SKEIN_T1_FLAG_FIRST | \
+#define Skein_Start_New_Type(ctx_ptr, BLK_TYPE) { \
+		Skein_Set_T0_T1(ctx_ptr, 0, SKEIN_T1_FLAG_FIRST | \
 				SKEIN_T1_BLK_TYPE_##BLK_TYPE); \
-		(ctxPtr)->h.bCnt = 0; \
+		(ctx_ptr)->h.b_cnt = 0; \
 	}
 
 #define Skein_Clear_First_Flag(hdr) { \
@@ -278,14 +279,14 @@ int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal);
 #ifdef SKEIN_DEBUG             /* examine/display intermediate values? */
 #include "skein_debug.h"
 #else                           /* default is no callouts */
-#define Skein_Show_Block(bits, ctx, X, blkPtr, wPtr, ksEvenPtr, ksOddPtr)
+#define Skein_Show_Block(bits, ctx, X, blk_ptr, w_ptr, ks_event_ptr, ks_odd_ptr)
 #define Skein_Show_Round(bits, ctx, r, X)
 #define Skein_Show_R_Ptr(bits, ctx, r, X_ptr)
-#define Skein_Show_Final(bits, ctx, cnt, outPtr)
-#define Skein_Show_Key(bits, ctx, key, keyBytes)
+#define Skein_Show_Final(bits, ctx, cnt, out_ptr)
+#define Skein_Show_Key(bits, ctx, key, key_bytes)
 #endif
 
-#define Skein_Assert(x, retCode)/* ignore all Asserts, for performance */
+#define Skein_Assert(x, ret_code)/* ignore all Asserts, for performance */
 #define Skein_assert(x)
 
 /*****************************************************************
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skeinApi.h
index ea54546..11ecab8 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skeinApi.h
@@ -59,7 +59,7 @@ OTHER DEALINGS IN THE SOFTWARE.
  *
  * // Now update Skein with any number of message bits. A function that
  * // takes a number of bytes is also available.
- * skein_update_bits(&ctx, message, msgLength);
+ * skein_update_bits(&ctx, message, msg_length);
  *
  * // Now get the result of the Skein hash. The output buffer must be
  * // large enough to hold the request number of output bits. The application
@@ -99,8 +99,8 @@ enum skein_size {
  * structures as well.
  */
 struct skein_ctx {
-	u64 skeinSize;
-	u64  XSave[SKEIN_MAX_STATE_WORDS];   /* save area for state variables */
+	u64 skein_size;
+	u64 X_save[SKEIN_MAX_STATE_WORDS];   /* save area for state variables */
 	union {
 		struct skein_ctx_hdr h;
 		struct skein_256_ctx s256;
@@ -133,13 +133,13 @@ int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size);
  *
  * @param ctx
  *     Pointer to a Skein context.
- * @param hashBitLen
+ * @param hash_bit_len
  *     Number of MAC hash bits to compute
  * @return
  *     SKEIN_SUCESS of SKEIN_FAIL
  * @see skein_reset
  */
-int skein_init(struct skein_ctx *ctx, size_t hashBitLen);
+int skein_init(struct skein_ctx *ctx, size_t hash_bit_len);
 
 /**
  * Resets a Skein context for further use.
@@ -166,15 +166,15 @@ void skein_reset(struct skein_ctx *ctx);
  *     Pointer to an empty or preinitialized Skein MAC context
  * @param key
  *     Pointer to key bytes or NULL
- * @param keyLen
+ * @param key_len
  *     Length of the key in bytes or zero
- * @param hashBitLen
+ * @param hash_bit_len
  *     Number of MAC hash bits to compute
  * @return
  *     SKEIN_SUCESS of SKEIN_FAIL
  */
-int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
-		   size_t hashBitLen);
+int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,
+		   size_t hash_bit_len);
 
 /**
  * Update Skein with the next part of the message.
@@ -183,13 +183,13 @@ int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
  *     Pointer to initialized Skein context
  * @param msg
  *     Pointer to the message.
- * @param msgByteCnt
+ * @param msg_byte_cnt
  *     Length of the message in @b bytes
  * @return
  *     Success or error code.
  */
 int skein_update(struct skein_ctx *ctx, const u8 *msg,
-		 size_t msgByteCnt);
+		 size_t msg_byte_cnt);
 
 /**
  * Update the hash with a message bit string.
@@ -201,11 +201,11 @@ int skein_update(struct skein_ctx *ctx, const u8 *msg,
  *     Pointer to initialized Skein context
  * @param msg
  *     Pointer to the message.
- * @param msgBitCnt
+ * @param msg_bit_cnt
  *     Length of the message in @b bits.
  */
 int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
-		      size_t msgBitCnt);
+		      size_t msg_bit_cnt);
 
 /**
  * Finalize Skein and return the hash.
@@ -217,7 +217,7 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
  *     Pointer to initialized Skein context
  * @param hash
  *     Pointer to buffer that receives the hash. The buffer must be large
- *     enough to store @c hashBitLen bits.
+ *     enough to store @c hash_bit_len bits.
  * @return
  *     Success or error code.
  * @see skein_reset
diff --git a/drivers/staging/skein/include/skein_block.h b/drivers/staging/skein/include/skein_block.h
index 41cae89..ec787a3 100644
--- a/drivers/staging/skein/include/skein_block.h
+++ b/drivers/staging/skein/include/skein_block.h
@@ -12,11 +12,11 @@
 
 #include <skein.h> /* get the Skein API definitions   */
 
-void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd);
-void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd);
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-			      size_t blkCnt, size_t byteCntAdd);
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add);
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add);
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+			      size_t blk_cnt, size_t byte_cnt_add);
 
 #endif
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h
index 6cdad46..37f6e63 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefishApi.h
@@ -18,13 +18,13 @@
  *
 @code
     // Threefish cipher context data
-    struct threefish_key keyCtx;
+    struct threefish_key key_ctx;
 
     // Initialize the context
-    threefish_set_key(&keyCtx, Threefish512, key, tweak);
+    threefish_set_key(&key_ctx, Threefish512, key, tweak);
 
     // Encrypt
-    threefish_encrypt_block_bytes(&keyCtx, input, cipher);
+    threefish_encrypt_block_bytes(&key_ctx, input, cipher);
 @endcode
  */
 
@@ -51,7 +51,7 @@ enum threefish_size {
  * structures as well.
  */
 struct threefish_key {
-	u64 stateSize;
+	u64 state_size;
 	u64 key[SKEIN_MAX_STATE_WORDS+1];   /* max number of key words*/
 	u64 tweak[3];
 };
@@ -63,106 +63,106 @@ struct threefish_key {
  * the given size. The key data must have the same length (number of bits)
  * as the state size
  *
- * @param keyCtx
+ * @param key_ctx
  *     Pointer to a Threefish key structure.
  * @param size
  *     Which Skein size to use.
- * @param keyData
+ * @param key_data
  *     Pointer to the key words (word has 64 bits).
  * @param tweak
  *     Pointer to the two tweak words (word has 64 bits).
  */
-void threefish_set_key(struct threefish_key *keyCtx,
-		       enum threefish_size stateSize,
-		       u64 *keyData, u64 *tweak);
+void threefish_set_key(struct threefish_key *key_ctx,
+		       enum threefish_size state_size,
+		       u64 *key_data, u64 *tweak);
 
 /**
  * Encrypt Threefisch block (bytes).
  *
  * The buffer must have at least the same length (number of bits) aas the
- * state size for this key. The function uses the first @c stateSize bits
+ * state size for this key. The function uses the first @c state_size bits
  * of the input buffer, encrypts them and stores the result in the output
  * buffer.
  *
- * @param keyCtx
+ * @param key_ctx
  *     Pointer to a Threefish key structure.
  * @param in
  *     Poionter to plaintext data buffer.
  * @param out
  *     Pointer to cipher buffer.
  */
-void threefish_encrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 				   u8 *out);
 
 /**
  * Encrypt Threefisch block (words).
  *
  * The buffer must have at least the same length (number of bits) aas the
- * state size for this key. The function uses the first @c stateSize bits
+ * state size for this key. The function uses the first @c state_size bits
  * of the input buffer, encrypts them and stores the result in the output
  * buffer.
  *
  * The wordsize ist set to 64 bits.
  *
- * @param keyCtx
+ * @param key_ctx
  *     Pointer to a Threefish key structure.
  * @param in
  *     Poionter to plaintext data buffer.
  * @param out
  *     Pointer to cipher buffer.
  */
-void threefish_encrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out);
 
 /**
  * Decrypt Threefisch block (bytes).
  *
  * The buffer must have at least the same length (number of bits) aas the
- * state size for this key. The function uses the first @c stateSize bits
+ * state size for this key. The function uses the first @c state_size bits
  * of the input buffer, decrypts them and stores the result in the output
  * buffer
  *
- * @param keyCtx
+ * @param key_ctx
  *     Pointer to a Threefish key structure.
  * @param in
  *     Poionter to cipher data buffer.
  * @param out
  *     Pointer to plaintext buffer.
  */
-void threefish_decrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 				   u8 *out);
 
 /**
  * Decrypt Threefisch block (words).
  *
  * The buffer must have at least the same length (number of bits) aas the
- * state size for this key. The function uses the first @c stateSize bits
+ * state size for this key. The function uses the first @c state_size bits
  * of the input buffer, encrypts them and stores the result in the output
  * buffer.
  *
  * The wordsize ist set to 64 bits.
  *
- * @param keyCtx
+ * @param key_ctx
  *     Pointer to a Threefish key structure.
  * @param in
  *     Poionter to cipher data buffer.
  * @param out
  *     Pointer to plaintext buffer.
  */
-void threefish_decrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out);
 
-void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output);
-void threefish_encrypt_512(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_512(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output);
-void threefish_encrypt_1024(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_1024(struct threefish_key *key_ctx, u64 *input,
 			    u64 *output);
-void threefish_decrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output);
-void threefish_decrypt_512(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_512(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output);
-void threefish_decrypt_1024(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_1024(struct threefish_key *key_ctx, u64 *input,
 			    u64 *output);
 /**
  * @}
diff --git a/drivers/staging/skein/skein.c b/drivers/staging/skein/skein.c
index ac64d9f..d4f3534 100644
--- a/drivers/staging/skein/skein.c
+++ b/drivers/staging/skein/skein.c
@@ -21,17 +21,17 @@
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen)
+int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len)
 {
 	union {
-		u8  b[SKEIN_256_STATE_BYTES];
-		u64  w[SKEIN_256_STATE_WORDS];
+		u8 b[SKEIN_256_STATE_BYTES];
+		u64 w[SKEIN_256_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	ctx->h.hashBitLen = hashBitLen;         /* output hash bit count */
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
-	switch (hashBitLen) { /* use pre-computed values, where available */
+	switch (hash_bit_len) { /* use pre-computed values, where available */
 	case  256:
 		memcpy(ctx->X, SKEIN_256_IV_256, sizeof(ctx->X));
 		break;
@@ -56,7 +56,7 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen)
 		/* set the schema, version */
 		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hashBitLen);
+		cfg.w[1] = Skein_Swap64(hash_bit_len);
 		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
@@ -67,7 +67,7 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen)
 		skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 		break;
 	}
-	/* The chaining vars ctx->X are now initialized for hashBitLen. */
+	/* The chaining vars ctx->X are now initialized for hash_bit_len. */
 	/* Set up to process the data message portion of the hash (default) */
 	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
 
@@ -76,34 +76,34 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to skein_256_init() when keyBytes == 0 && \
- *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes)
+/* [identical to skein_256_init() when key_bytes == 0 && \
+ *	tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
+int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
+		       u64 tree_info, const u8 *key, size_t key_bytes)
 {
 	union {
 		u8  b[SKEIN_256_STATE_BYTES];
-		u64  w[SKEIN_256_STATE_WORDS];
+		u64 w[SKEIN_256_STATE_WORDS];
 	} cfg; /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(keyBytes == 0 || key != NULL, SKEIN_FAIL);
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
-	if (keyBytes == 0) { /* is there a key? */
+	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
 		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
-		ctx->h.hashBitLen = 8*sizeof(ctx->X);
+		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
 		Skein_Start_New_Type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		skein_256_update(ctx, key, keyBytes);
+		skein_256_update(ctx, key, key_bytes);
 		/* put result into cfg.b[] */
 		skein_256_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
@@ -114,18 +114,18 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
 	 * precomputed for each key)
 	 */
 	/* output hash bit count */
-	ctx->h.hashBitLen = hashBitLen;
+	ctx->h.hash_bit_len = hash_bit_len;
 	Skein_Start_New_Type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
 	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hashBitLen);
+	cfg.w[1] = Skein_Swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(treeInfo);
+	cfg.w[2] = Skein_Swap64(tree_info);
 
-	Skein_Show_Key(256, &ctx->h, key, keyBytes);
+	Skein_Show_Key(256, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
@@ -140,52 +140,53 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hashBitLen,
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
 int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
-		     size_t msgByteCnt)
+		     size_t msg_byte_cnt)
 {
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
-	if (msgByteCnt + ctx->h.bCnt > SKEIN_256_BLOCK_BYTES) {
+	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN_256_BLOCK_BYTES) {
 		/* finish up any buffered message data */
-		if (ctx->h.bCnt) {
+		if (ctx->h.b_cnt) {
 			/* # bytes free in buffer b[] */
-			n = SKEIN_256_BLOCK_BYTES - ctx->h.bCnt;
+			n = SKEIN_256_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msgByteCnt);
-				memcpy(&ctx->b[ctx->h.bCnt], msg, n);
-				msgByteCnt  -= n;
+				Skein_assert(n < msg_byte_cnt);
+				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
+				msg_byte_cnt  -= n;
 				msg         += n;
-				ctx->h.bCnt += n;
+				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.bCnt == SKEIN_256_BLOCK_BYTES);
+			Skein_assert(ctx->h.b_cnt == SKEIN_256_BLOCK_BYTES);
 			skein_256_process_block(ctx, ctx->b, 1,
 						SKEIN_256_BLOCK_BYTES);
-			ctx->h.bCnt = 0;
+			ctx->h.b_cnt = 0;
 		}
 		/*
 		 * now process any remaining full blocks, directly from input
 		 * message data
 		 */
-		if (msgByteCnt > SKEIN_256_BLOCK_BYTES) {
+		if (msg_byte_cnt > SKEIN_256_BLOCK_BYTES) {
 			/* number of full blocks to process */
-			n = (msgByteCnt-1) / SKEIN_256_BLOCK_BYTES;
+			n = (msg_byte_cnt-1) / SKEIN_256_BLOCK_BYTES;
 			skein_256_process_block(ctx, msg, n,
 						SKEIN_256_BLOCK_BYTES);
-			msgByteCnt -= n * SKEIN_256_BLOCK_BYTES;
+			msg_byte_cnt -= n * SKEIN_256_BLOCK_BYTES;
 			msg        += n * SKEIN_256_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.bCnt == 0);
+		Skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
-	if (msgByteCnt) {
-		Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES);
-		memcpy(&ctx->b[ctx->h.bCnt], msg, msgByteCnt);
-		ctx->h.bCnt += msgByteCnt;
+	if (msg_byte_cnt) {
+		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+			     SKEIN_256_BLOCK_BYTES);
+		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
+		ctx->h.b_cnt += msg_byte_cnt;
 	}
 
 	return SKEIN_SUCCESS;
@@ -193,47 +194,47 @@ int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int skein_256_final(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN_256_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN_256_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN_256_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN_256_BLOCK_BYTES - ctx->h.b_cnt);
 
 	/* process the final block */
-	skein_256_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_256_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN_256_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_256_BLOCK_BYTES;
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN_256_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(256, &ctx->h, n,
-				 hashVal+i*SKEIN_256_BLOCK_BYTES);
+				 hash_val+i*SKEIN_256_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -246,17 +247,17 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen)
+int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len)
 {
 	union {
-		u8  b[SKEIN_512_STATE_BYTES];
-		u64  w[SKEIN_512_STATE_WORDS];
+		u8 b[SKEIN_512_STATE_BYTES];
+		u64 w[SKEIN_512_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	ctx->h.hashBitLen = hashBitLen;         /* output hash bit count */
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
-	switch (hashBitLen) { /* use pre-computed values, where available */
+	switch (hash_bit_len) { /* use pre-computed values, where available */
 	case  512:
 		memcpy(ctx->X, SKEIN_512_IV_512, sizeof(ctx->X));
 		break;
@@ -281,7 +282,7 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen)
 		/* set the schema, version */
 		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hashBitLen);
+		cfg.w[1] = Skein_Swap64(hash_bit_len);
 		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
@@ -295,7 +296,7 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen)
 
 	/*
 	 * The chaining vars ctx->X are now initialized for the given
-	 * hashBitLen.
+	 * hash_bit_len.
 	 */
 	/* Set up to process the data message portion of the hash (default) */
 	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
@@ -305,34 +306,34 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to skein_512_init() when keyBytes == 0 && \
- *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
-		       u64 treeInfo, const u8 *key, size_t keyBytes)
+/* [identical to skein_512_init() when key_bytes == 0 && \
+ *	tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
+int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
+		       u64 tree_info, const u8 *key, size_t key_bytes)
 {
 	union {
-		u8  b[SKEIN_512_STATE_BYTES];
-		u64  w[SKEIN_512_STATE_WORDS];
+		u8 b[SKEIN_512_STATE_BYTES];
+		u64 w[SKEIN_512_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(keyBytes == 0 || key != NULL, SKEIN_FAIL);
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
-	if (keyBytes == 0) { /* is there a key? */
+	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
 		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
-		ctx->h.hashBitLen = 8*sizeof(ctx->X);
+		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
 		Skein_Start_New_Type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		skein_512_update(ctx, key, keyBytes);
+		skein_512_update(ctx, key, key_bytes);
 		/* put result into cfg.b[] */
 		skein_512_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
@@ -342,18 +343,18 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
 	 * build/process the config block, type == CONFIG (could be
 	 * precomputed for each key)
 	 */
-	ctx->h.hashBitLen = hashBitLen;             /* output hash bit count */
+	ctx->h.hash_bit_len = hash_bit_len;          /* output hash bit count */
 	Skein_Start_New_Type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
 	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hashBitLen);
+	cfg.w[1] = Skein_Swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(treeInfo);
+	cfg.w[2] = Skein_Swap64(tree_info);
 
-	Skein_Show_Key(512, &ctx->h, key, keyBytes);
+	Skein_Show_Key(512, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_512_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
@@ -368,52 +369,53 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hashBitLen,
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
 int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
-		     size_t msgByteCnt)
+		     size_t msg_byte_cnt)
 {
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
-	if (msgByteCnt + ctx->h.bCnt > SKEIN_512_BLOCK_BYTES) {
+	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN_512_BLOCK_BYTES) {
 		/* finish up any buffered message data */
-		if (ctx->h.bCnt) {
+		if (ctx->h.b_cnt) {
 			/* # bytes free in buffer b[] */
-			n = SKEIN_512_BLOCK_BYTES - ctx->h.bCnt;
+			n = SKEIN_512_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msgByteCnt);
-				memcpy(&ctx->b[ctx->h.bCnt], msg, n);
-				msgByteCnt  -= n;
+				Skein_assert(n < msg_byte_cnt);
+				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
+				msg_byte_cnt  -= n;
 				msg         += n;
-				ctx->h.bCnt += n;
+				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.bCnt == SKEIN_512_BLOCK_BYTES);
+			Skein_assert(ctx->h.b_cnt == SKEIN_512_BLOCK_BYTES);
 			skein_512_process_block(ctx, ctx->b, 1,
 						SKEIN_512_BLOCK_BYTES);
-			ctx->h.bCnt = 0;
+			ctx->h.b_cnt = 0;
 		}
 		/*
 		 * now process any remaining full blocks, directly from input
 		 * message data
 		 */
-		if (msgByteCnt > SKEIN_512_BLOCK_BYTES) {
+		if (msg_byte_cnt > SKEIN_512_BLOCK_BYTES) {
 			/* number of full blocks to process */
-			n = (msgByteCnt-1) / SKEIN_512_BLOCK_BYTES;
+			n = (msg_byte_cnt-1) / SKEIN_512_BLOCK_BYTES;
 			skein_512_process_block(ctx, msg, n,
 						SKEIN_512_BLOCK_BYTES);
-			msgByteCnt -= n * SKEIN_512_BLOCK_BYTES;
+			msg_byte_cnt -= n * SKEIN_512_BLOCK_BYTES;
 			msg        += n * SKEIN_512_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.bCnt == 0);
+		Skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
-	if (msgByteCnt) {
-		Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES);
-		memcpy(&ctx->b[ctx->h.bCnt], msg, msgByteCnt);
-		ctx->h.bCnt += msgByteCnt;
+	if (msg_byte_cnt) {
+		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+			     SKEIN_512_BLOCK_BYTES);
+		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
+		ctx->h.b_cnt += msg_byte_cnt;
 	}
 
 	return SKEIN_SUCCESS;
@@ -421,47 +423,47 @@ int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int skein_512_final(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN_512_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN_512_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN_512_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN_512_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN_512_BLOCK_BYTES - ctx->h.b_cnt);
 
 	/* process the final block */
-	skein_512_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_512_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN_512_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_512_BLOCK_BYTES;
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN_512_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(512, &ctx->h, n,
-				 hashVal+i*SKEIN_512_BLOCK_BYTES);
+				 hash_val+i*SKEIN_512_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -474,17 +476,17 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen)
+int skein_1024_init(struct skein1024_ctx *ctx, size_t hash_bit_len)
 {
 	union {
-		u8  b[SKEIN1024_STATE_BYTES];
-		u64  w[SKEIN1024_STATE_WORDS];
+		u8 b[SKEIN1024_STATE_BYTES];
+		u64 w[SKEIN1024_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	ctx->h.hashBitLen = hashBitLen;         /* output hash bit count */
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
-	switch (hashBitLen) { /* use pre-computed values, where available */
+	switch (hash_bit_len) { /* use pre-computed values, where available */
 	case  512:
 		memcpy(ctx->X, SKEIN1024_IV_512, sizeof(ctx->X));
 		break;
@@ -506,7 +508,7 @@ int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen)
 		/* set the schema, version */
 		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hashBitLen);
+		cfg.w[1] = Skein_Swap64(hash_bit_len);
 		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
@@ -518,7 +520,7 @@ int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen)
 		break;
 	}
 
-	/* The chaining vars ctx->X are now initialized for the hashBitLen. */
+	/* The chaining vars ctx->X are now initialized for the hash_bit_len. */
 	/* Set up to process the data message portion of the hash (default) */
 	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
 
@@ -527,34 +529,34 @@ int skein_1024_init(struct skein1024_ctx *ctx, size_t hashBitLen)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a MAC and/or tree hash operation */
-/* [identical to skein_1024_init() when keyBytes == 0 && \
- *	treeInfo == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
-			u64 treeInfo, const u8 *key, size_t keyBytes)
+/* [identical to skein_1024_init() when key_bytes == 0 && \
+ *	tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
+int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
+			u64 tree_info, const u8 *key, size_t key_bytes)
 {
 	union {
-		u8  b[SKEIN1024_STATE_BYTES];
-		u64  w[SKEIN1024_STATE_WORDS];
+		u8 b[SKEIN1024_STATE_BYTES];
+		u64 w[SKEIN1024_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hashBitLen > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(keyBytes == 0 || key != NULL, SKEIN_FAIL);
+	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
-	if (keyBytes == 0) { /* is there a key? */
+	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
 		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
-		ctx->h.hashBitLen = 8*sizeof(ctx->X);
+		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
 		Skein_Start_New_Type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
-		skein_1024_update(ctx, key, keyBytes);
+		skein_1024_update(ctx, key, key_bytes);
 		/* put result into cfg.b[] */
 		skein_1024_final_pad(ctx, cfg.b);
 		/* copy over into ctx->X[] */
@@ -565,18 +567,18 @@ int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
 	 * precomputed for each key)
 	 */
 	/* output hash bit count */
-	ctx->h.hashBitLen = hashBitLen;
+	ctx->h.hash_bit_len = hash_bit_len;
 	Skein_Start_New_Type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
 	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hashBitLen);
+	cfg.w[1] = Skein_Swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(treeInfo);
+	cfg.w[2] = Skein_Swap64(tree_info);
 
-	Skein_Show_Key(1024, &ctx->h, key, keyBytes);
+	Skein_Show_Key(1024, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_1024_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
@@ -591,52 +593,53 @@ int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hashBitLen,
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
 int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
-		      size_t msgByteCnt)
+		      size_t msg_byte_cnt)
 {
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
-	if (msgByteCnt + ctx->h.bCnt > SKEIN1024_BLOCK_BYTES) {
+	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN1024_BLOCK_BYTES) {
 		/* finish up any buffered message data */
-		if (ctx->h.bCnt) {
+		if (ctx->h.b_cnt) {
 			/* # bytes free in buffer b[] */
-			n = SKEIN1024_BLOCK_BYTES - ctx->h.bCnt;
+			n = SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msgByteCnt);
-				memcpy(&ctx->b[ctx->h.bCnt], msg, n);
-				msgByteCnt  -= n;
+				Skein_assert(n < msg_byte_cnt);
+				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
+				msg_byte_cnt  -= n;
 				msg         += n;
-				ctx->h.bCnt += n;
+				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.bCnt == SKEIN1024_BLOCK_BYTES);
+			Skein_assert(ctx->h.b_cnt == SKEIN1024_BLOCK_BYTES);
 			skein_1024_process_block(ctx, ctx->b, 1,
 						 SKEIN1024_BLOCK_BYTES);
-			ctx->h.bCnt = 0;
+			ctx->h.b_cnt = 0;
 		}
 		/*
 		 * now process any remaining full blocks, directly from input
 		 * message data
 		 */
-		if (msgByteCnt > SKEIN1024_BLOCK_BYTES) {
+		if (msg_byte_cnt > SKEIN1024_BLOCK_BYTES) {
 			/* number of full blocks to process */
-			n = (msgByteCnt-1) / SKEIN1024_BLOCK_BYTES;
+			n = (msg_byte_cnt-1) / SKEIN1024_BLOCK_BYTES;
 			skein_1024_process_block(ctx, msg, n,
 						 SKEIN1024_BLOCK_BYTES);
-			msgByteCnt -= n * SKEIN1024_BLOCK_BYTES;
+			msg_byte_cnt -= n * SKEIN1024_BLOCK_BYTES;
 			msg        += n * SKEIN1024_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.bCnt == 0);
+		Skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
-	if (msgByteCnt) {
-		Skein_assert(msgByteCnt + ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES);
-		memcpy(&ctx->b[ctx->h.bCnt], msg, msgByteCnt);
-		ctx->h.bCnt += msgByteCnt;
+	if (msg_byte_cnt) {
+		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+			     SKEIN1024_BLOCK_BYTES);
+		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
+		ctx->h.b_cnt += msg_byte_cnt;
 	}
 
 	return SKEIN_SUCCESS;
@@ -644,47 +647,47 @@ int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int skein_1024_final(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_final(struct skein1024_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN1024_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN1024_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN1024_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN1024_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt);
 
 	/* process the final block */
-	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN1024_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN1024_BLOCK_BYTES;
 		if (n >= SKEIN1024_BLOCK_BYTES)
 			n  = SKEIN1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN1024_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN1024_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(1024, &ctx->h, n,
-				 hashVal+i*SKEIN1024_BLOCK_BYTES);
+				 hash_val+i*SKEIN1024_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -696,66 +699,66 @@ int skein_1024_final(struct skein1024_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN_256_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN_256_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN_256_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN_256_BLOCK_BYTES - ctx->h.b_cnt);
 	/* process the final block */
-	skein_256_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_256_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN_256_BLOCK_BYTES);
+	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN_256_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN_512_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN_512_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN_512_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN_512_BLOCK_BYTES - ctx->h.b_cnt);
 	/* process the final block */
-	skein_512_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_512_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN_512_BLOCK_BYTES);
+	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN_512_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.bCnt < SKEIN1024_BLOCK_BYTES)
-		memset(&ctx->b[ctx->h.bCnt], 0,
-			SKEIN1024_BLOCK_BYTES - ctx->h.bCnt);
+	if (ctx->h.b_cnt < SKEIN1024_BLOCK_BYTES)
+		memset(&ctx->b[ctx->h.b_cnt], 0,
+			SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt);
 	/* process the final block */
-	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.bCnt);
+	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hashVal, ctx->X, SKEIN1024_BLOCK_BYTES);
+	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN1024_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
@@ -763,37 +766,37 @@ int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hashVal)
 #if SKEIN_TREE_HASH
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int skein_256_output(struct skein_256_ctx *ctx, u8 *hashVal)
+int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN_256_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN_256_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_256_BLOCK_BYTES;
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN_256_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(256, &ctx->h, n,
-				 hashVal+i*SKEIN_256_BLOCK_BYTES);
+				 hash_val+i*SKEIN_256_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -802,37 +805,37 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int skein_512_output(struct skein_512_ctx *ctx, u8 *hashVal)
+int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN_512_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN_512_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_512_BLOCK_BYTES;
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN_512_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(256, &ctx->h, n,
-				 hashVal+i*SKEIN_512_BLOCK_BYTES);
+				 hash_val+i*SKEIN_512_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -841,37 +844,37 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hashVal)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int skein_1024_output(struct skein1024_ctx *ctx, u8 *hashVal)
+int skein_1024_output(struct skein1024_ctx *ctx, u8 *hash_val)
 {
-	size_t i, n, byteCnt;
+	size_t i, n, byte_cnt;
 	u64 X[SKEIN1024_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.bCnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
-	byteCnt = (ctx->h.hashBitLen + 7) >> 3;
+	byte_cnt = (ctx->h.hash_bit_len + 7) >> 3;
 
 	/* run Threefish in "counter mode" to generate output */
 	/* zero out b[], so it can hold the counter */
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byteCnt; i++) {
+	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
 		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
 		Skein_Start_New_Type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byteCnt - i*SKEIN1024_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN1024_BLOCK_BYTES;
 		if (n >= SKEIN1024_BLOCK_BYTES)
 			n  = SKEIN1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hashVal+i*SKEIN1024_BLOCK_BYTES, ctx->X,
+		Skein_Put64_LSB_First(hash_val+i*SKEIN1024_BLOCK_BYTES, ctx->X,
 				      n);
 		Skein_Show_Final(256, &ctx->h, n,
-				 hashVal+i*SKEIN1024_BLOCK_BYTES);
+				 hash_val+i*SKEIN1024_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
diff --git a/drivers/staging/skein/skeinApi.c b/drivers/staging/skein/skeinApi.c
index c4f5333..3426392 100644
--- a/drivers/staging/skein/skeinApi.c
+++ b/drivers/staging/skein/skeinApi.c
@@ -32,17 +32,17 @@ int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size)
 	Skein_Assert(ctx && size, SKEIN_FAIL);
 
 	memset(ctx , 0, sizeof(struct skein_ctx));
-	ctx->skeinSize = size;
+	ctx->skein_size = size;
 
 	return SKEIN_SUCCESS;
 }
 
-int skein_init(struct skein_ctx *ctx, size_t hashBitLen)
+int skein_init(struct skein_ctx *ctx, size_t hash_bit_len)
 {
 	int ret = SKEIN_FAIL;
-	size_t Xlen = 0;
+	size_t X_len = 0;
 	u64 *X = NULL;
-	u64 treeInfo = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
+	u64 tree_info = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
 
 	Skein_Assert(ctx, SKEIN_FAIL);
 	/*
@@ -51,83 +51,83 @@ int skein_init(struct skein_ctx *ctx, size_t hashBitLen)
 	 * memory available.  The beauty of C :-) .
 	 */
 	X = ctx->m.s256.X;
-	Xlen = ctx->skeinSize/8;
+	X_len = ctx->skein_size/8;
 	/*
 	 * If size is the same and hash bit length is zero then reuse
 	 * the save chaining variables.
 	 */
-	switch (ctx->skeinSize) {
+	switch (ctx->skein_size) {
 	case Skein256:
-		ret = skein_256_init_ext(&ctx->m.s256, hashBitLen,
-					 treeInfo, NULL, 0);
+		ret = skein_256_init_ext(&ctx->m.s256, hash_bit_len,
+					 tree_info, NULL, 0);
 		break;
 	case Skein512:
-		ret = skein_512_init_ext(&ctx->m.s512, hashBitLen,
-					 treeInfo, NULL, 0);
+		ret = skein_512_init_ext(&ctx->m.s512, hash_bit_len,
+					 tree_info, NULL, 0);
 		break;
 	case Skein1024:
-		ret = skein_1024_init_ext(&ctx->m.s1024, hashBitLen,
-					  treeInfo, NULL, 0);
+		ret = skein_1024_init_ext(&ctx->m.s1024, hash_bit_len,
+					  tree_info, NULL, 0);
 		break;
 	}
 
 	if (ret == SKEIN_SUCCESS) {
 		/*
 		 * Save chaining variables for this combination of size and
-		 * hashBitLen
+		 * hash_bit_len
 		 */
-		memcpy(ctx->XSave, X, Xlen);
+		memcpy(ctx->X_save, X, X_len);
 	}
 	return ret;
 }
 
-int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
-		   size_t hashBitLen)
+int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,
+		   size_t hash_bit_len)
 {
 	int ret = SKEIN_FAIL;
 	u64 *X = NULL;
-	size_t Xlen = 0;
-	u64 treeInfo = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
+	size_t X_len = 0;
+	u64 tree_info = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
 
 	Skein_Assert(ctx, SKEIN_FAIL);
 
 	X = ctx->m.s256.X;
-	Xlen = ctx->skeinSize/8;
+	X_len = ctx->skein_size/8;
 
-	Skein_Assert(hashBitLen, SKEIN_BAD_HASHLEN);
+	Skein_Assert(hash_bit_len, SKEIN_BAD_HASHLEN);
 
-	switch (ctx->skeinSize) {
+	switch (ctx->skein_size) {
 	case Skein256:
-		ret = skein_256_init_ext(&ctx->m.s256, hashBitLen,
-					 treeInfo,
-					 (const u8 *)key, keyLen);
+		ret = skein_256_init_ext(&ctx->m.s256, hash_bit_len,
+					 tree_info,
+					 (const u8 *)key, key_len);
 
 		break;
 	case Skein512:
-		ret = skein_512_init_ext(&ctx->m.s512, hashBitLen,
-					 treeInfo,
-					 (const u8 *)key, keyLen);
+		ret = skein_512_init_ext(&ctx->m.s512, hash_bit_len,
+					 tree_info,
+					 (const u8 *)key, key_len);
 		break;
 	case Skein1024:
-		ret = skein_1024_init_ext(&ctx->m.s1024, hashBitLen,
-					  treeInfo,
-					  (const u8 *)key, keyLen);
+		ret = skein_1024_init_ext(&ctx->m.s1024, hash_bit_len,
+					  tree_info,
+					  (const u8 *)key, key_len);
 
 		break;
 	}
 	if (ret == SKEIN_SUCCESS) {
 		/*
 		 * Save chaining variables for this combination of key,
-		 * keyLen, hashBitLen
+		 * key_len, hash_bit_len
 		 */
-		memcpy(ctx->XSave, X, Xlen);
+		memcpy(ctx->X_save, X, X_len);
 	}
 	return ret;
 }
 
 void skein_reset(struct skein_ctx *ctx)
 {
-	size_t Xlen = 0;
+	size_t X_len = 0;
 	u64 *X = NULL;
 
 	/*
@@ -136,32 +136,33 @@ void skein_reset(struct skein_ctx *ctx)
 	 * memory available.  The beautiy of C :-) .
 	 */
 	X = ctx->m.s256.X;
-	Xlen = ctx->skeinSize/8;
+	X_len = ctx->skein_size/8;
 	/* Restore the chaing variable, reset byte counter */
-	memcpy(X, ctx->XSave, Xlen);
+	memcpy(X, ctx->X_save, X_len);
 
 	/* Setup context to process the message */
 	Skein_Start_New_Type(&ctx->m, MSG);
 }
 
 int skein_update(struct skein_ctx *ctx, const u8 *msg,
-		 size_t msgByteCnt)
+		 size_t msg_byte_cnt)
 {
 	int ret = SKEIN_FAIL;
+
 	Skein_Assert(ctx, SKEIN_FAIL);
 
-	switch (ctx->skeinSize) {
+	switch (ctx->skein_size) {
 	case Skein256:
 		ret = skein_256_update(&ctx->m.s256, (const u8 *)msg,
-				       msgByteCnt);
+				       msg_byte_cnt);
 		break;
 	case Skein512:
 		ret = skein_512_update(&ctx->m.s512, (const u8 *)msg,
-				       msgByteCnt);
+				       msg_byte_cnt);
 		break;
 	case Skein1024:
 		ret = skein_1024_update(&ctx->m.s1024, (const u8 *)msg,
-					msgByteCnt);
+					msg_byte_cnt);
 		break;
 	}
 	return ret;
@@ -169,7 +170,7 @@ int skein_update(struct skein_ctx *ctx, const u8 *msg,
 }
 
 int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
-		      size_t msgBitCnt)
+		      size_t msg_bit_cnt)
 {
 	/*
 	 * I've used the bit pad implementation from skein_test.c (see NIST CD)
@@ -185,13 +186,13 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
 	 * assert an error
 	 */
 	Skein_Assert((ctx->m.h.T[1] & SKEIN_T1_FLAG_BIT_PAD) == 0 ||
-			msgBitCnt == 0, SKEIN_FAIL);
+			msg_bit_cnt == 0, SKEIN_FAIL);
 
 	/* if number of bits is a multiple of bytes - that's easy */
-	if ((msgBitCnt & 0x7) == 0)
-		return skein_update(ctx, msg, msgBitCnt >> 3);
+	if ((msg_bit_cnt & 0x7) == 0)
+		return skein_update(ctx, msg, msg_bit_cnt >> 3);
 
-	skein_update(ctx, msg, (msgBitCnt >> 3) + 1);
+	skein_update(ctx, msg, (msg_bit_cnt >> 3) + 1);
 
 	/*
 	 * The next line rely on the fact that the real Skein contexts
@@ -199,18 +200,18 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
 	 * Skein's real partial block buffer.
 	 * If this layout ever changes we have to adapt this as well.
 	 */
-	up = (u8 *)ctx->m.s256.X + ctx->skeinSize / 8;
+	up = (u8 *)ctx->m.s256.X + ctx->skein_size / 8;
 
 	/* set tweak flag for the skein_final call */
 	Skein_Set_Bit_Pad_Flag(ctx->m.h);
 
 	/* now "pad" the final partial byte the way NIST likes */
-	/* get the bCnt value (same location for all block sizes) */
-	length = ctx->m.h.bCnt;
+	/* get the b_cnt value (same location for all block sizes) */
+	length = ctx->m.h.b_cnt;
 	/* internal sanity check: there IS a partial byte in the buffer! */
 	Skein_assert(length != 0);
 	/* partial byte bit mask */
-	mask = (u8) (1u << (7 - (msgBitCnt & 7)));
+	mask = (u8) (1u << (7 - (msg_bit_cnt & 7)));
 	/* apply bit padding on final byte (in the buffer) */
 	up[length-1]  = (u8)((up[length-1] & (0-mask))|mask);
 
@@ -220,9 +221,10 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
 int skein_final(struct skein_ctx *ctx, u8 *hash)
 {
 	int ret = SKEIN_FAIL;
+
 	Skein_Assert(ctx, SKEIN_FAIL);
 
-	switch (ctx->skeinSize) {
+	switch (ctx->skein_size) {
 	case Skein256:
 		ret = skein_256_final(&ctx->m.s256, (u8 *)hash);
 		break;
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skeinBlockNo3F.c
index 0acb617..041e5ae 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skeinBlockNo3F.c
@@ -5,8 +5,8 @@
 
 
 /*****************************  Skein_256 ******************************/
-void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd)
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -14,12 +14,12 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 	u64  w[SKEIN_256_STATE_WORDS]; /* local copy of input block */
 	u64 words[3];
 
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
 	do  {
-		u64 carry = byteCntAdd;
+		u64 carry = byte_cnt_add;
 
 		words[0] = tweak[0] & 0xffffffffL;
 		words[1] = ((tweak[0] >> 32) & 0xffffffffL);
@@ -37,11 +37,11 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 		threefish_set_key(&key, Threefish256, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, SKEIN_256_STATE_WORDS);
+		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_256_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
-		blkPtr += SKEIN_256_BLOCK_BYTES;
+		blk_ptr += SKEIN_256_BLOCK_BYTES;
 
 		/* do the final "feedforward" xor, update ctx chaining vars */
 		ctx->X[0] = ctx->X[0] ^ w[0];
@@ -50,14 +50,14 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 		ctx->X[3] = ctx->X[3] ^ w[3];
 
 		tweak[1] &= ~SKEIN_T1_FLAG_FIRST;
-	} while (--blkCnt);
+	} while (--blk_cnt);
 
 	ctx->h.T[0] = tweak[0];
 	ctx->h.T[1] = tweak[1];
 }
 
-void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd)
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -65,12 +65,12 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 	u64 words[3];
 	u64  w[SKEIN_512_STATE_WORDS]; /* local copy of input block */
 
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
 	do  {
-		u64 carry = byteCntAdd;
+		u64 carry = byte_cnt_add;
 
 		words[0] = tweak[0] & 0xffffffffL;
 		words[1] = ((tweak[0] >> 32) & 0xffffffffL);
@@ -88,11 +88,11 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		threefish_set_key(&key, Threefish512, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, SKEIN_512_STATE_WORDS);
+		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_512_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
-		blkPtr += SKEIN_512_BLOCK_BYTES;
+		blk_ptr += SKEIN_512_BLOCK_BYTES;
 
 		/* do the final "feedforward" xor, update ctx chaining vars */
 		ctx->X[0] = ctx->X[0] ^ w[0];
@@ -105,14 +105,14 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		ctx->X[7] = ctx->X[7] ^ w[7];
 
 		tweak[1] &= ~SKEIN_T1_FLAG_FIRST;
-	} while (--blkCnt);
+	} while (--blk_cnt);
 
 	ctx->h.T[0] = tweak[0];
 	ctx->h.T[1] = tweak[1];
 }
 
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-			      size_t blkCnt, size_t byteCntAdd)
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+			      size_t blk_cnt, size_t byte_cnt_add)
 {
 	struct threefish_key key;
 	u64 tweak[2];
@@ -120,12 +120,12 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 	u64 words[3];
 	u64  w[SKEIN1024_STATE_WORDS]; /* local copy of input block */
 
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
 	do  {
-		u64 carry = byteCntAdd;
+		u64 carry = byte_cnt_add;
 
 		words[0] = tweak[0] & 0xffffffffL;
 		words[1] = ((tweak[0] >> 32) & 0xffffffffL);
@@ -143,11 +143,11 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		threefish_set_key(&key, Threefish1024, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, SKEIN1024_STATE_WORDS);
+		Skein_Get64_LSB_First(w, blk_ptr, SKEIN1024_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
-		blkPtr += SKEIN1024_BLOCK_BYTES;
+		blk_ptr += SKEIN1024_BLOCK_BYTES;
 
 		/* do the final "feedforward" xor, update ctx chaining vars */
 		ctx->X[0]  = ctx->X[0]  ^ w[0];
@@ -168,7 +168,7 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		ctx->X[15] = ctx->X[15] ^ w[15];
 
 		tweak[1] &= ~SKEIN_T1_FLAG_FIRST;
-	} while (--blkCnt);
+	} while (--blk_cnt);
 
 	ctx->h.T[0] = tweak[0];
 	ctx->h.T[1] = tweak[1];
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 1195aec..a51aa57 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -39,8 +39,8 @@
 
 /*****************************  Skein_256 ******************************/
 #if !(SKEIN_USE_ASM & 256)
-void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd)
+void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add)
 	{ /* do it in C */
 	enum {
 		WCNT = SKEIN_256_STATE_WORDS
@@ -66,10 +66,11 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 	u64  X0, X1, X2, X3; /* local copy of context vars, for speed */
 	u64  w[WCNT]; /* local copy of input block */
 #ifdef SKEIN_DEBUG
-	const u64 *Xptr[4]; /* use for debugging (help cc put Xn in regs) */
-	Xptr[0] = &X0;  Xptr[1] = &X1;  Xptr[2] = &X2;  Xptr[3] = &X3;
+	const u64 *X_ptr[4]; /* use for debugging (help cc put Xn in regs) */
+
+	X_ptr[0] = &X0;  X_ptr[1] = &X1;  X_ptr[2] = &X2;  X_ptr[3] = &X3;
 #endif
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -77,7 +78,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 		 * this implementation only supports 2**64 input bytes
 		 * (no carry out here)
 		 */
-		ts[0] += byteCntAdd; /* update processed length */
+		ts[0] += byte_cnt_add; /* update processed length */
 
 		/* precompute the key schedule for this block */
 		ks[0] = ctx->X[0];
@@ -89,9 +90,9 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 		ts[2] = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, WCNT);
+		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
 		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blkPtr, w, ks, ts);
+		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X0 = w[0] + ks[0]; /* do the first full key injection */
 		X1 = w[1] + ks[1] + ts[0];
@@ -100,23 +101,23 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
 
 		/* show starting state values */
 		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
-				 Xptr);
+				 X_ptr);
 
-		blkPtr += SKEIN_256_BLOCK_BYTES;
+		blk_ptr += SKEIN_256_BLOCK_BYTES;
 
 		/* run the rounds */
 
-#define Round256(p0, p1, p2, p3, ROT, rNum)                              \
+#define Round256(p0, p1, p2, p3, ROT, r_num)                              \
 do { \
 	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
 	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
 } while (0)
 
 #if SKEIN_UNROLL_256 == 0
-#define R256(p0, p1, p2, p3, ROT, rNum) /* fully unrolled */ \
+#define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \
 do { \
-	Round256(p0, p1, p2, p3, ROT, rNum) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rNum, Xptr); \
+	Round256(p0, p1, p2, p3, ROT, r_num); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
 } while (0)
 
 #define I256(R) \
@@ -126,13 +127,13 @@ do { \
 	X1   += ks[((R)+2) % 5] + ts[((R)+1) % 3]; \
 	X2   += ks[((R)+3) % 5] + ts[((R)+2) % 3]; \
 	X3   += ks[((R)+4) % 5] +     (R)+1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
-#define R256(p0, p1, p2, p3, ROT, rNum) \
+#define R256(p0, p1, p2, p3, ROT, r_num) \
 do { \
-	Round256(p0, p1, p2, p3, ROT, rNum) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rNum, Xptr); \
+	Round256(p0, p1, p2, p3, ROT, r_num); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
 } while (0)
 
 #define I256(R) \
@@ -145,7 +146,7 @@ do { \
 	/* rotate key schedule */ \
 	ks[r + (R) + 4]   = ks[r + (R) - 1]; \
 	ts[r + (R) + 2]   = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 	for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_256)
@@ -227,7 +228,7 @@ do { \
 		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-	} while (--blkCnt);
+	} while (--blk_cnt);
 	ctx->h.T[0] = ts[0];
 	ctx->h.T[1] = ts[1];
 }
@@ -247,8 +248,8 @@ unsigned int skein_256_unroll_cnt(void)
 
 /*****************************  Skein_512 ******************************/
 #if !(SKEIN_USE_ASM & 512)
-void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
-			     size_t blkCnt, size_t byteCntAdd)
+void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
+			     size_t blk_cnt, size_t byte_cnt_add)
 { /* do it in C */
 	enum {
 		WCNT = SKEIN_512_STATE_WORDS
@@ -274,12 +275,13 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 	u64  X0, X1, X2, X3, X4, X5, X6, X7; /* local copies, for speed */
 	u64  w[WCNT]; /* local copy of input block */
 #ifdef SKEIN_DEBUG
-	const u64 *Xptr[8]; /* use for debugging (help cc put Xn in regs) */
-	Xptr[0] = &X0;  Xptr[1] = &X1;  Xptr[2] = &X2;  Xptr[3] = &X3;
-	Xptr[4] = &X4;  Xptr[5] = &X5;  Xptr[6] = &X6;  Xptr[7] = &X7;
+	const u64 *X_ptr[8]; /* use for debugging (help cc put Xn in regs) */
+
+	X_ptr[0] = &X0;  X_ptr[1] = &X1;  X_ptr[2] = &X2;  X_ptr[3] = &X3;
+	X_ptr[4] = &X4;  X_ptr[5] = &X5;  X_ptr[6] = &X6;  X_ptr[7] = &X7;
 #endif
 
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -287,7 +289,7 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		 * this implementation only supports 2**64 input bytes
 		 * (no carry out here)
 		 */
-		ts[0] += byteCntAdd; /* update processed length */
+		ts[0] += byte_cnt_add; /* update processed length */
 
 		/* precompute the key schedule for this block */
 		ks[0] = ctx->X[0];
@@ -304,9 +306,9 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		ts[2] = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, WCNT);
+		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
 		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blkPtr, w, ks, ts);
+		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X0   = w[0] + ks[0]; /* do the first full key injection */
 		X1   = w[1] + ks[1];
@@ -317,12 +319,12 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blkPtr,
 		X6   = w[6] + ks[6] + ts[1];
 		X7   = w[7] + ks[7];
 
-		blkPtr += SKEIN_512_BLOCK_BYTES;
+		blk_ptr += SKEIN_512_BLOCK_BYTES;
 
 		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
-				 Xptr);
+				 X_ptr);
 		/* run the rounds */
-#define Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, rNum) \
+#define Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
 do { \
 	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
 	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
@@ -331,10 +333,10 @@ do { \
 } while (0)
 
 #if SKEIN_UNROLL_512 == 0
-#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, rNum) /* unrolled */ \
+#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) /* unrolled */ \
 do { \
-	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, rNum) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rNum, Xptr); \
+	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
 } while (0)
 
 #define I512(R) \
@@ -348,13 +350,13 @@ do { \
 	X5   += ks[((R) + 6) % 9] + ts[((R) + 1) % 3]; \
 	X6   += ks[((R) + 7) % 9] + ts[((R) + 2) % 3]; \
 	X7   += ks[((R) + 8) % 9] +     (R) + 1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
-#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, rNum) \
+#define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
 do { \
-	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, rNum) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rNum, Xptr); \
+	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
 } while (0)
 
 #define I512(R) \
@@ -371,7 +373,7 @@ do { \
 	/* rotate key schedule */ \
 	ks[r +         (R) + 8] = ks[r + (R) - 1]; \
 	ts[r +         (R) + 2] = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 		for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_512)
@@ -457,7 +459,7 @@ do { \
 		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-	} while (--blkCnt);
+	} while (--blk_cnt);
 	ctx->h.T[0] = ts[0];
 	ctx->h.T[1] = ts[1];
 }
@@ -477,8 +479,8 @@ unsigned int skein_512_unroll_cnt(void)
 
 /*****************************  Skein1024 ******************************/
 #if !(SKEIN_USE_ASM & 1024)
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
-			      size_t blkCnt, size_t byteCntAdd)
+void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+			      size_t blk_cnt, size_t byte_cnt_add)
 { /* do it in C, always looping (unrolled is bigger AND slower!) */
 	enum {
 		WCNT = SKEIN1024_STATE_WORDS
@@ -507,14 +509,17 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 	     X08, X09, X10, X11, X12, X13, X14, X15;
 	u64  w[WCNT]; /* local copy of input block */
 #ifdef SKEIN_DEBUG
-	const u64 *Xptr[16]; /* use for debugging (help cc put Xn in regs) */
-	Xptr[0]  = &X00;  Xptr[1]  = &X01;  Xptr[2]  = &X02;  Xptr[3]  = &X03;
-	Xptr[4]  = &X04;  Xptr[5]  = &X05;  Xptr[6]  = &X06;  Xptr[7]  = &X07;
-	Xptr[8]  = &X08;  Xptr[9]  = &X09;  Xptr[10] = &X10;  Xptr[11] = &X11;
-	Xptr[12] = &X12;  Xptr[13] = &X13;  Xptr[14] = &X14;  Xptr[15] = &X15;
+	const u64 *X_ptr[16]; /* use for debugging (help cc put Xn in regs) */
+
+	X_ptr[0]  = &X00;  X_ptr[1]  = &X01;  X_ptr[2]  = &X02;
+	X_ptr[3]  = &X03;  X_ptr[4]  = &X04;  X_ptr[5]  = &X05;
+	X_ptr[6]  = &X06;  X_ptr[7]  = &X07;  X_ptr[8]  = &X08;
+	X_ptr[9]  = &X09;  X_ptr[10] = &X10;  X_ptr[11] = &X11;
+	X_ptr[12] = &X12;  X_ptr[13] = &X13;  X_ptr[14] = &X14;
+	X_ptr[15] = &X15;
 #endif
 
-	Skein_assert(blkCnt != 0); /* never call with blkCnt == 0! */
+	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -522,7 +527,7 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		 * this implementation only supports 2**64 input bytes
 		 * (no carry out here)
 		 */
-		ts[0] += byteCntAdd; /* update processed length */
+		ts[0] += byte_cnt_add; /* update processed length */
 
 		/* precompute the key schedule for this block */
 		ks[0]  = ctx->X[0];
@@ -549,9 +554,9 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		ts[2]  = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blkPtr, WCNT);
+		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
 		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blkPtr, w, ks, ts);
+		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X00    =  w[0] +  ks[0]; /* do the first full key injection */
 		X01    =  w[1] +  ks[1];
@@ -571,10 +576,10 @@ void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blkPtr,
 		X15    = w[15] + ks[15];
 
 		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
-				 Xptr);
+				 X_ptr);
 
 #define Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
-			pF, ROT, rNum) \
+			pF, ROT, r_num) \
 do { \
 	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0;   \
 	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2;   \
@@ -592,7 +597,7 @@ do { \
 do { \
 	Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
 			pF, ROT, rn) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rn, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rn, X_ptr); \
 } while (0)
 
 #define I1024(R) \
@@ -614,7 +619,7 @@ do { \
 	X13   += ks[((R) + 14) % 17] + ts[((R) + 1) % 3]; \
 	X14   += ks[((R) + 15) % 17] + ts[((R) + 2) % 3]; \
 	X15   += ks[((R) + 16) % 17] +     (R) + 1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
 #define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \
@@ -622,7 +627,7 @@ do { \
 do { \
 	Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
 			pF, ROT, rn) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rn, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rn, X_ptr); \
 } while (0)
 
 #define I1024(R) \
@@ -647,7 +652,7 @@ do { \
 	/* rotate key schedule */ \
 	ks[r  +         (R) + 16] = ks[r + (R) - 1]; \
 	ts[r  +         (R) +  2] = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITSi, &ctx->h, SKEIN_RND_KEY_INJECT, Xptr); \
+	Skein_Show_R_Ptr(BLK_BITSi, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 		for (r = 1; r <= 2 * RCNT; r += 2 * SKEIN_UNROLL_1024)
@@ -750,8 +755,8 @@ do { \
 		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-		blkPtr += SKEIN1024_BLOCK_BYTES;
-	} while (--blkCnt);
+		blk_ptr += SKEIN1024_BLOCK_BYTES;
+	} while (--blk_cnt);
 	ctx->h.T[0] = ts[0];
 	ctx->h.T[1] = ts[1];
 }
diff --git a/drivers/staging/skein/threefish1024Block.c b/drivers/staging/skein/threefish1024Block.c
index 113019f..827ce1a 100644
--- a/drivers/staging/skein/threefish1024Block.c
+++ b/drivers/staging/skein/threefish1024Block.c
@@ -2,28 +2,28 @@
 #include <threefishApi.h>
 
 
-void threefish_encrypt_1024(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_1024(struct threefish_key *key_ctx, u64 *input,
 			    u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3],
-	  b4 = input[4], b5 = input[5],
-	  b6 = input[6], b7 = input[7],
-	  b8 = input[8], b9 = input[9],
-	  b10 = input[10], b11 = input[11],
-	  b12 = input[12], b13 = input[13],
-	  b14 = input[14], b15 = input[15];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4], k5 = keyCtx->key[5],
-	  k6 = keyCtx->key[6], k7 = keyCtx->key[7],
-	  k8 = keyCtx->key[8], k9 = keyCtx->key[9],
-	  k10 = keyCtx->key[10], k11 = keyCtx->key[11],
-	  k12 = keyCtx->key[12], k13 = keyCtx->key[13],
-	  k14 = keyCtx->key[14], k15 = keyCtx->key[15],
-	  k16 = keyCtx->key[16];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3],
+	    b4 = input[4], b5 = input[5],
+	    b6 = input[6], b7 = input[7],
+	    b8 = input[8], b9 = input[9],
+	    b10 = input[10], b11 = input[11],
+	    b12 = input[12], b13 = input[13],
+	    b14 = input[14], b15 = input[15];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4], k5 = key_ctx->key[5],
+	    k6 = key_ctx->key[6], k7 = key_ctx->key[7],
+	    k8 = key_ctx->key[8], k9 = key_ctx->key[9],
+	    k10 = key_ctx->key[10], k11 = key_ctx->key[11],
+	    k12 = key_ctx->key[12], k13 = key_ctx->key[13],
+	    k14 = key_ctx->key[14], k15 = key_ctx->key[15],
+	    k16 = key_ctx->key[16];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 
 	b1 += k1;
 	b0 += b1 + k0;
@@ -2123,28 +2123,28 @@ void threefish_encrypt_1024(struct threefish_key *keyCtx, u64 *input,
 	output[15] = b15 + k1 + 20;
 }
 
-void threefish_decrypt_1024(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_1024(struct threefish_key *key_ctx, u64 *input,
 			    u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3],
-	  b4 = input[4], b5 = input[5],
-	  b6 = input[6], b7 = input[7],
-	  b8 = input[8], b9 = input[9],
-	  b10 = input[10], b11 = input[11],
-	  b12 = input[12], b13 = input[13],
-	  b14 = input[14], b15 = input[15];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4], k5 = keyCtx->key[5],
-	  k6 = keyCtx->key[6], k7 = keyCtx->key[7],
-	  k8 = keyCtx->key[8], k9 = keyCtx->key[9],
-	  k10 = keyCtx->key[10], k11 = keyCtx->key[11],
-	  k12 = keyCtx->key[12], k13 = keyCtx->key[13],
-	  k14 = keyCtx->key[14], k15 = keyCtx->key[15],
-	  k16 = keyCtx->key[16];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3],
+	    b4 = input[4], b5 = input[5],
+	    b6 = input[6], b7 = input[7],
+	    b8 = input[8], b9 = input[9],
+	    b10 = input[10], b11 = input[11],
+	    b12 = input[12], b13 = input[13],
+	    b14 = input[14], b15 = input[15];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4], k5 = key_ctx->key[5],
+	    k6 = key_ctx->key[6], k7 = key_ctx->key[7],
+	    k8 = key_ctx->key[8], k9 = key_ctx->key[9],
+	    k10 = key_ctx->key[10], k11 = key_ctx->key[11],
+	    k12 = key_ctx->key[12], k13 = key_ctx->key[13],
+	    k14 = key_ctx->key[14], k15 = key_ctx->key[15],
+	    k16 = key_ctx->key[16];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 	u64 tmp;
 
 	b0 -= k3;
diff --git a/drivers/staging/skein/threefish256Block.c b/drivers/staging/skein/threefish256Block.c
index ee21aef..1329c71 100644
--- a/drivers/staging/skein/threefish256Block.c
+++ b/drivers/staging/skein/threefish256Block.c
@@ -2,16 +2,16 @@
 #include <threefishApi.h>
 
 
-void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 
 	b1 += k1 + t0;
 	b0 += b1 + k0;
@@ -495,16 +495,16 @@ void threefish_encrypt_256(struct threefish_key *keyCtx, u64 *input,
 	output[3] = b3 + k1 + 18;
 }
 
-void threefish_decrypt_256(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_256(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 
 	u64 tmp;
 
diff --git a/drivers/staging/skein/threefish512Block.c b/drivers/staging/skein/threefish512Block.c
index c4ad1b4..db50d83 100644
--- a/drivers/staging/skein/threefish512Block.c
+++ b/drivers/staging/skein/threefish512Block.c
@@ -2,20 +2,20 @@
 #include <threefishApi.h>
 
 
-void threefish_encrypt_512(struct threefish_key *keyCtx, u64 *input,
+void threefish_encrypt_512(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3],
-	  b4 = input[4], b5 = input[5],
-	  b6 = input[6], b7 = input[7];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4], k5 = keyCtx->key[5],
-	  k6 = keyCtx->key[6], k7 = keyCtx->key[7],
-	  k8 = keyCtx->key[8];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3],
+	    b4 = input[4], b5 = input[5],
+	    b6 = input[6], b7 = input[7];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4], k5 = key_ctx->key[5],
+	    k6 = key_ctx->key[6], k7 = key_ctx->key[7],
+	    k8 = key_ctx->key[8];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 
 	b1 += k1;
 	b0 += b1 + k0;
@@ -963,20 +963,20 @@ void threefish_encrypt_512(struct threefish_key *keyCtx, u64 *input,
 	output[7] = b7 + k7 + 18;
 }
 
-void threefish_decrypt_512(struct threefish_key *keyCtx, u64 *input,
+void threefish_decrypt_512(struct threefish_key *key_ctx, u64 *input,
 			   u64 *output)
 {
 	u64 b0 = input[0], b1 = input[1],
-	  b2 = input[2], b3 = input[3],
-	  b4 = input[4], b5 = input[5],
-	  b6 = input[6], b7 = input[7];
-	u64 k0 = keyCtx->key[0], k1 = keyCtx->key[1],
-	  k2 = keyCtx->key[2], k3 = keyCtx->key[3],
-	  k4 = keyCtx->key[4], k5 = keyCtx->key[5],
-	  k6 = keyCtx->key[6], k7 = keyCtx->key[7],
-	  k8 = keyCtx->key[8];
-	u64 t0 = keyCtx->tweak[0], t1 = keyCtx->tweak[1],
-	  t2 = keyCtx->tweak[2];
+	    b2 = input[2], b3 = input[3],
+	    b4 = input[4], b5 = input[5],
+	    b6 = input[6], b7 = input[7];
+	u64 k0 = key_ctx->key[0], k1 = key_ctx->key[1],
+	    k2 = key_ctx->key[2], k3 = key_ctx->key[3],
+	    k4 = key_ctx->key[4], k5 = key_ctx->key[5],
+	    k6 = key_ctx->key[6], k7 = key_ctx->key[7],
+	    k8 = key_ctx->key[8];
+	u64 t0 = key_ctx->tweak[0], t1 = key_ctx->tweak[1],
+	    t2 = key_ctx->tweak[2];
 
 	u64 tmp;
 
diff --git a/drivers/staging/skein/threefishApi.c b/drivers/staging/skein/threefishApi.c
index fce613b..67ba9a6 100644
--- a/drivers/staging/skein/threefishApi.c
+++ b/drivers/staging/skein/threefishApi.c
@@ -3,76 +3,76 @@
 #include <linux/string.h>
 #include <threefishApi.h>
 
-void threefish_set_key(struct threefish_key *keyCtx,
-		       enum threefish_size stateSize,
-		       u64 *keyData, u64 *tweak)
+void threefish_set_key(struct threefish_key *key_ctx,
+		       enum threefish_size state_size,
+		       u64 *key_data, u64 *tweak)
 {
-	int keyWords = stateSize / 64;
+	int key_words = state_size / 64;
 	int i;
 	u64 parity = KeyScheduleConst;
 
-	keyCtx->tweak[0] = tweak[0];
-	keyCtx->tweak[1] = tweak[1];
-	keyCtx->tweak[2] = tweak[0] ^ tweak[1];
+	key_ctx->tweak[0] = tweak[0];
+	key_ctx->tweak[1] = tweak[1];
+	key_ctx->tweak[2] = tweak[0] ^ tweak[1];
 
-	for (i = 0; i < keyWords; i++) {
-		keyCtx->key[i] = keyData[i];
-		parity ^= keyData[i];
+	for (i = 0; i < key_words; i++) {
+		key_ctx->key[i] = key_data[i];
+		parity ^= key_data[i];
 	}
-	keyCtx->key[i] = parity;
-	keyCtx->stateSize = stateSize;
+	key_ctx->key[i] = parity;
+	key_ctx->state_size = state_size;
 }
 
-void threefish_encrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 				   u8 *out)
 {
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
-	Skein_Get64_LSB_First(plain, in, keyCtx->stateSize / 64);
-	threefish_encrypt_block_words(keyCtx, plain, cipher);
-	Skein_Put64_LSB_First(out, cipher, keyCtx->stateSize / 8);
+	Skein_Get64_LSB_First(plain, in, key_ctx->state_size / 64);
+	threefish_encrypt_block_words(key_ctx, plain, cipher);
+	Skein_Put64_LSB_First(out, cipher, key_ctx->state_size / 8);
 }
 
-void threefish_encrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out)
 {
-	switch (keyCtx->stateSize) {
+	switch (key_ctx->state_size) {
 	case Threefish256:
-		threefish_encrypt_256(keyCtx, in, out);
+		threefish_encrypt_256(key_ctx, in, out);
 		break;
 	case Threefish512:
-		threefish_encrypt_512(keyCtx, in, out);
+		threefish_encrypt_512(key_ctx, in, out);
 		break;
 	case Threefish1024:
-		threefish_encrypt_1024(keyCtx, in, out);
+		threefish_encrypt_1024(key_ctx, in, out);
 		break;
 	}
 }
 
-void threefish_decrypt_block_bytes(struct threefish_key *keyCtx, u8 *in,
+void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 				   u8 *out)
 {
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
-	Skein_Get64_LSB_First(cipher, in, keyCtx->stateSize / 64);
-	threefish_decrypt_block_words(keyCtx, cipher, plain);
-	Skein_Put64_LSB_First(out, plain, keyCtx->stateSize / 8);
+	Skein_Get64_LSB_First(cipher, in, key_ctx->state_size / 64);
+	threefish_decrypt_block_words(key_ctx, cipher, plain);
+	Skein_Put64_LSB_First(out, plain, key_ctx->state_size / 8);
 }
 
-void threefish_decrypt_block_words(struct threefish_key *keyCtx, u64 *in,
+void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out)
 {
-	switch (keyCtx->stateSize) {
+	switch (key_ctx->state_size) {
 	case Threefish256:
-		threefish_decrypt_256(keyCtx, in, out);
+		threefish_decrypt_256(key_ctx, in, out);
 		break;
 	case Threefish512:
-		threefish_decrypt_512(keyCtx, in, out);
+		threefish_decrypt_512(key_ctx, in, out);
 		break;
 	case Threefish1024:
-		threefish_decrypt_1024(keyCtx, in, out);
+		threefish_decrypt_1024(key_ctx, in, out);
 		break;
 	}
 }
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 03/06] staging: crypto: skein: rename skein1024_ctx to skein_1024_ctx
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 01/06] staging: crypto: skein: rename camelcase functions Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 04/06] staging: crypto: skein: rename enums Anton Saraev
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

Code have skein_512_ctx and skein_256_ctx but skein1024_ctx.
It would be logical to convert these names to a single form.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/include/skein.h       | 14 +++++++-------
 drivers/staging/skein/include/skeinApi.h    |  2 +-
 drivers/staging/skein/include/skein_block.h |  2 +-
 drivers/staging/skein/skein.c               | 12 ++++++------
 drivers/staging/skein/skeinBlockNo3F.c      |  2 +-
 drivers/staging/skein/skein_block.c         |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index deaa9c8..09e96d6 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -81,7 +81,7 @@ struct skein_512_ctx { /* 512-bit Skein hash context structure */
 	u8 b[SKEIN_512_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
-struct skein1024_ctx { /* 1024-bit Skein hash context structure */
+struct skein_1024_ctx { /* 1024-bit Skein hash context structure */
 	struct skein_ctx_hdr h;		/* common header context variables */
 	u64 X[SKEIN1024_STATE_WORDS];	/* chaining variables */
 	u8 b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
@@ -90,18 +90,18 @@ struct skein1024_ctx { /* 1024-bit Skein hash context structure */
 /* Skein APIs for (incremental) "straight hashing" */
 int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len);
 int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len);
-int skein_1024_init(struct skein1024_ctx *ctx, size_t hash_bit_len);
+int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len);
 
 int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
 		     size_t msg_byte_cnt);
 int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
 		     size_t msg_byte_cnt);
-int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
+int skein_1024_update(struct skein_1024_ctx *ctx, const u8 *msg,
 		      size_t msg_byte_cnt);
 
 int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val);
 int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val);
-int skein_1024_final(struct skein1024_ctx *ctx, u8 *hash_val);
+int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val);
 
 /*
 **   Skein APIs for "extended" initialization: MAC keys, tree hashing.
@@ -121,7 +121,7 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
 		       u64 tree_info, const u8 *key, size_t key_bytes);
 int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
 		       u64 tree_info, const u8 *key, size_t key_bytes);
-int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
+int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
 			u64 tree_info, const u8 *key, size_t key_bytes);
 
 /*
@@ -131,7 +131,7 @@ int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
 */
 int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val);
 int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val);
-int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hash_val);
+int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val);
 
 #ifndef SKEIN_TREE_HASH
 #define SKEIN_TREE_HASH (1)
@@ -139,7 +139,7 @@ int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hash_val);
 #if  SKEIN_TREE_HASH
 int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val);
 int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val);
-int skein_1024_output(struct skein1024_ctx *ctx, u8 *hash_val);
+int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
 #endif
 
 /*****************************************************************
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skeinApi.h
index 11ecab8..850d5c9 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skeinApi.h
@@ -105,7 +105,7 @@ struct skein_ctx {
 		struct skein_ctx_hdr h;
 		struct skein_256_ctx s256;
 		struct skein_512_ctx s512;
-		struct skein1024_ctx s1024;
+		struct skein_1024_ctx s1024;
 	} m;
 };
 
diff --git a/drivers/staging/skein/include/skein_block.h b/drivers/staging/skein/include/skein_block.h
index ec787a3..a8dd083 100644
--- a/drivers/staging/skein/include/skein_block.h
+++ b/drivers/staging/skein/include/skein_block.h
@@ -16,7 +16,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 			     size_t blk_cnt, size_t byte_cnt_add);
 void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 			     size_t blk_cnt, size_t byte_cnt_add);
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 			      size_t blk_cnt, size_t byte_cnt_add);
 
 #endif
diff --git a/drivers/staging/skein/skein.c b/drivers/staging/skein/skein.c
index d4f3534..43e7757 100644
--- a/drivers/staging/skein/skein.c
+++ b/drivers/staging/skein/skein.c
@@ -476,7 +476,7 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* init the context for a straight hashing operation  */
-int skein_1024_init(struct skein1024_ctx *ctx, size_t hash_bit_len)
+int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len)
 {
 	union {
 		u8 b[SKEIN1024_STATE_BYTES];
@@ -531,7 +531,7 @@ int skein_1024_init(struct skein1024_ctx *ctx, size_t hash_bit_len)
 /* init the context for a MAC and/or tree hash operation */
 /* [identical to skein_1024_init() when key_bytes == 0 && \
  *	tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */
-int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
+int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
 			u64 tree_info, const u8 *key, size_t key_bytes)
 {
 	union {
@@ -592,7 +592,7 @@ int skein_1024_init_ext(struct skein1024_ctx *ctx, size_t hash_bit_len,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* process the input bytes */
-int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
+int skein_1024_update(struct skein_1024_ctx *ctx, const u8 *msg,
 		      size_t msg_byte_cnt)
 {
 	size_t n;
@@ -647,7 +647,7 @@ int skein_1024_update(struct skein1024_ctx *ctx, const u8 *msg,
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the result */
-int skein_1024_final(struct skein1024_ctx *ctx, u8 *hash_val)
+int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN1024_STATE_WORDS];
@@ -743,7 +743,7 @@ int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* finalize the hash computation and output the block, no OUTPUT stage */
-int skein_1024_final_pad(struct skein1024_ctx *ctx, u8 *hash_val)
+int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
 	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
@@ -844,7 +844,7 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 
 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
 /* just do the OUTPUT stage                                       */
-int skein_1024_output(struct skein1024_ctx *ctx, u8 *hash_val)
+int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN1024_STATE_WORDS];
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skeinBlockNo3F.c
index 041e5ae..55c6831 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skeinBlockNo3F.c
@@ -111,7 +111,7 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 	ctx->h.T[1] = tweak[1];
 }
 
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 			      size_t blk_cnt, size_t byte_cnt_add)
 {
 	struct threefish_key key;
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index a51aa57..c9db6d6 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -479,7 +479,7 @@ unsigned int skein_512_unroll_cnt(void)
 
 /*****************************  Skein1024 ******************************/
 #if !(SKEIN_USE_ASM & 1024)
-void skein_1024_process_block(struct skein1024_ctx *ctx, const u8 *blk_ptr,
+void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 			      size_t blk_cnt, size_t byte_cnt_add)
 { /* do it in C, always looping (unrolled is bigger AND slower!) */
 	enum {
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 04/06] staging: crypto: skein: rename enums
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
                   ` (2 preceding siblings ...)
  2014-05-19  8:09 ` [PATCH v2 03/06] staging: crypto: skein: rename skein1024_ctx to skein_1024_ctx Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19  8:09 ` [PATCH v2 05/06] staging: crypto: skein: rename macros Anton Saraev
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

Linux Kernel use capitalized names for enum. To prepare skein
driver to mainline inclusion, we rename all enums to capitalized
names.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/include/skein.h        |  6 +++---
 drivers/staging/skein/include/skeinApi.h     |  8 ++++----
 drivers/staging/skein/include/threefishApi.h | 18 +++++++++---------
 drivers/staging/skein/skeinApi.c             | 24 ++++++++++++------------
 drivers/staging/skein/skeinBlockNo3F.c       |  6 +++---
 drivers/staging/skein/skein_block.c          |  6 +++---
 drivers/staging/skein/threefishApi.c         | 12 ++++++------
 7 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index 09e96d6..8ecd720 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -293,7 +293,7 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
 ** Skein block function constants (shared across Ref and Opt code)
 ******************************************************************/
 enum {
-	    /* Skein_256 round rotation constants */
+	    /* SKEIN_256 round rotation constants */
 	R_256_0_0 = 14, R_256_0_1 = 16,
 	R_256_1_0 = 52, R_256_1_1 = 57,
 	R_256_2_0 = 23, R_256_2_1 = 40,
@@ -303,7 +303,7 @@ enum {
 	R_256_6_0 = 58, R_256_6_1 = 22,
 	R_256_7_0 = 32, R_256_7_1 = 32,
 
-	    /* Skein_512 round rotation constants */
+	    /* SKEIN_512 round rotation constants */
 	R_512_0_0 = 46, R_512_0_1 = 36, R_512_0_2 = 19, R_512_0_3 = 37,
 	R_512_1_0 = 33, R_512_1_1 = 27, R_512_1_2 = 14, R_512_1_3 = 42,
 	R_512_2_0 = 17, R_512_2_1 = 49, R_512_2_2 = 36, R_512_2_3 = 39,
@@ -313,7 +313,7 @@ enum {
 	R_512_6_0 = 25, R_512_6_1 = 29, R_512_6_2 = 39, R_512_6_3 = 43,
 	R_512_7_0 =  8, R_512_7_1 = 35, R_512_7_2 = 56, R_512_7_3 = 22,
 
-	    /* Skein1024 round rotation constants */
+	    /* SKEIN_1024 round rotation constants */
 	R1024_0_0 = 24, R1024_0_1 = 13, R1024_0_2 =  8, R1024_0_3 = 47,
 	R1024_0_4 =  8, R1024_0_5 = 17, R1024_0_6 = 22, R1024_0_7 = 37,
 	R1024_1_0 = 38, R1024_1_1 = 19, R1024_1_2 = 10, R1024_1_3 = 55,
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skeinApi.h
index 850d5c9..b4e879d 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skeinApi.h
@@ -50,7 +50,7 @@ OTHER DEALINGS IN THE SOFTWARE.
  * struct skein_ctx ctx;             // a Skein hash or MAC context
  *
  * // prepare context, here for a Skein with a state size of 512 bits.
- * skein_ctx_prepare(&ctx, Skein512);
+ * skein_ctx_prepare(&ctx, SKEIN_512);
  *
  * // Initialize the context to set the requested hash length in bits
  * // here request a output hash size of 31 bits (Skein supports variable
@@ -85,9 +85,9 @@ OTHER DEALINGS IN THE SOFTWARE.
  * Which Skein size to use
  */
 enum skein_size {
-	Skein256 = 256,     /*!< Skein with 256 bit state */
-	Skein512 = 512,     /*!< Skein with 512 bit state */
-	Skein1024 = 1024    /*!< Skein with 1024 bit state */
+	SKEIN_256 = 256,     /*!< Skein with 256 bit state */
+	SKEIN_512 = 512,     /*!< Skein with 512 bit state */
+	SKEIN_1024 = 1024    /*!< Skein with 1024 bit state */
 };
 
 /**
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h
index 37f6e63..63030e5 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefishApi.h
@@ -17,14 +17,14 @@
  * functions.
  *
 @code
-    // Threefish cipher context data
-    struct threefish_key key_ctx;
+	// Threefish cipher context data
+	struct threefish_key key_ctx;
 
-    // Initialize the context
-    threefish_set_key(&key_ctx, Threefish512, key, tweak);
+	// Initialize the context
+	threefish_set_key(&key_ctx, THREEFISH_512, key, tweak);
 
-    // Encrypt
-    threefish_encrypt_block_bytes(&key_ctx, input, cipher);
+	// Encrypt
+	threefish_encrypt_block_bytes(&key_ctx, input, cipher);
 @endcode
  */
 
@@ -37,9 +37,9 @@
  * Which Threefish size to use
  */
 enum threefish_size {
-	Threefish256 = 256,     /*!< Skein with 256 bit state */
-	Threefish512 = 512,     /*!< Skein with 512 bit state */
-	Threefish1024 = 1024    /*!< Skein with 1024 bit state */
+	THREEFISH_256 = 256,     /*!< Skein with 256 bit state */
+	THREEFISH_512 = 512,     /*!< Skein with 512 bit state */
+	THREEFISH_1024 = 1024    /*!< Skein with 1024 bit state */
 };
 
 /**
diff --git a/drivers/staging/skein/skeinApi.c b/drivers/staging/skein/skeinApi.c
index 3426392..87b3ff2 100644
--- a/drivers/staging/skein/skeinApi.c
+++ b/drivers/staging/skein/skeinApi.c
@@ -57,15 +57,15 @@ int skein_init(struct skein_ctx *ctx, size_t hash_bit_len)
 	 * the save chaining variables.
 	 */
 	switch (ctx->skein_size) {
-	case Skein256:
+	case SKEIN_256:
 		ret = skein_256_init_ext(&ctx->m.s256, hash_bit_len,
 					 tree_info, NULL, 0);
 		break;
-	case Skein512:
+	case SKEIN_512:
 		ret = skein_512_init_ext(&ctx->m.s512, hash_bit_len,
 					 tree_info, NULL, 0);
 		break;
-	case Skein1024:
+	case SKEIN_1024:
 		ret = skein_1024_init_ext(&ctx->m.s1024, hash_bit_len,
 					  tree_info, NULL, 0);
 		break;
@@ -97,18 +97,18 @@ int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,
 	Skein_Assert(hash_bit_len, SKEIN_BAD_HASHLEN);
 
 	switch (ctx->skein_size) {
-	case Skein256:
+	case SKEIN_256:
 		ret = skein_256_init_ext(&ctx->m.s256, hash_bit_len,
 					 tree_info,
 					 (const u8 *)key, key_len);
 
 		break;
-	case Skein512:
+	case SKEIN_512:
 		ret = skein_512_init_ext(&ctx->m.s512, hash_bit_len,
 					 tree_info,
 					 (const u8 *)key, key_len);
 		break;
-	case Skein1024:
+	case SKEIN_1024:
 		ret = skein_1024_init_ext(&ctx->m.s1024, hash_bit_len,
 					  tree_info,
 					  (const u8 *)key, key_len);
@@ -152,15 +152,15 @@ int skein_update(struct skein_ctx *ctx, const u8 *msg,
 	Skein_Assert(ctx, SKEIN_FAIL);
 
 	switch (ctx->skein_size) {
-	case Skein256:
+	case SKEIN_256:
 		ret = skein_256_update(&ctx->m.s256, (const u8 *)msg,
 				       msg_byte_cnt);
 		break;
-	case Skein512:
+	case SKEIN_512:
 		ret = skein_512_update(&ctx->m.s512, (const u8 *)msg,
 				       msg_byte_cnt);
 		break;
-	case Skein1024:
+	case SKEIN_1024:
 		ret = skein_1024_update(&ctx->m.s1024, (const u8 *)msg,
 					msg_byte_cnt);
 		break;
@@ -225,13 +225,13 @@ int skein_final(struct skein_ctx *ctx, u8 *hash)
 	Skein_Assert(ctx, SKEIN_FAIL);
 
 	switch (ctx->skein_size) {
-	case Skein256:
+	case SKEIN_256:
 		ret = skein_256_final(&ctx->m.s256, (u8 *)hash);
 		break;
-	case Skein512:
+	case SKEIN_512:
 		ret = skein_512_final(&ctx->m.s512, (u8 *)hash);
 		break;
-	case Skein1024:
+	case SKEIN_1024:
 		ret = skein_1024_final(&ctx->m.s1024, (u8 *)hash);
 		break;
 	}
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skeinBlockNo3F.c
index 55c6831..716b78e 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skeinBlockNo3F.c
@@ -34,7 +34,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefish_set_key(&key, Threefish256, ctx->X, tweak);
+		threefish_set_key(&key, THREEFISH_256, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_256_STATE_WORDS);
@@ -85,7 +85,7 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefish_set_key(&key, Threefish512, ctx->X, tweak);
+		threefish_set_key(&key, THREEFISH_512, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_512_STATE_WORDS);
@@ -140,7 +140,7 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 		tweak[0] |= (words[1] & 0xffffffffL) << 32;
 		tweak[1] |= words[2] & 0xffffffffL;
 
-		threefish_set_key(&key, Threefish1024, ctx->X, tweak);
+		threefish_set_key(&key, THREEFISH_1024, ctx->X, tweak);
 
 		/* get input block in little-endian format */
 		Skein_Get64_LSB_First(w, blk_ptr, SKEIN1024_STATE_WORDS);
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index c9db6d6..ebd4af1 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -37,7 +37,7 @@
 #define DebugSaveTweak(ctx)
 #endif
 
-/*****************************  Skein_256 ******************************/
+/*****************************  SKEIN_256 ******************************/
 #if !(SKEIN_USE_ASM & 256)
 void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 			     size_t blk_cnt, size_t byte_cnt_add)
@@ -246,7 +246,7 @@ unsigned int skein_256_unroll_cnt(void)
 #endif
 #endif
 
-/*****************************  Skein_512 ******************************/
+/*****************************  SKEIN_512 ******************************/
 #if !(SKEIN_USE_ASM & 512)
 void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 			     size_t blk_cnt, size_t byte_cnt_add)
@@ -477,7 +477,7 @@ unsigned int skein_512_unroll_cnt(void)
 #endif
 #endif
 
-/*****************************  Skein1024 ******************************/
+/*****************************  SKEIN_1024 ******************************/
 #if !(SKEIN_USE_ASM & 1024)
 void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 			      size_t blk_cnt, size_t byte_cnt_add)
diff --git a/drivers/staging/skein/threefishApi.c b/drivers/staging/skein/threefishApi.c
index 67ba9a6..17a314b 100644
--- a/drivers/staging/skein/threefishApi.c
+++ b/drivers/staging/skein/threefishApi.c
@@ -38,13 +38,13 @@ void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out)
 {
 	switch (key_ctx->state_size) {
-	case Threefish256:
+	case THREEFISH_256:
 		threefish_encrypt_256(key_ctx, in, out);
 		break;
-	case Threefish512:
+	case THREEFISH_512:
 		threefish_encrypt_512(key_ctx, in, out);
 		break;
-	case Threefish1024:
+	case THREEFISH_1024:
 		threefish_encrypt_1024(key_ctx, in, out);
 		break;
 	}
@@ -65,13 +65,13 @@ void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 				   u64 *out)
 {
 	switch (key_ctx->state_size) {
-	case Threefish256:
+	case THREEFISH_256:
 		threefish_decrypt_256(key_ctx, in, out);
 		break;
-	case Threefish512:
+	case THREEFISH_512:
 		threefish_decrypt_512(key_ctx, in, out);
 		break;
-	case Threefish1024:
+	case THREEFISH_1024:
 		threefish_decrypt_1024(key_ctx, in, out);
 		break;
 	}
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 05/06] staging: crypto: skein: rename macros
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
                   ` (3 preceding siblings ...)
  2014-05-19  8:09 ` [PATCH v2 04/06] staging: crypto: skein: rename enums Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19  9:08   ` Dan Carpenter
  2014-05-19  8:09 ` [PATCH v2 06/06] staging: crypto: skein: rename files Anton Saraev
  2014-05-19  8:53 ` [PATCH v2 00/06] staging: crypto: skein: fixing style issues Dan Carpenter
  6 siblings, 1 reply; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

Mixing upper and lower case in names of macros like It_Is_Macro is
not accepted in the Linux Kernel. To prepare skein driver for mainline
inclusion, we rename all macros to uppercase or lowercase names.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/include/skein.h        |  75 +++----
 drivers/staging/skein/include/skein_iv.h     |   6 +-
 drivers/staging/skein/include/threefishApi.h |   2 +-
 drivers/staging/skein/skein.c                | 262 +++++++++++------------
 drivers/staging/skein/skeinApi.c             |  22 +-
 drivers/staging/skein/skeinBlockNo3F.c       |  20 +-
 drivers/staging/skein/skein_block.c          | 308 +++++++++++++--------------
 drivers/staging/skein/threefishApi.c         |  10 +-
 8 files changed, 353 insertions(+), 352 deletions(-)

diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index 8ecd720..2c87ff7 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -28,15 +28,15 @@
 **
 ***************************************************************************/
 
-#ifndef RotL_64
-#define RotL_64(x, N)    (((x) << (N)) | ((x) >> (64-(N))))
+#ifndef rotl_64
+#define rotl_64(x, N)    (((x) << (N)) | ((x) >> (64-(N))))
 #endif
 
 /* below two prototype assume we are handed aligned data */
-#define Skein_Put64_LSB_First(dst08, src64, b_cnt) memcpy(dst08, src64, b_cnt)
-#define Skein_Get64_LSB_First(dst64, src08, w_cnt) \
+#define skein_put64_lsb_first(dst08, src64, b_cnt) memcpy(dst08, src64, b_cnt)
+#define skein_get64_lsb_first(dst64, src08, w_cnt) \
 		memcpy(dst64, src08, 8*(w_cnt))
-#define Skein_Swap64(w64)  (w64)
+#define skein_swap64(w64)  (w64)
 
 enum {
 	SKEIN_SUCCESS         =      0, /* return codes from Skein calls */
@@ -48,20 +48,20 @@ enum {
 
 #define  SKEIN_256_STATE_WORDS  (4)
 #define  SKEIN_512_STATE_WORDS  (8)
-#define  SKEIN1024_STATE_WORDS (16)
+#define  SKEIN_1024_STATE_WORDS (16)
 #define  SKEIN_MAX_STATE_WORDS (16)
 
 #define  SKEIN_256_STATE_BYTES  (8*SKEIN_256_STATE_WORDS)
 #define  SKEIN_512_STATE_BYTES  (8*SKEIN_512_STATE_WORDS)
-#define  SKEIN1024_STATE_BYTES  (8*SKEIN1024_STATE_WORDS)
+#define  SKEIN_1024_STATE_BYTES  (8*SKEIN_1024_STATE_WORDS)
 
 #define  SKEIN_256_STATE_BITS  (64*SKEIN_256_STATE_WORDS)
 #define  SKEIN_512_STATE_BITS  (64*SKEIN_512_STATE_WORDS)
-#define  SKEIN1024_STATE_BITS  (64*SKEIN1024_STATE_WORDS)
+#define  SKEIN_1024_STATE_BITS  (64*SKEIN_1024_STATE_WORDS)
 
 #define  SKEIN_256_BLOCK_BYTES  (8*SKEIN_256_STATE_WORDS)
 #define  SKEIN_512_BLOCK_BYTES  (8*SKEIN_512_STATE_WORDS)
-#define  SKEIN1024_BLOCK_BYTES  (8*SKEIN1024_STATE_WORDS)
+#define  SKEIN_1024_BLOCK_BYTES  (8*SKEIN_1024_STATE_WORDS)
 
 struct skein_ctx_hdr {
 	size_t hash_bit_len;		/* size of hash result, in bits */
@@ -83,8 +83,8 @@ struct skein_512_ctx { /* 512-bit Skein hash context structure */
 
 struct skein_1024_ctx { /* 1024-bit Skein hash context structure */
 	struct skein_ctx_hdr h;		/* common header context variables */
-	u64 X[SKEIN1024_STATE_WORDS];	/* chaining variables */
-	u8 b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
+	u64 X[SKEIN_1024_STATE_WORDS];	/* chaining variables */
+	u8 b[SKEIN_1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
 };
 
 /* Skein APIs for (incremental) "straight hashing" */
@@ -232,44 +232,44 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
 **   Skein macros for getting/setting tweak words, etc.
 **   These are useful for partial input bytes, hash tree init/update, etc.
 **/
-#define Skein_Get_Tweak(ctx_ptr, TWK_NUM)          ((ctx_ptr)->h.T[TWK_NUM])
-#define Skein_Set_Tweak(ctx_ptr, TWK_NUM, t_val) { \
+#define skein_get_tweak(ctx_ptr, TWK_NUM)          ((ctx_ptr)->h.T[TWK_NUM])
+#define skein_set_tweak(ctx_ptr, TWK_NUM, t_val) { \
 		(ctx_ptr)->h.T[TWK_NUM] = (t_val); \
 	}
 
-#define Skein_Get_T0(ctx_ptr)     Skein_Get_Tweak(ctx_ptr, 0)
-#define Skein_Get_T1(ctx_ptr)     Skein_Get_Tweak(ctx_ptr, 1)
-#define Skein_Set_T0(ctx_ptr, T0) Skein_Set_Tweak(ctx_ptr, 0, T0)
-#define Skein_Set_T1(ctx_ptr, T1) Skein_Set_Tweak(ctx_ptr, 1, T1)
+#define skein_get_T0(ctx_ptr)     skein_get_tweak(ctx_ptr, 0)
+#define skein_get_T1(ctx_ptr)     skein_get_tweak(ctx_ptr, 1)
+#define skein_set_T0(ctx_ptr, T0) skein_set_tweak(ctx_ptr, 0, T0)
+#define skein_set_T1(ctx_ptr, T1) skein_set_tweak(ctx_ptr, 1, T1)
 
 /* set both tweak words at once */
-#define Skein_Set_T0_T1(ctx_ptr, T0, T1)           \
-	{                                           \
-	Skein_Set_T0(ctx_ptr, (T0));                  \
-	Skein_Set_T1(ctx_ptr, (T1));                  \
+#define skein_set_T0_T1(ctx_ptr, T0, T1)           \
+	{                                          \
+	skein_set_T0(ctx_ptr, (T0));               \
+	skein_set_T1(ctx_ptr, (T1));               \
 	}
 
-#define Skein_Set_Type(ctx_ptr, BLK_TYPE)         \
-	Skein_Set_T1(ctx_ptr, SKEIN_T1_BLK_TYPE_##BLK_TYPE)
+#define skein_set_type(ctx_ptr, BLK_TYPE)         \
+	skein_set_T1(ctx_ptr, SKEIN_T1_BLK_TYPE_##BLK_TYPE)
 
 /*
  * setup for starting with a new type:
  * h.T[0]=0; h.T[1] = NEW_TYPE; h.b_cnt=0;
  */
-#define Skein_Start_New_Type(ctx_ptr, BLK_TYPE) { \
-		Skein_Set_T0_T1(ctx_ptr, 0, SKEIN_T1_FLAG_FIRST | \
+#define skein_start_new_type(ctx_ptr, BLK_TYPE) { \
+		skein_set_T0_T1(ctx_ptr, 0, SKEIN_T1_FLAG_FIRST | \
 				SKEIN_T1_BLK_TYPE_##BLK_TYPE); \
 		(ctx_ptr)->h.b_cnt = 0; \
 	}
 
-#define Skein_Clear_First_Flag(hdr) { \
+#define skein_clear_first_flag(hdr) { \
 		(hdr).T[1] &= ~SKEIN_T1_FLAG_FIRST; \
 	}
-#define Skein_Set_Bit_Pad_Flag(hdr) { \
+#define skein_set_bit_pad_flag(hdr) { \
 		(hdr).T[1] |=  SKEIN_T1_FLAG_BIT_PAD; \
 	}
 
-#define Skein_Set_Tree_Level(hdr, height) { \
+#define skein_set_tree_level(hdr, height) { \
 		(hdr).T[1] |= SKEIN_T1_TREE_LEVEL(height); \
 	}
 
@@ -279,15 +279,16 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
 #ifdef SKEIN_DEBUG             /* examine/display intermediate values? */
 #include "skein_debug.h"
 #else                           /* default is no callouts */
-#define Skein_Show_Block(bits, ctx, X, blk_ptr, w_ptr, ks_event_ptr, ks_odd_ptr)
-#define Skein_Show_Round(bits, ctx, r, X)
-#define Skein_Show_R_Ptr(bits, ctx, r, X_ptr)
-#define Skein_Show_Final(bits, ctx, cnt, out_ptr)
-#define Skein_Show_Key(bits, ctx, key, key_bytes)
+#define skein_show_block(bits, ctx, X, blk_ptr, w_ptr, ks_event_ptr, ks_odd_ptr)
+#define skein_show_round(bits, ctx, r, X)
+#define skein_show_r_ptr(bits, ctx, r, X_ptr)
+#define skein_show_final(bits, ctx, cnt, out_ptr)
+#define skein_show_key(bits, ctx, key, key_bytes)
 #endif
 
-#define Skein_Assert(x, ret_code)/* ignore all Asserts, for performance */
-#define Skein_assert(x)
+/* ignore all asserts, for performance */
+#define skein_assert_ret(x, ret_code)
+#define skein_assert(x)
 
 /*****************************************************************
 ** Skein block function constants (shared across Ref and Opt code)
@@ -335,11 +336,11 @@ enum {
 #ifndef SKEIN_ROUNDS
 #define SKEIN_256_ROUNDS_TOTAL (72)	/* # rounds for diff block sizes */
 #define SKEIN_512_ROUNDS_TOTAL (72)
-#define SKEIN1024_ROUNDS_TOTAL (80)
+#define SKEIN_1024_ROUNDS_TOTAL (80)
 #else			/* allow command-line define in range 8*(5..14)   */
 #define SKEIN_256_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS/100) + 5) % 10) + 5))
 #define SKEIN_512_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS/10)  + 5) % 10) + 5))
-#define SKEIN1024_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS)     + 5) % 10) + 5))
+#define SKEIN_1024_ROUNDS_TOTAL (8*((((SKEIN_ROUNDS)     + 5) % 10) + 5))
 #endif
 
 #endif  /* ifndef _SKEIN_H_ */
diff --git a/drivers/staging/skein/include/skein_iv.h b/drivers/staging/skein/include/skein_iv.h
index 8dd5e4d..7ff93df 100644
--- a/drivers/staging/skein/include/skein_iv.h
+++ b/drivers/staging/skein/include/skein_iv.h
@@ -124,7 +124,7 @@ const u64 SKEIN_512_IV_512[] = {
 };
 
 /* blkSize = 1024 bits. hashSize =  384 bits */
-const u64 SKEIN1024_IV_384[] = {
+const u64 SKEIN_1024_IV_384[] = {
 	MK_64(0x5102B6B8, 0xC1894A35),
 	MK_64(0xFEEBC9E3, 0xFE8AF11A),
 	MK_64(0x0C807F06, 0xE32BED71),
@@ -144,7 +144,7 @@ const u64 SKEIN1024_IV_384[] = {
 };
 
 /* blkSize = 1024 bits. hashSize =  512 bits */
-const u64 SKEIN1024_IV_512[] = {
+const u64 SKEIN_1024_IV_512[] = {
 	MK_64(0xCAEC0E5D, 0x7C1B1B18),
 	MK_64(0xA01B0E04, 0x5F03E802),
 	MK_64(0x33840451, 0xED912885),
@@ -164,7 +164,7 @@ const u64 SKEIN1024_IV_512[] = {
 };
 
 /* blkSize = 1024 bits. hashSize = 1024 bits */
-const u64 SKEIN1024_IV_1024[] = {
+const u64 SKEIN_1024_IV_1024[] = {
 	MK_64(0xD593DA07, 0x41E72355),
 	MK_64(0x15B5E511, 0xAC73E00C),
 	MK_64(0x5180E5AE, 0xBAF2C4F0),
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h
index 63030e5..96cc0e8 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefishApi.h
@@ -31,7 +31,7 @@
 #include <linux/types.h>
 #include <skein.h>
 
-#define KeyScheduleConst 0x1BD11BDAA9FC1A22L
+#define KEY_SCHEDULE_CONST 0x1BD11BDAA9FC1A22L
 
 /**
  * Which Threefish size to use
diff --git a/drivers/staging/skein/skein.c b/drivers/staging/skein/skein.c
index 43e7757..2a2da98 100644
--- a/drivers/staging/skein/skein.c
+++ b/drivers/staging/skein/skein.c
@@ -28,7 +28,7 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len)
 		u64 w[SKEIN_256_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
 	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
 	switch (hash_bit_len) { /* use pre-computed values, where available */
@@ -51,13 +51,13 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len)
 		 * precomputed)
 		 */
 		/* set tweaks: T0=0; T1=CFG | FINAL */
-		Skein_Start_New_Type(ctx, CFG_FINAL);
+		skein_start_new_type(ctx, CFG_FINAL);
 
 		/* set the schema, version */
-		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+		cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hash_bit_len);
-		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
+		cfg.w[1] = skein_swap64(hash_bit_len);
+		cfg.w[2] = skein_swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
 
@@ -69,7 +69,7 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len)
 	}
 	/* The chaining vars ctx->X are now initialized for hash_bit_len. */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
+	skein_start_new_type(ctx, MSG);              /* T0=0, T1= MSG type */
 
 	return SKEIN_SUCCESS;
 }
@@ -86,20 +86,20 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
 		u64 w[SKEIN_256_STATE_WORDS];
 	} cfg; /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
 	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
-		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
+		skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
 		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
-		Skein_Start_New_Type(ctx, KEY);
+		skein_start_new_type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
@@ -115,24 +115,24 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
 	 */
 	/* output hash bit count */
 	ctx->h.hash_bit_len = hash_bit_len;
-	Skein_Start_New_Type(ctx, CFG_FINAL);
+	skein_start_new_type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
-	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+	cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hash_bit_len);
+	cfg.w[1] = skein_swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(tree_info);
+	cfg.w[2] = skein_swap64(tree_info);
 
-	Skein_Show_Key(256, &ctx->h, key, key_bytes);
+	skein_show_key(256, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);
+	skein_start_new_type(ctx, MSG);
 
 	return SKEIN_SUCCESS;
 }
@@ -145,7 +145,7 @@ int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
 	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN_256_BLOCK_BYTES) {
@@ -155,13 +155,13 @@ int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
 			n = SKEIN_256_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msg_byte_cnt);
+				skein_assert(n < msg_byte_cnt);
 				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
 				msg_byte_cnt  -= n;
 				msg         += n;
 				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.b_cnt == SKEIN_256_BLOCK_BYTES);
+			skein_assert(ctx->h.b_cnt == SKEIN_256_BLOCK_BYTES);
 			skein_256_process_block(ctx, ctx->b, 1,
 						SKEIN_256_BLOCK_BYTES);
 			ctx->h.b_cnt = 0;
@@ -178,12 +178,12 @@ int skein_256_update(struct skein_256_ctx *ctx, const u8 *msg,
 			msg_byte_cnt -= n * SKEIN_256_BLOCK_BYTES;
 			msg        += n * SKEIN_256_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.b_cnt == 0);
+		skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
 	if (msg_byte_cnt) {
-		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+		skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
 			     SKEIN_256_BLOCK_BYTES);
 		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
 		ctx->h.b_cnt += msg_byte_cnt;
@@ -199,7 +199,7 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN_256_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
@@ -222,8 +222,8 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
 	memcpy(X, ctx->X, sizeof(X));
 	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
@@ -231,9 +231,9 @@ int skein_256_final(struct skein_256_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(256, &ctx->h, n,
+		skein_show_final(256, &ctx->h, n,
 				 hash_val+i*SKEIN_256_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
@@ -254,7 +254,7 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len)
 		u64 w[SKEIN_512_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
 	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
 	switch (hash_bit_len) { /* use pre-computed values, where available */
@@ -277,13 +277,13 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len)
 		 * precomputed)
 		 */
 		/* set tweaks: T0=0; T1=CFG | FINAL */
-		Skein_Start_New_Type(ctx, CFG_FINAL);
+		skein_start_new_type(ctx, CFG_FINAL);
 
 		/* set the schema, version */
-		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+		cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hash_bit_len);
-		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
+		cfg.w[1] = skein_swap64(hash_bit_len);
+		cfg.w[2] = skein_swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
 
@@ -299,7 +299,7 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len)
 	 * hash_bit_len.
 	 */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
+	skein_start_new_type(ctx, MSG);              /* T0=0, T1= MSG type */
 
 	return SKEIN_SUCCESS;
 }
@@ -316,20 +316,20 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
 		u64 w[SKEIN_512_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
 	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
-		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
+		skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
 		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
-		Skein_Start_New_Type(ctx, KEY);
+		skein_start_new_type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
@@ -344,24 +344,24 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
 	 * precomputed for each key)
 	 */
 	ctx->h.hash_bit_len = hash_bit_len;          /* output hash bit count */
-	Skein_Start_New_Type(ctx, CFG_FINAL);
+	skein_start_new_type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
-	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+	cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hash_bit_len);
+	cfg.w[1] = skein_swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(tree_info);
+	cfg.w[2] = skein_swap64(tree_info);
 
-	Skein_Show_Key(512, &ctx->h, key, key_bytes);
+	skein_show_key(512, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_512_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);
+	skein_start_new_type(ctx, MSG);
 
 	return SKEIN_SUCCESS;
 }
@@ -374,7 +374,7 @@ int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
 	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN_512_BLOCK_BYTES) {
@@ -384,13 +384,13 @@ int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
 			n = SKEIN_512_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msg_byte_cnt);
+				skein_assert(n < msg_byte_cnt);
 				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
 				msg_byte_cnt  -= n;
 				msg         += n;
 				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.b_cnt == SKEIN_512_BLOCK_BYTES);
+			skein_assert(ctx->h.b_cnt == SKEIN_512_BLOCK_BYTES);
 			skein_512_process_block(ctx, ctx->b, 1,
 						SKEIN_512_BLOCK_BYTES);
 			ctx->h.b_cnt = 0;
@@ -407,12 +407,12 @@ int skein_512_update(struct skein_512_ctx *ctx, const u8 *msg,
 			msg_byte_cnt -= n * SKEIN_512_BLOCK_BYTES;
 			msg        += n * SKEIN_512_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.b_cnt == 0);
+		skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
 	if (msg_byte_cnt) {
-		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+		skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
 			     SKEIN_512_BLOCK_BYTES);
 		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
 		ctx->h.b_cnt += msg_byte_cnt;
@@ -428,7 +428,7 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN_512_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
@@ -451,8 +451,8 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 	memcpy(X, ctx->X, sizeof(X));
 	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
@@ -460,9 +460,9 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(512, &ctx->h, n,
+		skein_show_final(512, &ctx->h, n,
 				 hash_val+i*SKEIN_512_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
@@ -479,22 +479,22 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val)
 int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len)
 {
 	union {
-		u8 b[SKEIN1024_STATE_BYTES];
-		u64 w[SKEIN1024_STATE_WORDS];
+		u8 b[SKEIN_1024_STATE_BYTES];
+		u64 w[SKEIN_1024_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
 	ctx->h.hash_bit_len = hash_bit_len;         /* output hash bit count */
 
 	switch (hash_bit_len) { /* use pre-computed values, where available */
 	case  512:
-		memcpy(ctx->X, SKEIN1024_IV_512, sizeof(ctx->X));
+		memcpy(ctx->X, SKEIN_1024_IV_512, sizeof(ctx->X));
 		break;
 	case  384:
-		memcpy(ctx->X, SKEIN1024_IV_384, sizeof(ctx->X));
+		memcpy(ctx->X, SKEIN_1024_IV_384, sizeof(ctx->X));
 		break;
 	case 1024:
-		memcpy(ctx->X, SKEIN1024_IV_1024, sizeof(ctx->X));
+		memcpy(ctx->X, SKEIN_1024_IV_1024, sizeof(ctx->X));
 		break;
 	default:
 		/* here if there is no precomputed IV value available */
@@ -503,13 +503,13 @@ int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len)
 		 * (could be precomputed)
 		 */
 		/* set tweaks: T0=0; T1=CFG | FINAL */
-		Skein_Start_New_Type(ctx, CFG_FINAL);
+		skein_start_new_type(ctx, CFG_FINAL);
 
 		/* set the schema, version */
-		cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+		cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 		/* hash result length in bits */
-		cfg.w[1] = Skein_Swap64(hash_bit_len);
-		cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
+		cfg.w[1] = skein_swap64(hash_bit_len);
+		cfg.w[2] = skein_swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
 		/* zero pad config block */
 		memset(&cfg.w[3], 0, sizeof(cfg) - 3*sizeof(cfg.w[0]));
 
@@ -522,7 +522,7 @@ int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len)
 
 	/* The chaining vars ctx->X are now initialized for the hash_bit_len. */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);              /* T0=0, T1= MSG type */
+	skein_start_new_type(ctx, MSG);              /* T0=0, T1= MSG type */
 
 	return SKEIN_SUCCESS;
 }
@@ -535,24 +535,24 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
 			u64 tree_info, const u8 *key, size_t key_bytes)
 {
 	union {
-		u8 b[SKEIN1024_STATE_BYTES];
-		u64 w[SKEIN1024_STATE_WORDS];
+		u8 b[SKEIN_1024_STATE_BYTES];
+		u64 w[SKEIN_1024_STATE_WORDS];
 	} cfg;                              /* config block */
 
-	Skein_Assert(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
-	Skein_Assert(key_bytes == 0 || key != NULL, SKEIN_FAIL);
+	skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL);
 
 	/* compute the initial chaining values ctx->X[], based on key */
 	if (key_bytes == 0) { /* is there a key? */
 		/* no key: use all zeroes as key for config block */
 		memset(ctx->X, 0, sizeof(ctx->X));
 	} else { /* here to pre-process a key */
-		Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
+		skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
 		/* do a mini-Init right here */
 		/* set output hash bit count = state size */
 		ctx->h.hash_bit_len = 8*sizeof(ctx->X);
 		/* set tweaks: T0 = 0; T1 = KEY type */
-		Skein_Start_New_Type(ctx, KEY);
+		skein_start_new_type(ctx, KEY);
 		/* zero the initial chaining variables */
 		memset(ctx->X, 0, sizeof(ctx->X));
 		/* hash the key */
@@ -568,24 +568,24 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
 	 */
 	/* output hash bit count */
 	ctx->h.hash_bit_len = hash_bit_len;
-	Skein_Start_New_Type(ctx, CFG_FINAL);
+	skein_start_new_type(ctx, CFG_FINAL);
 
 	/* pre-pad cfg.w[] with zeroes */
 	memset(&cfg.w, 0, sizeof(cfg.w));
-	cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
+	cfg.w[0] = skein_swap64(SKEIN_SCHEMA_VER);
 	/* hash result length in bits */
-	cfg.w[1] = Skein_Swap64(hash_bit_len);
+	cfg.w[1] = skein_swap64(hash_bit_len);
 	/* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
-	cfg.w[2] = Skein_Swap64(tree_info);
+	cfg.w[2] = skein_swap64(tree_info);
 
-	Skein_Show_Key(1024, &ctx->h, key, key_bytes);
+	skein_show_key(1024, &ctx->h, key, key_bytes);
 
 	/* compute the initial chaining values from config block */
 	skein_1024_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN);
 
 	/* The chaining vars ctx->X are now initialized */
 	/* Set up to process the data message portion of the hash (default) */
-	Skein_Start_New_Type(ctx, MSG);
+	skein_start_new_type(ctx, MSG);
 
 	return SKEIN_SUCCESS;
 }
@@ -598,46 +598,46 @@ int skein_1024_update(struct skein_1024_ctx *ctx, const u8 *msg,
 	size_t n;
 
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* process full blocks, if any */
-	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN1024_BLOCK_BYTES) {
+	if (msg_byte_cnt + ctx->h.b_cnt > SKEIN_1024_BLOCK_BYTES) {
 		/* finish up any buffered message data */
 		if (ctx->h.b_cnt) {
 			/* # bytes free in buffer b[] */
-			n = SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt;
+			n = SKEIN_1024_BLOCK_BYTES - ctx->h.b_cnt;
 			if (n) {
 				/* check on our logic here */
-				Skein_assert(n < msg_byte_cnt);
+				skein_assert(n < msg_byte_cnt);
 				memcpy(&ctx->b[ctx->h.b_cnt], msg, n);
 				msg_byte_cnt  -= n;
 				msg         += n;
 				ctx->h.b_cnt += n;
 			}
-			Skein_assert(ctx->h.b_cnt == SKEIN1024_BLOCK_BYTES);
+			skein_assert(ctx->h.b_cnt == SKEIN_1024_BLOCK_BYTES);
 			skein_1024_process_block(ctx, ctx->b, 1,
-						 SKEIN1024_BLOCK_BYTES);
+						 SKEIN_1024_BLOCK_BYTES);
 			ctx->h.b_cnt = 0;
 		}
 		/*
 		 * now process any remaining full blocks, directly from input
 		 * message data
 		 */
-		if (msg_byte_cnt > SKEIN1024_BLOCK_BYTES) {
+		if (msg_byte_cnt > SKEIN_1024_BLOCK_BYTES) {
 			/* number of full blocks to process */
-			n = (msg_byte_cnt-1) / SKEIN1024_BLOCK_BYTES;
+			n = (msg_byte_cnt-1) / SKEIN_1024_BLOCK_BYTES;
 			skein_1024_process_block(ctx, msg, n,
-						 SKEIN1024_BLOCK_BYTES);
-			msg_byte_cnt -= n * SKEIN1024_BLOCK_BYTES;
-			msg        += n * SKEIN1024_BLOCK_BYTES;
+						 SKEIN_1024_BLOCK_BYTES);
+			msg_byte_cnt -= n * SKEIN_1024_BLOCK_BYTES;
+			msg        += n * SKEIN_1024_BLOCK_BYTES;
 		}
-		Skein_assert(ctx->h.b_cnt == 0);
+		skein_assert(ctx->h.b_cnt == 0);
 	}
 
 	/* copy any remaining source message data bytes into b[] */
 	if (msg_byte_cnt) {
-		Skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
-			     SKEIN1024_BLOCK_BYTES);
+		skein_assert(msg_byte_cnt + ctx->h.b_cnt <=
+			     SKEIN_1024_BLOCK_BYTES);
 		memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt);
 		ctx->h.b_cnt += msg_byte_cnt;
 	}
@@ -650,16 +650,16 @@ int skein_1024_update(struct skein_1024_ctx *ctx, const u8 *msg,
 int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	size_t i, n, byte_cnt;
-	u64 X[SKEIN1024_STATE_WORDS];
+	u64 X[SKEIN_1024_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.b_cnt < SKEIN1024_BLOCK_BYTES)
+	if (ctx->h.b_cnt < SKEIN_1024_BLOCK_BYTES)
 		memset(&ctx->b[ctx->h.b_cnt], 0,
-			SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt);
+			SKEIN_1024_BLOCK_BYTES - ctx->h.b_cnt);
 
 	/* process the final block */
 	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
@@ -673,21 +673,21 @@ int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byte_cnt; i++) {
+	for (i = 0; i*SKEIN_1024_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byte_cnt - i*SKEIN1024_BLOCK_BYTES;
-		if (n >= SKEIN1024_BLOCK_BYTES)
-			n  = SKEIN1024_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_1024_BLOCK_BYTES;
+		if (n >= SKEIN_1024_BLOCK_BYTES)
+			n  = SKEIN_1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN1024_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_1024_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(1024, &ctx->h, n,
-				 hash_val+i*SKEIN1024_BLOCK_BYTES);
+		skein_show_final(1024, &ctx->h, n,
+				 hash_val+i*SKEIN_1024_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
@@ -702,7 +702,7 @@ int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val)
 int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
@@ -714,7 +714,7 @@ int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val)
 	skein_256_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN_256_BLOCK_BYTES);
+	skein_put64_lsb_first(hash_val, ctx->X, SKEIN_256_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
@@ -724,7 +724,7 @@ int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val)
 int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
@@ -736,7 +736,7 @@ int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val)
 	skein_512_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN_512_BLOCK_BYTES);
+	skein_put64_lsb_first(hash_val, ctx->X, SKEIN_512_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
@@ -746,19 +746,19 @@ int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val)
 int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* tag as the final block */
 	ctx->h.T[1] |= SKEIN_T1_FLAG_FINAL;
 	/* zero pad b[] if necessary */
-	if (ctx->h.b_cnt < SKEIN1024_BLOCK_BYTES)
+	if (ctx->h.b_cnt < SKEIN_1024_BLOCK_BYTES)
 		memset(&ctx->b[ctx->h.b_cnt], 0,
-			SKEIN1024_BLOCK_BYTES - ctx->h.b_cnt);
+			SKEIN_1024_BLOCK_BYTES - ctx->h.b_cnt);
 	/* process the final block */
 	skein_1024_process_block(ctx, ctx->b, 1, ctx->h.b_cnt);
 
 	/* "output" the state bytes */
-	Skein_Put64_LSB_First(hash_val, ctx->X, SKEIN1024_BLOCK_BYTES);
+	skein_put64_lsb_first(hash_val, ctx->X, SKEIN_1024_BLOCK_BYTES);
 
 	return SKEIN_SUCCESS;
 }
@@ -771,7 +771,7 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN_256_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_256_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -784,8 +784,8 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
 	memcpy(X, ctx->X, sizeof(X));
 	for (i = 0; i*SKEIN_256_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_256_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
@@ -793,9 +793,9 @@ int skein_256_output(struct skein_256_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_256_BLOCK_BYTES)
 			n  = SKEIN_256_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_256_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(256, &ctx->h, n,
+		skein_show_final(256, &ctx->h, n,
 				 hash_val+i*SKEIN_256_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
@@ -810,7 +810,7 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 	size_t i, n, byte_cnt;
 	u64 X[SKEIN_512_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_512_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -823,8 +823,8 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 	memcpy(X, ctx->X, sizeof(X));
 	for (i = 0; i*SKEIN_512_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_512_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
@@ -832,9 +832,9 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 		if (n >= SKEIN_512_BLOCK_BYTES)
 			n  = SKEIN_512_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_512_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(256, &ctx->h, n,
+		skein_show_final(256, &ctx->h, n,
 				 hash_val+i*SKEIN_512_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
@@ -847,9 +847,9 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val)
 int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
 {
 	size_t i, n, byte_cnt;
-	u64 X[SKEIN1024_STATE_WORDS];
+	u64 X[SKEIN_1024_STATE_WORDS];
 	/* catch uninitialized context */
-	Skein_Assert(ctx->h.b_cnt <= SKEIN1024_BLOCK_BYTES, SKEIN_FAIL);
+	skein_assert_ret(ctx->h.b_cnt <= SKEIN_1024_BLOCK_BYTES, SKEIN_FAIL);
 
 	/* now output the result */
 	/* total number of output bytes */
@@ -860,21 +860,21 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val)
 	memset(ctx->b, 0, sizeof(ctx->b));
 	/* keep a local copy of counter mode "key" */
 	memcpy(X, ctx->X, sizeof(X));
-	for (i = 0; i*SKEIN1024_BLOCK_BYTES < byte_cnt; i++) {
+	for (i = 0; i*SKEIN_1024_BLOCK_BYTES < byte_cnt; i++) {
 		/* build the counter block */
-		((u64 *)ctx->b)[0] = Skein_Swap64((u64) i);
-		Skein_Start_New_Type(ctx, OUT_FINAL);
+		((u64 *)ctx->b)[0] = skein_swap64((u64) i);
+		skein_start_new_type(ctx, OUT_FINAL);
 		/* run "counter mode" */
 		skein_1024_process_block(ctx, ctx->b, 1, sizeof(u64));
 		/* number of output bytes left to go */
-		n = byte_cnt - i*SKEIN1024_BLOCK_BYTES;
-		if (n >= SKEIN1024_BLOCK_BYTES)
-			n  = SKEIN1024_BLOCK_BYTES;
+		n = byte_cnt - i*SKEIN_1024_BLOCK_BYTES;
+		if (n >= SKEIN_1024_BLOCK_BYTES)
+			n  = SKEIN_1024_BLOCK_BYTES;
 		/* "output" the ctr mode bytes */
-		Skein_Put64_LSB_First(hash_val+i*SKEIN1024_BLOCK_BYTES, ctx->X,
+		skein_put64_lsb_first(hash_val+i*SKEIN_1024_BLOCK_BYTES, ctx->X,
 				      n);
-		Skein_Show_Final(256, &ctx->h, n,
-				 hash_val+i*SKEIN1024_BLOCK_BYTES);
+		skein_show_final(256, &ctx->h, n,
+				 hash_val+i*SKEIN_1024_BLOCK_BYTES);
 		/* restore the counter mode key for next time */
 		memcpy(ctx->X, X, sizeof(X));
 	}
diff --git a/drivers/staging/skein/skeinApi.c b/drivers/staging/skein/skeinApi.c
index 87b3ff2..16d596b 100644
--- a/drivers/staging/skein/skeinApi.c
+++ b/drivers/staging/skein/skeinApi.c
@@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size)
 {
-	Skein_Assert(ctx && size, SKEIN_FAIL);
+	skein_assert_ret(ctx && size, SKEIN_FAIL);
 
 	memset(ctx , 0, sizeof(struct skein_ctx));
 	ctx->skein_size = size;
@@ -44,7 +44,7 @@ int skein_init(struct skein_ctx *ctx, size_t hash_bit_len)
 	u64 *X = NULL;
 	u64 tree_info = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
 
-	Skein_Assert(ctx, SKEIN_FAIL);
+	skein_assert_ret(ctx, SKEIN_FAIL);
 	/*
 	 * The following two lines rely of the fact that the real Skein
 	 * contexts are a union in out context and thus have tha maximum
@@ -89,12 +89,12 @@ int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,
 	size_t X_len = 0;
 	u64 tree_info = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
 
-	Skein_Assert(ctx, SKEIN_FAIL);
+	skein_assert_ret(ctx, SKEIN_FAIL);
 
 	X = ctx->m.s256.X;
 	X_len = ctx->skein_size/8;
 
-	Skein_Assert(hash_bit_len, SKEIN_BAD_HASHLEN);
+	skein_assert_ret(hash_bit_len, SKEIN_BAD_HASHLEN);
 
 	switch (ctx->skein_size) {
 	case SKEIN_256:
@@ -141,7 +141,7 @@ void skein_reset(struct skein_ctx *ctx)
 	memcpy(X, ctx->X_save, X_len);
 
 	/* Setup context to process the message */
-	Skein_Start_New_Type(&ctx->m, MSG);
+	skein_start_new_type(&ctx->m, MSG);
 }
 
 int skein_update(struct skein_ctx *ctx, const u8 *msg,
@@ -149,7 +149,7 @@ int skein_update(struct skein_ctx *ctx, const u8 *msg,
 {
 	int ret = SKEIN_FAIL;
 
-	Skein_Assert(ctx, SKEIN_FAIL);
+	skein_assert_ret(ctx, SKEIN_FAIL);
 
 	switch (ctx->skein_size) {
 	case SKEIN_256:
@@ -185,8 +185,8 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
 	 * only the final Update() call is allowed do partial bytes, else
 	 * assert an error
 	 */
-	Skein_Assert((ctx->m.h.T[1] & SKEIN_T1_FLAG_BIT_PAD) == 0 ||
-			msg_bit_cnt == 0, SKEIN_FAIL);
+	skein_assert_ret((ctx->m.h.T[1] & SKEIN_T1_FLAG_BIT_PAD) == 0 ||
+			 msg_bit_cnt == 0, SKEIN_FAIL);
 
 	/* if number of bits is a multiple of bytes - that's easy */
 	if ((msg_bit_cnt & 0x7) == 0)
@@ -203,13 +203,13 @@ int skein_update_bits(struct skein_ctx *ctx, const u8 *msg,
 	up = (u8 *)ctx->m.s256.X + ctx->skein_size / 8;
 
 	/* set tweak flag for the skein_final call */
-	Skein_Set_Bit_Pad_Flag(ctx->m.h);
+	skein_set_bit_pad_flag(ctx->m.h);
 
 	/* now "pad" the final partial byte the way NIST likes */
 	/* get the b_cnt value (same location for all block sizes) */
 	length = ctx->m.h.b_cnt;
 	/* internal sanity check: there IS a partial byte in the buffer! */
-	Skein_assert(length != 0);
+	skein_assert(length != 0);
 	/* partial byte bit mask */
 	mask = (u8) (1u << (7 - (msg_bit_cnt & 7)));
 	/* apply bit padding on final byte (in the buffer) */
@@ -222,7 +222,7 @@ int skein_final(struct skein_ctx *ctx, u8 *hash)
 {
 	int ret = SKEIN_FAIL;
 
-	Skein_Assert(ctx, SKEIN_FAIL);
+	skein_assert_ret(ctx, SKEIN_FAIL);
 
 	switch (ctx->skein_size) {
 	case SKEIN_256:
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skeinBlockNo3F.c
index 716b78e..4ee7f9f 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skeinBlockNo3F.c
@@ -11,10 +11,10 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 	struct threefish_key key;
 	u64 tweak[2];
 	int i;
-	u64  w[SKEIN_256_STATE_WORDS]; /* local copy of input block */
+	u64 w[SKEIN_256_STATE_WORDS]; /* local copy of input block */
 	u64 words[3];
 
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
@@ -37,7 +37,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 		threefish_set_key(&key, THREEFISH_256, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_256_STATE_WORDS);
+		skein_get64_lsb_first(w, blk_ptr, SKEIN_256_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
@@ -63,9 +63,9 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 	u64 tweak[2];
 	int i;
 	u64 words[3];
-	u64  w[SKEIN_512_STATE_WORDS]; /* local copy of input block */
+	u64 w[SKEIN_512_STATE_WORDS]; /* local copy of input block */
 
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
@@ -88,7 +88,7 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 		threefish_set_key(&key, THREEFISH_512, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, SKEIN_512_STATE_WORDS);
+		skein_get64_lsb_first(w, blk_ptr, SKEIN_512_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
@@ -118,9 +118,9 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 	u64 tweak[2];
 	int i;
 	u64 words[3];
-	u64  w[SKEIN1024_STATE_WORDS]; /* local copy of input block */
+	u64 w[SKEIN_1024_STATE_WORDS]; /* local copy of input block */
 
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	tweak[0] = ctx->h.T[0];
 	tweak[1] = ctx->h.T[1];
 
@@ -143,11 +143,11 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 		threefish_set_key(&key, THREEFISH_1024, ctx->X, tweak);
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, SKEIN1024_STATE_WORDS);
+		skein_get64_lsb_first(w, blk_ptr, SKEIN_1024_STATE_WORDS);
 
 		threefish_encrypt_block_words(&key, w, ctx->X);
 
-		blk_ptr += SKEIN1024_BLOCK_BYTES;
+		blk_ptr += SKEIN_1024_BLOCK_BYTES;
 
 		/* do the final "feedforward" xor, update ctx chaining vars */
 		ctx->X[0]  = ctx->X[0]  ^ w[0];
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index ebd4af1..7b66ec5 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -32,9 +32,9 @@
 #define ts              (kw + KW_TWK_BASE)
 
 #ifdef SKEIN_DEBUG
-#define DebugSaveTweak(ctx) { ctx->h.T[0] = ts[0]; ctx->h.T[1] = ts[1]; }
+#define debug_save_tweak(ctx) { ctx->h.T[0] = ts[0]; ctx->h.T[1] = ts[1]; }
 #else
-#define DebugSaveTweak(ctx)
+#define debug_save_tweak(ctx)
 #endif
 
 /*****************************  SKEIN_256 ******************************/
@@ -70,7 +70,7 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 
 	X_ptr[0] = &X0;  X_ptr[1] = &X1;  X_ptr[2] = &X2;  X_ptr[3] = &X3;
 #endif
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -90,9 +90,9 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 		ts[2] = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
-		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
+		skein_get64_lsb_first(w, blk_ptr, WCNT);
+		debug_save_tweak(ctx);
+		skein_show_block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X0 = w[0] + ks[0]; /* do the first full key injection */
 		X1 = w[1] + ks[1] + ts[0];
@@ -100,24 +100,24 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 		X3 = w[3] + ks[3];
 
 		/* show starting state values */
-		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
+		skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
 				 X_ptr);
 
 		blk_ptr += SKEIN_256_BLOCK_BYTES;
 
 		/* run the rounds */
 
-#define Round256(p0, p1, p2, p3, ROT, r_num)                              \
+#define ROUND256(p0, p1, p2, p3, ROT, r_num)                              \
 do { \
-	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
-	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
+	X##p0 += X##p1; X##p1 = rotl_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
+	X##p2 += X##p3; X##p3 = rotl_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
 } while (0)
 
 #if SKEIN_UNROLL_256 == 0
 #define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \
 do { \
-	Round256(p0, p1, p2, p3, ROT, r_num); \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
+	ROUND256(p0, p1, p2, p3, ROT, r_num); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
 } while (0)
 
 #define I256(R) \
@@ -127,13 +127,13 @@ do { \
 	X1   += ks[((R)+2) % 5] + ts[((R)+1) % 3]; \
 	X2   += ks[((R)+3) % 5] + ts[((R)+2) % 3]; \
 	X3   += ks[((R)+4) % 5] +     (R)+1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
 #define R256(p0, p1, p2, p3, ROT, r_num) \
 do { \
-	Round256(p0, p1, p2, p3, ROT, r_num); \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
+	ROUND256(p0, p1, p2, p3, ROT, r_num); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
 } while (0)
 
 #define I256(R) \
@@ -146,13 +146,13 @@ do { \
 	/* rotate key schedule */ \
 	ks[r + (R) + 4]   = ks[r + (R) - 1]; \
 	ts[r + (R) + 2]   = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 	for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_256)
 #endif
 		{
-#define R256_8_rounds(R)                  \
+#define R256_8_ROUNDS(R)                  \
 do { \
 		R256(0, 1, 2, 3, R_256_0, 8 * (R) + 1);  \
 		R256(0, 3, 2, 1, R_256_1, 8 * (R) + 2);  \
@@ -166,54 +166,54 @@ do { \
 		I256(2 * (R) + 1); \
 } while (0)
 
-		R256_8_rounds(0);
+		R256_8_ROUNDS(0);
 
-#define R256_Unroll_R(NN) \
+#define R256_UNROLL_R(NN) \
 	((SKEIN_UNROLL_256 == 0 && \
 	  SKEIN_256_ROUNDS_TOTAL/8 > (NN)) || \
 	 (SKEIN_UNROLL_256 > (NN)))
 
-	#if   R256_Unroll_R(1)
-		R256_8_rounds(1);
+	#if   R256_UNROLL_R(1)
+		R256_8_ROUNDS(1);
 	#endif
-	#if   R256_Unroll_R(2)
-		R256_8_rounds(2);
+	#if   R256_UNROLL_R(2)
+		R256_8_ROUNDS(2);
 	#endif
-	#if   R256_Unroll_R(3)
-		R256_8_rounds(3);
+	#if   R256_UNROLL_R(3)
+		R256_8_ROUNDS(3);
 	#endif
-	#if   R256_Unroll_R(4)
-		R256_8_rounds(4);
+	#if   R256_UNROLL_R(4)
+		R256_8_ROUNDS(4);
 	#endif
-	#if   R256_Unroll_R(5)
-		R256_8_rounds(5);
+	#if   R256_UNROLL_R(5)
+		R256_8_ROUNDS(5);
 	#endif
-	#if   R256_Unroll_R(6)
-		R256_8_rounds(6);
+	#if   R256_UNROLL_R(6)
+		R256_8_ROUNDS(6);
 	#endif
-	#if   R256_Unroll_R(7)
-		R256_8_rounds(7);
+	#if   R256_UNROLL_R(7)
+		R256_8_ROUNDS(7);
 	#endif
-	#if   R256_Unroll_R(8)
-		R256_8_rounds(8);
+	#if   R256_UNROLL_R(8)
+		R256_8_ROUNDS(8);
 	#endif
-	#if   R256_Unroll_R(9)
-		R256_8_rounds(9);
+	#if   R256_UNROLL_R(9)
+		R256_8_ROUNDS(9);
 	#endif
-	#if   R256_Unroll_R(10)
-		R256_8_rounds(10);
+	#if   R256_UNROLL_R(10)
+		R256_8_ROUNDS(10);
 	#endif
-	#if   R256_Unroll_R(11)
-		R256_8_rounds(11);
+	#if   R256_UNROLL_R(11)
+		R256_8_ROUNDS(11);
 	#endif
-	#if   R256_Unroll_R(12)
-		R256_8_rounds(12);
+	#if   R256_UNROLL_R(12)
+		R256_8_ROUNDS(12);
 	#endif
-	#if   R256_Unroll_R(13)
-		R256_8_rounds(13);
+	#if   R256_UNROLL_R(13)
+		R256_8_ROUNDS(13);
 	#endif
-	#if   R256_Unroll_R(14)
-		R256_8_rounds(14);
+	#if   R256_UNROLL_R(14)
+		R256_8_ROUNDS(14);
 	#endif
 	#if  (SKEIN_UNROLL_256 > 14)
 #error  "need more unrolling in skein_256_process_block"
@@ -225,7 +225,7 @@ do { \
 		ctx->X[2] = X2 ^ w[2];
 		ctx->X[3] = X3 ^ w[3];
 
-		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
+		skein_show_round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
 	} while (--blk_cnt);
@@ -281,7 +281,7 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 	X_ptr[4] = &X4;  X_ptr[5] = &X5;  X_ptr[6] = &X6;  X_ptr[7] = &X7;
 #endif
 
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -306,9 +306,9 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 		ts[2] = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
-		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
+		skein_get64_lsb_first(w, blk_ptr, WCNT);
+		debug_save_tweak(ctx);
+		skein_show_block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X0   = w[0] + ks[0]; /* do the first full key injection */
 		X1   = w[1] + ks[1];
@@ -321,22 +321,22 @@ void skein_512_process_block(struct skein_512_ctx *ctx, const u8 *blk_ptr,
 
 		blk_ptr += SKEIN_512_BLOCK_BYTES;
 
-		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
+		skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
 				 X_ptr);
 		/* run the rounds */
-#define Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
+#define ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
 do { \
-	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
-	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
-	X##p4 += X##p5; X##p5 = RotL_64(X##p5, ROT##_2); X##p5 ^= X##p4; \
-	X##p6 += X##p7; X##p7 = RotL_64(X##p7, ROT##_3); X##p7 ^= X##p6; \
+	X##p0 += X##p1; X##p1 = rotl_64(X##p1, ROT##_0); X##p1 ^= X##p0; \
+	X##p2 += X##p3; X##p3 = rotl_64(X##p3, ROT##_1); X##p3 ^= X##p2; \
+	X##p4 += X##p5; X##p5 = rotl_64(X##p5, ROT##_2); X##p5 ^= X##p4; \
+	X##p6 += X##p7; X##p7 = rotl_64(X##p7, ROT##_3); X##p7 ^= X##p6; \
 } while (0)
 
 #if SKEIN_UNROLL_512 == 0
 #define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) /* unrolled */ \
 do { \
-	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
+	ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \
 } while (0)
 
 #define I512(R) \
@@ -350,13 +350,13 @@ do { \
 	X5   += ks[((R) + 6) % 9] + ts[((R) + 1) % 3]; \
 	X6   += ks[((R) + 7) % 9] + ts[((R) + 2) % 3]; \
 	X7   += ks[((R) + 8) % 9] +     (R) + 1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
 #define R512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num) \
 do { \
-	Round512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
+	ROUND512(p0, p1, p2, p3, p4, p5, p6, p7, ROT, r_num); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + r_num, X_ptr); \
 } while (0)
 
 #define I512(R) \
@@ -373,13 +373,13 @@ do { \
 	/* rotate key schedule */ \
 	ks[r +         (R) + 8] = ks[r + (R) - 1]; \
 	ts[r +         (R) + 2] = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 		for (r = 1; r < 2 * RCNT; r += 2 * SKEIN_UNROLL_512)
 #endif /* end of looped code definitions */
 		{
-#define R512_8_rounds(R)  /* do 8 full rounds */  \
+#define R512_8_ROUNDS(R)  /* do 8 full rounds */  \
 do { \
 		R512(0, 1, 2, 3, 4, 5, 6, 7, R_512_0, 8 * (R) + 1);   \
 		R512(2, 1, 4, 7, 6, 5, 0, 3, R_512_1, 8 * (R) + 2);   \
@@ -393,54 +393,54 @@ do { \
 		I512(2 * (R) + 1);        /* and key injection */ \
 } while (0)
 
-			R512_8_rounds(0);
+			R512_8_ROUNDS(0);
 
-#define R512_Unroll_R(NN) \
+#define R512_UNROLL_R(NN) \
 		((SKEIN_UNROLL_512 == 0 && \
 		  SKEIN_512_ROUNDS_TOTAL/8 > (NN)) || \
 		 (SKEIN_UNROLL_512 > (NN)))
 
-	#if   R512_Unroll_R(1)
-			R512_8_rounds(1);
+	#if   R512_UNROLL_R(1)
+			R512_8_ROUNDS(1);
 	#endif
-	#if   R512_Unroll_R(2)
-			R512_8_rounds(2);
+	#if   R512_UNROLL_R(2)
+			R512_8_ROUNDS(2);
 	#endif
-	#if   R512_Unroll_R(3)
-			R512_8_rounds(3);
+	#if   R512_UNROLL_R(3)
+			R512_8_ROUNDS(3);
 	#endif
-	#if   R512_Unroll_R(4)
-			R512_8_rounds(4);
+	#if   R512_UNROLL_R(4)
+			R512_8_ROUNDS(4);
 	#endif
-	#if   R512_Unroll_R(5)
-			R512_8_rounds(5);
+	#if   R512_UNROLL_R(5)
+			R512_8_ROUNDS(5);
 	#endif
-	#if   R512_Unroll_R(6)
-			R512_8_rounds(6);
+	#if   R512_UNROLL_R(6)
+			R512_8_ROUNDS(6);
 	#endif
-	#if   R512_Unroll_R(7)
-			R512_8_rounds(7);
+	#if   R512_UNROLL_R(7)
+			R512_8_ROUNDS(7);
 	#endif
-	#if   R512_Unroll_R(8)
-			R512_8_rounds(8);
+	#if   R512_UNROLL_R(8)
+			R512_8_ROUNDS(8);
 	#endif
-	#if   R512_Unroll_R(9)
-			R512_8_rounds(9);
+	#if   R512_UNROLL_R(9)
+			R512_8_ROUNDS(9);
 	#endif
-	#if   R512_Unroll_R(10)
-			R512_8_rounds(10);
+	#if   R512_UNROLL_R(10)
+			R512_8_ROUNDS(10);
 	#endif
-	#if   R512_Unroll_R(11)
-			R512_8_rounds(11);
+	#if   R512_UNROLL_R(11)
+			R512_8_ROUNDS(11);
 	#endif
-	#if   R512_Unroll_R(12)
-			R512_8_rounds(12);
+	#if   R512_UNROLL_R(12)
+			R512_8_ROUNDS(12);
 	#endif
-	#if   R512_Unroll_R(13)
-			R512_8_rounds(13);
+	#if   R512_UNROLL_R(13)
+			R512_8_ROUNDS(13);
 	#endif
-	#if   R512_Unroll_R(14)
-			R512_8_rounds(14);
+	#if   R512_UNROLL_R(14)
+			R512_8_ROUNDS(14);
 	#endif
 	#if  (SKEIN_UNROLL_512 > 14)
 #error  "need more unrolling in skein_512_process_block"
@@ -456,7 +456,7 @@ do { \
 		ctx->X[5] = X5 ^ w[5];
 		ctx->X[6] = X6 ^ w[6];
 		ctx->X[7] = X7 ^ w[7];
-		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
+		skein_show_round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
 	} while (--blk_cnt);
@@ -483,10 +483,10 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 			      size_t blk_cnt, size_t byte_cnt_add)
 { /* do it in C, always looping (unrolled is bigger AND slower!) */
 	enum {
-		WCNT = SKEIN1024_STATE_WORDS
+		WCNT = SKEIN_1024_STATE_WORDS
 	};
 #undef  RCNT
-#define RCNT  (SKEIN1024_ROUNDS_TOTAL/8)
+#define RCNT  (SKEIN_1024_ROUNDS_TOTAL/8)
 
 #ifdef SKEIN_LOOP /* configure how much to unroll the loop */
 #define SKEIN_UNROLL_1024 ((SKEIN_LOOP)%10)
@@ -519,7 +519,7 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 	X_ptr[15] = &X15;
 #endif
 
-	Skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
+	skein_assert(blk_cnt != 0); /* never call with blk_cnt == 0! */
 	ts[0] = ctx->h.T[0];
 	ts[1] = ctx->h.T[1];
 	do  {
@@ -554,9 +554,9 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 		ts[2]  = ts[0] ^ ts[1];
 
 		/* get input block in little-endian format */
-		Skein_Get64_LSB_First(w, blk_ptr, WCNT);
-		DebugSaveTweak(ctx);
-		Skein_Show_Block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
+		skein_get64_lsb_first(w, blk_ptr, WCNT);
+		debug_save_tweak(ctx);
+		skein_show_block(BLK_BITS, &ctx->h, ctx->X, blk_ptr, w, ks, ts);
 
 		X00    =  w[0] +  ks[0]; /* do the first full key injection */
 		X01    =  w[1] +  ks[1];
@@ -575,29 +575,29 @@ void skein_1024_process_block(struct skein_1024_ctx *ctx, const u8 *blk_ptr,
 		X14    = w[14] + ks[14] + ts[1];
 		X15    = w[15] + ks[15];
 
-		Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
+		skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INITIAL,
 				 X_ptr);
 
-#define Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
+#define ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
 			pF, ROT, r_num) \
 do { \
-	X##p0 += X##p1; X##p1 = RotL_64(X##p1, ROT##_0); X##p1 ^= X##p0;   \
-	X##p2 += X##p3; X##p3 = RotL_64(X##p3, ROT##_1); X##p3 ^= X##p2;   \
-	X##p4 += X##p5; X##p5 = RotL_64(X##p5, ROT##_2); X##p5 ^= X##p4;   \
-	X##p6 += X##p7; X##p7 = RotL_64(X##p7, ROT##_3); X##p7 ^= X##p6;   \
-	X##p8 += X##p9; X##p9 = RotL_64(X##p9, ROT##_4); X##p9 ^= X##p8;   \
-	X##pA += X##pB; X##pB = RotL_64(X##pB, ROT##_5); X##pB ^= X##pA;   \
-	X##pC += X##pD; X##pD = RotL_64(X##pD, ROT##_6); X##pD ^= X##pC;   \
-	X##pE += X##pF; X##pF = RotL_64(X##pF, ROT##_7); X##pF ^= X##pE;   \
+	X##p0 += X##p1; X##p1 = rotl_64(X##p1, ROT##_0); X##p1 ^= X##p0;   \
+	X##p2 += X##p3; X##p3 = rotl_64(X##p3, ROT##_1); X##p3 ^= X##p2;   \
+	X##p4 += X##p5; X##p5 = rotl_64(X##p5, ROT##_2); X##p5 ^= X##p4;   \
+	X##p6 += X##p7; X##p7 = rotl_64(X##p7, ROT##_3); X##p7 ^= X##p6;   \
+	X##p8 += X##p9; X##p9 = rotl_64(X##p9, ROT##_4); X##p9 ^= X##p8;   \
+	X##pA += X##pB; X##pB = rotl_64(X##pB, ROT##_5); X##pB ^= X##pA;   \
+	X##pC += X##pD; X##pD = rotl_64(X##pD, ROT##_6); X##pD ^= X##pC;   \
+	X##pE += X##pF; X##pF = rotl_64(X##pF, ROT##_7); X##pF ^= X##pE;   \
 } while (0)
 
 #if SKEIN_UNROLL_1024 == 0
 #define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \
 		ROT, rn) \
 do { \
-	Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
-			pF, ROT, rn) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rn, X_ptr); \
+	ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
+			pF, ROT, rn); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, rn, X_ptr); \
 } while (0)
 
 #define I1024(R) \
@@ -619,15 +619,15 @@ do { \
 	X13   += ks[((R) + 14) % 17] + ts[((R) + 1) % 3]; \
 	X14   += ks[((R) + 15) % 17] + ts[((R) + 2) % 3]; \
 	X15   += ks[((R) + 16) % 17] +     (R) + 1;       \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 #else /* looping version */
 #define R1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, pF, \
 		ROT, rn) \
 do { \
-	Round1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
-			pF, ROT, rn) \
-	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rn, X_ptr); \
+	ROUND1024(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, pA, pB, pC, pD, pE, \
+			pF, ROT, rn); \
+	skein_show_r_ptr(BLK_BITS, &ctx->h, 4 * (r - 1) + rn, X_ptr); \
 } while (0)
 
 #define I1024(R) \
@@ -652,13 +652,13 @@ do { \
 	/* rotate key schedule */ \
 	ks[r  +         (R) + 16] = ks[r + (R) - 1]; \
 	ts[r  +         (R) +  2] = ts[r + (R) - 1]; \
-	Skein_Show_R_Ptr(BLK_BITSi, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
+	skein_show_r_ptr(BLK_BITSi, &ctx->h, SKEIN_RND_KEY_INJECT, X_ptr); \
 } while (0)
 
 		for (r = 1; r <= 2 * RCNT; r += 2 * SKEIN_UNROLL_1024)
 #endif
 		{
-#define R1024_8_rounds(R) \
+#define R1024_8_ROUNDS(R) \
 do { \
 	R1024(00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, \
 		R1024_0, 8*(R) + 1); \
@@ -680,54 +680,54 @@ do { \
 	I1024(2*(R)+1); \
 } while (0)
 
-			R1024_8_rounds(0);
+			R1024_8_ROUNDS(0);
 
-#define R1024_Unroll_R(NN) \
+#define R1024_UNROLL_R(NN) \
 		((SKEIN_UNROLL_1024 == 0 && \
-		  SKEIN1024_ROUNDS_TOTAL/8 > (NN)) || \
+		  SKEIN_1024_ROUNDS_TOTAL/8 > (NN)) || \
 		 (SKEIN_UNROLL_1024 > (NN)))
 
-	#if   R1024_Unroll_R(1)
-			R1024_8_rounds(1);
+	#if   R1024_UNROLL_R(1)
+			R1024_8_ROUNDS(1);
 	#endif
-	#if   R1024_Unroll_R(2)
-			R1024_8_rounds(2);
+	#if   R1024_UNROLL_R(2)
+			R1024_8_ROUNDS(2);
 	#endif
-	#if   R1024_Unroll_R(3)
-			R1024_8_rounds(3);
+	#if   R1024_UNROLL_R(3)
+			R1024_8_ROUNDS(3);
 	#endif
-	#if   R1024_Unroll_R(4)
-			R1024_8_rounds(4);
+	#if   R1024_UNROLL_R(4)
+			R1024_8_ROUNDS(4);
 	#endif
-	#if   R1024_Unroll_R(5)
-			R1024_8_rounds(5);
+	#if   R1024_UNROLL_R(5)
+			R1024_8_ROUNDS(5);
 	#endif
-	#if   R1024_Unroll_R(6)
-			R1024_8_rounds(6);
+	#if   R1024_UNROLL_R(6)
+			R1024_8_ROUNDS(6);
 	#endif
-	#if   R1024_Unroll_R(7)
-			R1024_8_rounds(7);
+	#if   R1024_UNROLL_R(7)
+			R1024_8_ROUNDS(7);
 	#endif
-	#if   R1024_Unroll_R(8)
-			R1024_8_rounds(8);
+	#if   R1024_UNROLL_R(8)
+			R1024_8_ROUNDS(8);
 	#endif
-	#if   R1024_Unroll_R(9)
-			R1024_8_rounds(9);
+	#if   R1024_UNROLL_R(9)
+			R1024_8_ROUNDS(9);
 	#endif
-	#if   R1024_Unroll_R(10)
-			R1024_8_rounds(10);
+	#if   R1024_UNROLL_R(10)
+			R1024_8_ROUNDS(10);
 	#endif
-	#if   R1024_Unroll_R(11)
-			R1024_8_rounds(11);
+	#if   R1024_UNROLL_R(11)
+			R1024_8_ROUNDS(11);
 	#endif
-	#if   R1024_Unroll_R(12)
-			R1024_8_rounds(12);
+	#if   R1024_UNROLL_R(12)
+			R1024_8_ROUNDS(12);
 	#endif
-	#if   R1024_Unroll_R(13)
-			R1024_8_rounds(13);
+	#if   R1024_UNROLL_R(13)
+			R1024_8_ROUNDS(13);
 	#endif
-	#if   R1024_Unroll_R(14)
-			R1024_8_rounds(14);
+	#if   R1024_UNROLL_R(14)
+			R1024_8_ROUNDS(14);
 	#endif
 #if  (SKEIN_UNROLL_1024 > 14)
 #error  "need more unrolling in Skein_1024_Process_Block"
@@ -752,10 +752,10 @@ do { \
 		ctx->X[14] = X14 ^ w[14];
 		ctx->X[15] = X15 ^ w[15];
 
-		Skein_Show_Round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
+		skein_show_round(BLK_BITS, &ctx->h, SKEIN_RND_FEED_FWD, ctx->X);
 
 		ts[1] &= ~SKEIN_T1_FLAG_FIRST;
-		blk_ptr += SKEIN1024_BLOCK_BYTES;
+		blk_ptr += SKEIN_1024_BLOCK_BYTES;
 	} while (--blk_cnt);
 	ctx->h.T[0] = ts[0];
 	ctx->h.T[1] = ts[1];
diff --git a/drivers/staging/skein/threefishApi.c b/drivers/staging/skein/threefishApi.c
index 17a314b..0ba42fa 100644
--- a/drivers/staging/skein/threefishApi.c
+++ b/drivers/staging/skein/threefishApi.c
@@ -9,7 +9,7 @@ void threefish_set_key(struct threefish_key *key_ctx,
 {
 	int key_words = state_size / 64;
 	int i;
-	u64 parity = KeyScheduleConst;
+	u64 parity = KEY_SCHEDULE_CONST;
 
 	key_ctx->tweak[0] = tweak[0];
 	key_ctx->tweak[1] = tweak[1];
@@ -29,9 +29,9 @@ void threefish_encrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
-	Skein_Get64_LSB_First(plain, in, key_ctx->state_size / 64);
+	skein_get64_lsb_first(plain, in, key_ctx->state_size / 64);
 	threefish_encrypt_block_words(key_ctx, plain, cipher);
-	Skein_Put64_LSB_First(out, cipher, key_ctx->state_size / 8);
+	skein_put64_lsb_first(out, cipher, key_ctx->state_size / 8);
 }
 
 void threefish_encrypt_block_words(struct threefish_key *key_ctx, u64 *in,
@@ -56,9 +56,9 @@ void threefish_decrypt_block_bytes(struct threefish_key *key_ctx, u8 *in,
 	u64 plain[SKEIN_MAX_STATE_WORDS];        /* max number of words*/
 	u64 cipher[SKEIN_MAX_STATE_WORDS];
 
-	Skein_Get64_LSB_First(cipher, in, key_ctx->state_size / 64);
+	skein_get64_lsb_first(cipher, in, key_ctx->state_size / 64);
 	threefish_decrypt_block_words(key_ctx, cipher, plain);
-	Skein_Put64_LSB_First(out, plain, key_ctx->state_size / 8);
+	skein_put64_lsb_first(out, plain, key_ctx->state_size / 8);
 }
 
 void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 06/06] staging: crypto: skein: rename files
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
                   ` (4 preceding siblings ...)
  2014-05-19  8:09 ` [PATCH v2 05/06] staging: crypto: skein: rename macros Anton Saraev
@ 2014-05-19  8:09 ` Anton Saraev
  2014-05-19 13:29   ` Jake Edge
  2014-05-19 13:45   ` Jake Edge
  2014-05-19  8:53 ` [PATCH v2 00/06] staging: crypto: skein: fixing style issues Dan Carpenter
  6 siblings, 2 replies; 20+ messages in thread
From: Anton Saraev @ 2014-05-19  8:09 UTC (permalink / raw)
  To: gregkh; +Cc: antonysaraev, jason, jake, devel, linux-kernel

camelCase is not accepted in the Linux Kernel. To prepare skein
driver for mainline inclusion, we rename all files to
non-camelCase equivalents.

Signed-off-by: Anton Saraev <antonysaraev@gmail.com>
---
 drivers/staging/skein/Makefile                                 | 10 +++++-----
 drivers/staging/skein/TODO                                     |  1 -
 drivers/staging/skein/include/{skeinApi.h => skein_api.h}      |  4 ++--
 .../staging/skein/include/{threefishApi.h => threefish_api.h}  |  2 +-
 drivers/staging/skein/{skeinApi.c => skein_api.c}              |  2 +-
 .../staging/skein/{skeinBlockNo3F.c => skein_block_no_3f.c}    |  2 +-
 .../skein/{threefish1024Block.c => threefish_1024_block.c}     |  2 +-
 .../skein/{threefish256Block.c => threefish_256_block.c}       |  2 +-
 .../skein/{threefish512Block.c => threefish_512_block.c}       |  2 +-
 drivers/staging/skein/{threefishApi.c => threefish_api.c}      |  3 +--
 10 files changed, 14 insertions(+), 16 deletions(-)
 rename drivers/staging/skein/include/{skeinApi.h => skein_api.h} (99%)
 rename drivers/staging/skein/include/{threefishApi.h => threefish_api.h} (99%)
 rename drivers/staging/skein/{skeinApi.c => skein_api.c} (99%)
 rename drivers/staging/skein/{skeinBlockNo3F.c => skein_block_no_3f.c} (99%)
 rename drivers/staging/skein/{threefish1024Block.c => threefish_1024_block.c} (99%)
 rename drivers/staging/skein/{threefish256Block.c => threefish_256_block.c} (99%)
 rename drivers/staging/skein/{threefish512Block.c => threefish_512_block.c} (99%)
 rename drivers/staging/skein/{threefishApi.c => threefish_api.c} (98%)

diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile
index 2bb386e..29f51bf 100644
--- a/drivers/staging/skein/Makefile
+++ b/drivers/staging/skein/Makefile
@@ -4,10 +4,10 @@
 subdir-ccflags-y := -I$(src)/include/
 
 obj-$(CONFIG_CRYPTO_SKEIN) +=   skein.o \
-				skeinApi.o \
+				skein_api.o \
 				skein_block.o
 
-obj-$(CONFIG_CRYPTO_THREEFISH) += threefish1024Block.o \
-				  threefish256Block.o \
-				  threefish512Block.o \
-				  threefishApi.o
+obj-$(CONFIG_CRYPTO_THREEFISH) += threefish_1024_block.o \
+				  threefish_256_block.o \
+				  threefish_512_block.o \
+				  threefish_api.o
diff --git a/drivers/staging/skein/TODO b/drivers/staging/skein/TODO
index 88a6e81..cd3508d 100644
--- a/drivers/staging/skein/TODO
+++ b/drivers/staging/skein/TODO
@@ -1,6 +1,5 @@
 skein/threefish TODO
 
- - rename files
  - move macros into appropriate header files
  - add / pass test vectors
  - module support
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skein_api.h
similarity index 99%
rename from drivers/staging/skein/include/skeinApi.h
rename to drivers/staging/skein/include/skein_api.h
index b4e879d..87f769a 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skein_api.h
@@ -28,7 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #define SKEINAPI_H
 
 /**
- * @file skeinApi.h
+ * @file skein_api.h
  * @brief A Skein API and its functions.
  * @{
  *
@@ -44,7 +44,7 @@ OTHER DEALINGS IN THE SOFTWARE.
  *
  * @code
  *
- * #include <skeinApi.h>
+ * #include <skein_api.h>
  *
  * ...
  * struct skein_ctx ctx;             // a Skein hash or MAC context
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefish_api.h
similarity index 99%
rename from drivers/staging/skein/include/threefishApi.h
rename to drivers/staging/skein/include/threefish_api.h
index 96cc0e8..fe28981 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefish_api.h
@@ -3,7 +3,7 @@
 #define THREEFISHAPI_H
 
 /**
- * @file threefishApi.h
+ * @file threefish_api.h
  * @brief A Threefish cipher API and its functions.
  * @{
  *
diff --git a/drivers/staging/skein/skeinApi.c b/drivers/staging/skein/skein_api.c
similarity index 99%
rename from drivers/staging/skein/skeinApi.c
rename to drivers/staging/skein/skein_api.c
index 16d596b..7fb0160 100644
--- a/drivers/staging/skein/skeinApi.c
+++ b/drivers/staging/skein/skein_api.c
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 */
 
 #include <linux/string.h>
-#include <skeinApi.h>
+#include <skein_api.h>
 
 int skein_ctx_prepare(struct skein_ctx *ctx, enum skein_size size)
 {
diff --git a/drivers/staging/skein/skeinBlockNo3F.c b/drivers/staging/skein/skein_block_no_3f.c
similarity index 99%
rename from drivers/staging/skein/skeinBlockNo3F.c
rename to drivers/staging/skein/skein_block_no_3f.c
index 4ee7f9f..23a3ac5 100644
--- a/drivers/staging/skein/skeinBlockNo3F.c
+++ b/drivers/staging/skein/skein_block_no_3f.c
@@ -1,7 +1,7 @@
 
 #include <linux/string.h>
 #include <skein.h>
-#include <threefishApi.h>
+#include <threefish_api.h>
 
 
 /*****************************  Skein_256 ******************************/
diff --git a/drivers/staging/skein/threefish1024Block.c b/drivers/staging/skein/threefish_1024_block.c
similarity index 99%
rename from drivers/staging/skein/threefish1024Block.c
rename to drivers/staging/skein/threefish_1024_block.c
index 827ce1a..7ecde26 100644
--- a/drivers/staging/skein/threefish1024Block.c
+++ b/drivers/staging/skein/threefish_1024_block.c
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include <threefish_api.h>
 
 
 void threefish_encrypt_1024(struct threefish_key *key_ctx, u64 *input,
diff --git a/drivers/staging/skein/threefish256Block.c b/drivers/staging/skein/threefish_256_block.c
similarity index 99%
rename from drivers/staging/skein/threefish256Block.c
rename to drivers/staging/skein/threefish_256_block.c
index 1329c71..6bb747c 100644
--- a/drivers/staging/skein/threefish256Block.c
+++ b/drivers/staging/skein/threefish_256_block.c
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include <threefish_api.h>
 
 
 void threefish_encrypt_256(struct threefish_key *key_ctx, u64 *input,
diff --git a/drivers/staging/skein/threefish512Block.c b/drivers/staging/skein/threefish_512_block.c
similarity index 99%
rename from drivers/staging/skein/threefish512Block.c
rename to drivers/staging/skein/threefish_512_block.c
index db50d83..68bf5c4 100644
--- a/drivers/staging/skein/threefish512Block.c
+++ b/drivers/staging/skein/threefish_512_block.c
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include <threefish_api.h>
 
 
 void threefish_encrypt_512(struct threefish_key *key_ctx, u64 *input,
diff --git a/drivers/staging/skein/threefishApi.c b/drivers/staging/skein/threefish_api.c
similarity index 98%
rename from drivers/staging/skein/threefishApi.c
rename to drivers/staging/skein/threefish_api.c
index 0ba42fa..45769c5 100644
--- a/drivers/staging/skein/threefishApi.c
+++ b/drivers/staging/skein/threefish_api.c
@@ -1,7 +1,7 @@
 
 
 #include <linux/string.h>
-#include <threefishApi.h>
+#include <threefish_api.h>
 
 void threefish_set_key(struct threefish_key *key_ctx,
 		       enum threefish_size state_size,
@@ -76,4 +76,3 @@ void threefish_decrypt_block_words(struct threefish_key *key_ctx, u64 *in,
 		break;
 	}
 }
-
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 00/06] staging: crypto: skein: fixing style issues
  2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
                   ` (5 preceding siblings ...)
  2014-05-19  8:09 ` [PATCH v2 06/06] staging: crypto: skein: rename files Anton Saraev
@ 2014-05-19  8:53 ` Dan Carpenter
  2014-05-19 14:11   ` Jason Cooper
  6 siblings, 1 reply; 20+ messages in thread
From: Dan Carpenter @ 2014-05-19  8:53 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, devel, linux-kernel, jason, jake

Was there really a v1 version of this patchset because I don't see it in
my inbox?

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19  8:09 ` [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars Anton Saraev
@ 2014-05-19  9:02   ` Dan Carpenter
  2014-05-19 14:40   ` Jake Edge
  1 sibling, 0 replies; 20+ messages in thread
From: Dan Carpenter @ 2014-05-19  9:02 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, devel, linux-kernel, jason, jake

On Mon, May 19, 2014 at 12:09:55PM +0400, Anton Saraev wrote:
>  #if SKEIN_UNROLL_256 == 0
> -#define R256(p0, p1, p2, p3, ROT, rNum) /* fully unrolled */ \
> +#define R256(p0, p1, p2, p3, ROT, r_num) /* fully unrolled */ \
>  do { \
> -	Round256(p0, p1, p2, p3, ROT, rNum) \
> -	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, rNum, Xptr); \
> +	Round256(p0, p1, p2, p3, ROT, r_num); \
> +	Skein_Show_R_Ptr(BLK_BITS, &ctx->h, r_num, X_ptr); \

Adding a semi-colon here looks suspiciously like a compile fix.  It's
great that you're fixing bugs, but do it in a separate patch with a
changelog.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 05/06] staging: crypto: skein: rename macros
  2014-05-19  8:09 ` [PATCH v2 05/06] staging: crypto: skein: rename macros Anton Saraev
@ 2014-05-19  9:08   ` Dan Carpenter
  2014-05-19 14:04     ` Jason Cooper
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Carpenter @ 2014-05-19  9:08 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, devel, linux-kernel, jason, jake

On Mon, May 19, 2014 at 12:09:58PM +0400, Anton Saraev wrote:
> +/* ignore all asserts, for performance */
> +#define skein_assert_ret(x, ret_code)
> +#define skein_assert(x)

Not related to this patch, but defining away asserts like this is a bad
idea.  What if they have side affects like:

	skein_assert(foo++ == bar);

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 06/06] staging: crypto: skein: rename files
  2014-05-19  8:09 ` [PATCH v2 06/06] staging: crypto: skein: rename files Anton Saraev
@ 2014-05-19 13:29   ` Jake Edge
  2014-05-19 14:05     ` Jason Cooper
  2014-05-19 13:45   ` Jake Edge
  1 sibling, 1 reply; 20+ messages in thread
From: Jake Edge @ 2014-05-19 13:29 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, jason, devel, linux-kernel

On Mon, 19 May 2014 12:09:59 +0400 Anton Saraev wrote:

> rename drivers/staging/skein/{skeinBlockNo3F.c =>
> skein_block_no_3f.c} (99%)

fwiw, this file (skeinBlockNo3F.c) seems to be unused ... it kind of looks
like a temporary file that got checked in by mistake.  It's probably worth
deleting it in this patch or a separate one, it seems to me.

jake

-- 
Jake Edge - LWN - jake@lwn.net - http://lwn.net

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 06/06] staging: crypto: skein: rename files
  2014-05-19  8:09 ` [PATCH v2 06/06] staging: crypto: skein: rename files Anton Saraev
  2014-05-19 13:29   ` Jake Edge
@ 2014-05-19 13:45   ` Jake Edge
  2014-05-19 22:22     ` Greg KH
  1 sibling, 1 reply; 20+ messages in thread
From: Jake Edge @ 2014-05-19 13:45 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, jason, devel, linux-kernel

On Mon, 19 May 2014 12:09:59 +0400 Anton Saraev wrote:

> --- a/drivers/staging/skein/Makefile
> +++ b/drivers/staging/skein/Makefile
> @@ -4,10 +4,10 @@
>  subdir-ccflags-y := -I$(src)/include/

as part of the rearranging of files, I think you want to get rid of
this include directory, move the files up to the main directory and
include them as "skein.h" (rather than <skein.h>).

Then this line can be removed from the Makefile.

> --- a/drivers/staging/skein/threefish1024Block.c
> +++ b/drivers/staging/skein/threefish_1024_block.c
> @@ -1,5 +1,5 @@
>  #include <linux/string.h>
> -#include <threefishApi.h>
> +#include <threefish_api.h>

incidentally, none of the threefish_*_block.c files actually needs
linux/string.h ... there may be other files where that's true too, it
seems to have just gotten added everywhere ...

jake

-- 
Jake Edge - LWN - jake@lwn.net - http://lwn.net

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 05/06] staging: crypto: skein: rename macros
  2014-05-19  9:08   ` Dan Carpenter
@ 2014-05-19 14:04     ` Jason Cooper
  0 siblings, 0 replies; 20+ messages in thread
From: Jason Cooper @ 2014-05-19 14:04 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Anton Saraev, gregkh, devel, linux-kernel, jake

On Mon, May 19, 2014 at 12:08:39PM +0300, Dan Carpenter wrote:
> On Mon, May 19, 2014 at 12:09:58PM +0400, Anton Saraev wrote:
> > +/* ignore all asserts, for performance */
> > +#define skein_assert_ret(x, ret_code)
> > +#define skein_assert(x)
> 
> Not related to this patch, but defining away asserts like this is a bad
> idea.  What if they have side affects like:
> 
> 	skein_assert(foo++ == bar);

Agreed.  This driver is definitely a work in progress.  If you look at
the history, you'll see that I started with a bit-for-bit copy of a
publicly available reference implementation.  After we get the coding
style in shape, there are plenty of other improvements to make.

Thanks for the review.

thx,

Jason.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 06/06] staging: crypto: skein: rename files
  2014-05-19 13:29   ` Jake Edge
@ 2014-05-19 14:05     ` Jason Cooper
  0 siblings, 0 replies; 20+ messages in thread
From: Jason Cooper @ 2014-05-19 14:05 UTC (permalink / raw)
  To: Jake Edge; +Cc: Anton Saraev, gregkh, devel, linux-kernel

On Mon, May 19, 2014 at 07:29:26AM -0600, Jake Edge wrote:
> On Mon, 19 May 2014 12:09:59 +0400 Anton Saraev wrote:
> 
> > rename drivers/staging/skein/{skeinBlockNo3F.c =>
> > skein_block_no_3f.c} (99%)
> 
> fwiw, this file (skeinBlockNo3F.c) seems to be unused ... it kind of looks
> like a temporary file that got checked in by mistake.  It's probably worth
> deleting it in this patch or a separate one, it seems to me.

Correct.  It was a part of the reference implementation I started with.
It's never actually compiled.  I'm not sure what it's purpose was in the
reference implementation, either.

thx,

Jason.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 00/06] staging: crypto: skein: fixing style issues
  2014-05-19  8:53 ` [PATCH v2 00/06] staging: crypto: skein: fixing style issues Dan Carpenter
@ 2014-05-19 14:11   ` Jason Cooper
  0 siblings, 0 replies; 20+ messages in thread
From: Jason Cooper @ 2014-05-19 14:11 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Anton Saraev, gregkh, devel, linux-kernel, jake

Dan,

On Mon, May 19, 2014 at 11:53:21AM +0300, Dan Carpenter wrote:
> Was there really a v1 version of this patchset because I don't see it in
> my inbox?

There was.  Anton is doing this as part of the Eudyptula Challenge [1],
and he sent the first version to me offlist.  I helped him with some of
the git format-patch/send-email options and the result is this v2.

thx,

Jason.

[1] http://www.eudyptula-challenge.org

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19  8:09 ` [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars Anton Saraev
  2014-05-19  9:02   ` Dan Carpenter
@ 2014-05-19 14:40   ` Jake Edge
  2014-05-19 19:21     ` Dan Carpenter
  1 sibling, 1 reply; 20+ messages in thread
From: Jake Edge @ 2014-05-19 14:40 UTC (permalink / raw)
  To: Anton Saraev; +Cc: gregkh, jason, devel, linux-kernel

On Mon, 19 May 2014 12:09:55 +0400 Anton Saraev wrote:

>  struct skein_ctx_hdr {
> -	size_t  hashBitLen;		/* size of hash result, in bits */
> -	size_t  bCnt;			/* current byte count in buffer b[] */
> -	u64  T[SKEIN_MODIFIER_WORDS];	/* tweak: T[0]=byte cnt, T[1]=flags */
> +	size_t hash_bit_len;		/* size of hash result, in bits */
> +	size_t b_cnt;			/* current byte count in buffer b[] */
> +	u64 T[SKEIN_MODIFIER_WORDS];	/* tweak: T[0]=byte cnt, T[1]=flags */

seems like 'T' should be lower case ... maybe renamed too (tweak?)?

>  struct skein_256_ctx { /* 256-bit Skein hash context structure */
>  	struct skein_ctx_hdr h;		/* common header context variables */
> -	u64  X[SKEIN_256_STATE_WORDS];	/* chaining variables */
> -	u8  b[SKEIN_256_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
> +	u64 X[SKEIN_256_STATE_WORDS];	/* chaining variables */
> +	u8 b[SKEIN_256_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
>  };
>  
>  struct skein_512_ctx { /* 512-bit Skein hash context structure */
>  	struct skein_ctx_hdr h;		/* common header context variables */
> -	u64  X[SKEIN_512_STATE_WORDS];	/* chaining variables */
> -	u8  b[SKEIN_512_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
> +	u64 X[SKEIN_512_STATE_WORDS];	/* chaining variables */
> +	u8 b[SKEIN_512_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
>  };
>  
>  struct skein1024_ctx { /* 1024-bit Skein hash context structure */
>  	struct skein_ctx_hdr h;		/* common header context variables */
> -	u64  X[SKEIN1024_STATE_WORDS];	/* chaining variables */
> -	u8  b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */
> +	u64 X[SKEIN1024_STATE_WORDS];	/* chaining variables */
> +	u8 b[SKEIN1024_BLOCK_BYTES];	/* partial block buf (8-byte aligned) */

the X arrays here should be renamed too, I suspect ...

> @@ -99,8 +99,8 @@ enum skein_size {
>   * structures as well.
>   */
>  struct skein_ctx {
> -	u64 skeinSize;
> -	u64  XSave[SKEIN_MAX_STATE_WORDS];   /* save area for state variables */
> +	u64 skein_size;
> +	u64 X_save[SKEIN_MAX_STATE_WORDS];   /* save area for state variables */

why not x_save?

> -int skein_init(struct skein_ctx *ctx, size_t hashBitLen)
> +int skein_init(struct skein_ctx *ctx, size_t hash_bit_len)
>  {
>  	int ret = SKEIN_FAIL;
> -	size_t Xlen = 0;
> +	size_t X_len = 0;
>  	u64 *X = NULL;

maybe I am missing something, but why not 'x' and 'x_len' ?

> -int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t keyLen,
> -		   size_t hashBitLen)
> +int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,
> +		   size_t hash_bit_len)
>  {
>  	int ret = SKEIN_FAIL;
>  	u64 *X = NULL;
> -	size_t Xlen = 0;
> -	u64 treeInfo = SKEIN_CFG_TREE_INFO_SEQUENTIAL;
> +	size_t X_len = 0;
> +	u64 tree_info = SKEIN_CFG_TREE_INFO_SEQUENTIAL;

and the same here?

>  void skein_reset(struct skein_ctx *ctx)
>  {
> -	size_t Xlen = 0;
> +	size_t X_len = 0;
>  	u64 *X = NULL;

here too ...

> -void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
> -			     size_t blkCnt, size_t byteCntAdd)
> +void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
> +			     size_t blk_cnt, size_t byte_cnt_add)
>  	{ /* do it in C */
>  	enum {
>  		WCNT = SKEIN_256_STATE_WORDS
> @@ -66,10 +66,11 @@ void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blkPtr,
>  	u64  X0, X1, X2, X3; /* local copy of context vars, for speed */
>  	u64  w[WCNT]; /* local copy of input block */
>  #ifdef SKEIN_DEBUG
> -	const u64 *Xptr[4]; /* use for debugging (help cc put Xn in regs) */
> -	Xptr[0] = &X0;  Xptr[1] = &X1;  Xptr[2] = &X2;  Xptr[3] = &X3;
> +	const u64 *X_ptr[4]; /* use for debugging (help cc put Xn in regs) */
> +
> +	X_ptr[0] = &X0;  X_ptr[1] = &X1;  X_ptr[2] = &X2;  X_ptr[3] = &X3;

bunch of Xs in through here too ... is X special somehow?  maybe so
because it is used in all that loop-unrolling gunk?

jake

-- 
Jake Edge - LWN - jake@lwn.net - http://lwn.net

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19 14:40   ` Jake Edge
@ 2014-05-19 19:21     ` Dan Carpenter
  2014-05-19 19:44       ` Jake Edge
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Carpenter @ 2014-05-19 19:21 UTC (permalink / raw)
  To: Jake Edge; +Cc: Anton Saraev, devel, gregkh, jason, linux-kernel

So, Jake, you're right, but if he redoes patch 2/6 then he has to redo
the rest as well.  The bad names were bad in the original code already,
so normally we let people fix things up in follow on patches in that
case.

Is that ok with you?

I totally do appreciate your review comments and agree with them.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19 19:21     ` Dan Carpenter
@ 2014-05-19 19:44       ` Jake Edge
  2014-05-19 19:55         ` Dan Carpenter
  0 siblings, 1 reply; 20+ messages in thread
From: Jake Edge @ 2014-05-19 19:44 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Anton Saraev, devel, gregkh, jason, linux-kernel

On Mon, 19 May 2014 22:21:12 +0300 Dan Carpenter wrote:
> So, Jake, you're right, but if he redoes patch 2/6 then he has to redo
> the rest as well.  The bad names were bad in the original code already,
> so normally we let people fix things up in follow on patches in that
> case.
> 
> Is that ok with you?

Sure, that seems fine ... I only had fairly minor quibbles, the vast
majority of it is good stuff ...

Not sure it's useful (or even the right way to go about it), but, if it
is, Greg (or Jason or whoever) can add my:

Reviewed-by: Jake Edge <jake@lwn.net>

to the patch set ...

jake

-- 
Jake Edge - LWN - jake@lwn.net - http://lwn.net

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars
  2014-05-19 19:44       ` Jake Edge
@ 2014-05-19 19:55         ` Dan Carpenter
  0 siblings, 0 replies; 20+ messages in thread
From: Dan Carpenter @ 2014-05-19 19:55 UTC (permalink / raw)
  To: Jake Edge; +Cc: Anton Saraev, devel, gregkh, jason, linux-kernel

On Mon, May 19, 2014 at 01:44:18PM -0600, Jake Edge wrote:
> Not sure it's useful (or even the right way to go about it), but, if it
> is, Greg (or Jason or whoever) can add my:
> 
> Reviewed-by: Jake Edge <jake@lwn.net>
> 

Yep.  Great.  Greg will add it.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 06/06] staging: crypto: skein: rename files
  2014-05-19 13:45   ` Jake Edge
@ 2014-05-19 22:22     ` Greg KH
  0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2014-05-19 22:22 UTC (permalink / raw)
  To: Jake Edge; +Cc: Anton Saraev, devel, jason, linux-kernel

On Mon, May 19, 2014 at 07:45:10AM -0600, Jake Edge wrote:
> On Mon, 19 May 2014 12:09:59 +0400 Anton Saraev wrote:
> 
> > --- a/drivers/staging/skein/Makefile
> > +++ b/drivers/staging/skein/Makefile
> > @@ -4,10 +4,10 @@
> >  subdir-ccflags-y := -I$(src)/include/
> 
> as part of the rearranging of files, I think you want to get rid of
> this include directory, move the files up to the main directory and
> include them as "skein.h" (rather than <skein.h>).
> 
> Then this line can be removed from the Makefile.

I agree, I'll not take this last one in the series.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-05-19 22:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19  8:09 [PATCH v2 00/06] staging: crypto: skein: fixing style issues Anton Saraev
2014-05-19  8:09 ` [PATCH v2 01/06] staging: crypto: skein: rename camelcase functions Anton Saraev
2014-05-19  8:09 ` [PATCH v2 02/06] staging: crypto: skein: rename camelcase vars Anton Saraev
2014-05-19  9:02   ` Dan Carpenter
2014-05-19 14:40   ` Jake Edge
2014-05-19 19:21     ` Dan Carpenter
2014-05-19 19:44       ` Jake Edge
2014-05-19 19:55         ` Dan Carpenter
2014-05-19  8:09 ` [PATCH v2 03/06] staging: crypto: skein: rename skein1024_ctx to skein_1024_ctx Anton Saraev
2014-05-19  8:09 ` [PATCH v2 04/06] staging: crypto: skein: rename enums Anton Saraev
2014-05-19  8:09 ` [PATCH v2 05/06] staging: crypto: skein: rename macros Anton Saraev
2014-05-19  9:08   ` Dan Carpenter
2014-05-19 14:04     ` Jason Cooper
2014-05-19  8:09 ` [PATCH v2 06/06] staging: crypto: skein: rename files Anton Saraev
2014-05-19 13:29   ` Jake Edge
2014-05-19 14:05     ` Jason Cooper
2014-05-19 13:45   ` Jake Edge
2014-05-19 22:22     ` Greg KH
2014-05-19  8:53 ` [PATCH v2 00/06] staging: crypto: skein: fixing style issues Dan Carpenter
2014-05-19 14:11   ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox