Skip to contentSkip to conversation

staging/skein: rename files and clean up directory structure

PATCH Superseded Jake Edge 3 participants 6 messages May 18, 2014 – May 19, 2014 Staging

lore
Share & tools
lore

Jake Edge

author
#0 lore raw

PATCH v2 1/1 staging/skein: rename files and clean up directory structure

Clean up file names and locations. Get rid of include/ directory and move those up to the top-level. Rename files to get rid of upper case. Remove skeinBlockNo3F.c as it was unused (temporary file or something?).

---

Against next-20140516

v2: use git format-patch -M as suggested by Joe Perches

 drivers/staging/skein/Makefile                     |  12 +-
 drivers/staging/skein/TODO                         |   1 -
 drivers/staging/skein/skein.c                      |   6 +-
 drivers/staging/skein/{include => }/skein.h        |   0
 drivers/staging/skein/skeinBlockNo3F.c             | 175 ---------------------
 drivers/staging/skein/{skeinApi.c => skein_api.c}  |   2 +-
 .../skein/{include/skeinApi.h => skein_api.h}      |   2 +-
 drivers/staging/skein/skein_block.c                |   2 +-
 drivers/staging/skein/{include => }/skein_block.h  |   2 +-
 drivers/staging/skein/{include => }/skein_iv.h     |   2 +-
 ...threefish1024Block.c => threefish_1024_block.c} |   2 +-
 .../{threefish256Block.c => threefish_256_block.c} |   2 +-
 .../{threefish512Block.c => threefish_512_block.c} |   2 +-
 .../skein/{threefishApi.c => threefish_api.c}      |   4 +-
 .../{include/threefishApi.h => threefish_api.h}    |   2 +-
 15 files changed, 18 insertions(+), 198 deletions(-)
 rename drivers/staging/skein/{include => }/skein.h (100%)
 delete mode 100644 drivers/staging/skein/skeinBlockNo3F.c
 rename drivers/staging/skein/{skeinApi.c => skein_api.c} (99%)
 rename drivers/staging/skein/{include/skeinApi.h => skein_api.h} (99%)
 rename drivers/staging/skein/{include => }/skein_block.h (92%)
 rename drivers/staging/skein/{include => }/skein_iv.h (98%)
 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%)
 rename drivers/staging/skein/{include/threefishApi.h => threefish_api.h} (99%)
drivers/staging/skein/Makefile +5 -7
index 2bb386e..395454c 100644
@@ -1,13 +1,11 @@
 #
 # Makefile for the skein secure hash algorithm
 #
-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
drivers/staging/skein/TODO +0 -1
index f5c167a..1a4ce28 100644
@@ -2,7 +2,6 @@ skein/threefish TODO
 
  - rename camelcase vars
  - rename camelcase functions
- - rename files
  - move macros into appropriate header files
  - add / pass test vectors
  - module support
drivers/staging/skein/skein.c +3 -3
index 096b86b..77cfedd 100644
@@ -11,9 +11,9 @@
 #define  SKEIN_PORT_CODE /* instantiate any code in skein_port.h */
 
 #include <linux/string.h>       /* get the memcpy/memset functions */
-#include <skein.h> /* get the Skein API definitions   */
-#include <skein_iv.h>    /* get precomputed IVs */
-#include <skein_block.h>
+#include "skein.h" /* get the Skein API definitions   */
+#include "skein_iv.h"    /* get precomputed IVs */
+#include "skein_block.h"
 
 /*****************************************************************/
 /*     256-bit Skein                                             */
drivers/staging/skein/skein.h renamed from drivers/staging/skein/include/skein.h +0 -0
similarity index 100%
rename from drivers/staging/skein/include/skein.h
rename to drivers/staging/skein/skein.h
drivers/staging/skein/skeinBlockNo3F.c deleted +0 -175

175 lines not on this page · raw message

drivers/staging/skein/skein_api.c renamed from drivers/staging/skein/skeinApi.c +1 -1
similarity index 99%
rename from drivers/staging/skein/skeinApi.c
rename to drivers/staging/skein/skein_api.c
index dd109bf..4256365 100644
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 */
 
 #include <linux/string.h>
-#include <skeinApi.h>
+#include "skein_api.h"
 
 int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size)
 {
drivers/staging/skein/skein_api.h renamed from drivers/staging/skein/include/skeinApi.h +1 -1
similarity index 99%
rename from drivers/staging/skein/include/skeinApi.h
rename to drivers/staging/skein/skein_api.h
index ace931a..4029b16 100644
@@ -79,7 +79,7 @@ OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <linux/types.h>
-#include <skein.h>
+#include "skein.h"
 
 /**
  * Which Skein size to use
drivers/staging/skein/skein_block.c +1 -1
index fd96ca0..7d653a6 100644
@@ -15,7 +15,7 @@
 ************************************************************************/
 
 #include <linux/string.h>
-#include <skein.h>
+#include "skein.h"
 
 #ifndef SKEIN_USE_ASM
 #define SKEIN_USE_ASM   (0) /* default is all C code (no ASM) */
drivers/staging/skein/skein_block.h renamed from drivers/staging/skein/include/skein_block.h +1 -1
similarity index 92%
rename from drivers/staging/skein/include/skein_block.h
rename to drivers/staging/skein/skein_block.h
index b15c079..b81e968 100644
@@ -10,7 +10,7 @@
 #ifndef _SKEIN_BLOCK_H_
 #define _SKEIN_BLOCK_H_
 
-#include <skein.h> /* get the Skein API definitions   */
+#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);
drivers/staging/skein/skein_iv.h renamed from drivers/staging/skein/include/skein_iv.h +1 -1
similarity index 98%
rename from drivers/staging/skein/include/skein_iv.h
rename to drivers/staging/skein/skein_iv.h
index 8dd5e4d..80d6bce 100644
@@ -1,7 +1,7 @@
 #ifndef _SKEIN_IV_H_
 #define _SKEIN_IV_H_
 
-#include <skein.h>    /* get Skein macros and types */
+#include "skein.h"    /* get Skein macros and types */
 
 /*
 ***************** Pre-computed Skein IVs *******************
drivers/staging/skein/threefish_1024_block.c renamed from drivers/staging/skein/threefish1024Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish1024Block.c
rename to drivers/staging/skein/threefish_1024_block.c
index fe7517b..82f7ae60 100644
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include "threefish_api.h"
 
 
 void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output)
drivers/staging/skein/threefish_256_block.c renamed from drivers/staging/skein/threefish256Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish256Block.c
rename to drivers/staging/skein/threefish_256_block.c
index 2ae746a..a116bdf 100644
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include "threefish_api.h"
 
 
 void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output)
drivers/staging/skein/threefish_512_block.c renamed from drivers/staging/skein/threefish512Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish512Block.c
rename to drivers/staging/skein/threefish_512_block.c
index f428fd6..8450628 100644
@@ -1,5 +1,5 @@
 #include <linux/string.h>
-#include <threefishApi.h>
+#include "threefish_api.h"
 
 
 void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output)
drivers/staging/skein/threefish_api.c renamed from drivers/staging/skein/threefishApi.c +1 -3
similarity index 98%
rename from drivers/staging/skein/threefishApi.c
rename to drivers/staging/skein/threefish_api.c
index 1e70f66..69ae12c 100644
@@ -1,7 +1,5 @@
-
-
 #include <linux/string.h>
-#include <threefishApi.h>
+#include "threefish_api.h"
 
 void threefishSetKey(struct threefish_key *keyCtx,
 			enum threefish_size stateSize,
drivers/staging/skein/threefish_api.h renamed from drivers/staging/skein/include/threefishApi.h +1 -1
similarity index 99%
rename from drivers/staging/skein/include/threefishApi.h
rename to drivers/staging/skein/threefish_api.h
index e81675d..abf409d 100644
@@ -29,7 +29,7 @@
  */
 
 #include <linux/types.h>
-#include <skein.h>
+#include "skein.h"
 
 #define KeyScheduleConst 0x1BD11BDAA9FC1A22L
 
Signature · 5 lines
1.8.4.5


-- 
Jake Edge - LWN - [email protected] - http://lwn.net
#1 lore raw

Jake, Anton,

Quoted 7 lines · Jake Edge

Clean up file names and locations. Get rid of include/ directory and move those up to the top-level. Rename files to get rid of upper case. Remove skeinBlockNo3F.c as it was unused (temporary file or something?).

---

Ahh, crap. I'm sorry. I dropped the ball here. A few weeks ago Anton (in the To:) sent me a series of patches offlist doing the exact same work this one does. Anton sent this as part of his participation in the Eudyptula Challenge [1].

So that series was about to be his first contribution to the Linux Kernel. Unfortunately, I've been wrapped around the axle with life and hadn't had time to review his latest version yet. It's completely my fault. In my defense, I did keep in touch with him and let him know I was busy. :)

Jake, would you mind dropping this patch and perhaps assisting me with reviewing Anton's series? I'll have him resend it as-is and we can go from there.

Anton, sorry for the mixup, please resend your series as is and include everybody in the To and Cc of this email. I can re-send it if you like, but I thought you might like to do the honors. Either works for me.

thx,

Jason.

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

author
#2 lore raw
Quoted 3 lines · On Sun, 18 May 2014 18:52:31 -0400 Jason Cooper wrote:

Jake, would you mind dropping this patch and perhaps assisting me with reviewing Anton's series? I'll have him resend it as-is and we can go from there.

No, that's fine. Guess I'll put my patches to clean up some other stuff (function names, etc.) on hold and see how far Anton got ...

fwiw, I did look at the lists to see if someone had already been working on this stuff, which is why it is such a good idea make sure the patches get posted publicly ...

jake

Signature · 1 line
Jake Edge - LWN - [email protected] - http://lwn.net
#3 lore raw
Quoted 6 lines · Jake Edge
Quoted 3 lines · On Sun, 18 May 2014 18:52:31 -0400 Jason Cooper wrote:

Jake, would you mind dropping this patch and perhaps assisting me with reviewing Anton's series? I'll have him resend it as-is and we can go from there.

Quoted 6 lines

No, that's fine. Guess I'll put my patches to clean up some other stuff (function names, etc.) on hold and see how far Anton got ...

fwiw, I did look at the lists to see if someone had already been working on this stuff, which is why it is such a good idea make sure the patches get posted publicly ...

Yes, I agree. It was a perfect storm of "Are my first patches good enough for the mailinglist?", "Hey, Jason, thanks for taking on drivers/irqchip", and "We need to get everything in before -rc6 for the mvebu/arm-soc cutoff before the merge window". Apparently, I'm not very good at juggling three separate rushes at once. :)

Anton has the submission process down now, so from here on out he'll just send them to the list.

Thanks for your understanding.

thx,

Jason.

#4 lore raw
In reply to Jake Edge
Quoted 6 lines · Jake Edge

Clean up file names and locations. Get rid of include/ directory and move those up to the top-level. Rename files to get rid of upper case. Remove skeinBlockNo3F.c as it was unused (temporary file or something?).

Can you resend this now against my staging-next branch? I didn't take Anton's version of this patch as it wasn't as "complete" as this one was.

thanks,

greg k-h

author
#5 lore raw

PATCH v3 1/1 staging/skein: rename files and clean up directory structure

Clean up file names and locations. Get rid of include/ directory and move those up to the top-level. Rename files to get rid of upper case. Remove skeinBlockNo3F.c as it was unused (temporary file or something?).

---

v3: against staging-next branch of staging tree
v2: use git format-patch -M as suggested by Joe Perches

 drivers/staging/skein/Makefile                     |  12 +-
 drivers/staging/skein/TODO                         |   1 -
 drivers/staging/skein/skein.c                      |   6 +-
 drivers/staging/skein/{include => }/skein.h        |   0
 drivers/staging/skein/skeinBlockNo3F.c             | 175 ---------------------
 drivers/staging/skein/{skeinApi.c => skein_api.c}  |   2 +-
 .../skein/{include/skeinApi.h => skein_api.h}      |   6 +-
 drivers/staging/skein/skein_block.c                |   2 +-
 drivers/staging/skein/{include => }/skein_block.h  |   2 +-
 drivers/staging/skein/{include => }/skein_iv.h     |   2 +-
 ...threefish1024Block.c => threefish_1024_block.c} |   2 +-
 .../{threefish256Block.c => threefish_256_block.c} |   2 +-
 .../{threefish512Block.c => threefish_512_block.c} |   2 +-
 .../skein/{threefishApi.c => threefish_api.c}      |   4 +-
 .../{include/threefishApi.h => threefish_api.h}    |   4 +-
 15 files changed, 21 insertions(+), 201 deletions(-)
 rename drivers/staging/skein/{include => }/skein.h (100%)
 delete mode 100644 drivers/staging/skein/skeinBlockNo3F.c
 rename drivers/staging/skein/{skeinApi.c => skein_api.c} (99%)
 rename drivers/staging/skein/{include/skeinApi.h => skein_api.h} (99%)
 rename drivers/staging/skein/{include => }/skein_block.h (92%)
 rename drivers/staging/skein/{include => }/skein_iv.h (98%)
 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%)
 rename drivers/staging/skein/{include/threefishApi.h => threefish_api.h} (99%)
drivers/staging/skein/Makefile +5 -7
index 2bb386e..395454c 100644
@@ -1,13 +1,11 @@
 #
 # Makefile for the skein secure hash algorithm
 #
-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
drivers/staging/skein/TODO +0 -1
index 88a6e81..cd3508d 100644
@@ -1,6 +1,5 @@
 skein/threefish TODO
 
- - rename files
  - move macros into appropriate header files
  - add / pass test vectors
  - module support
drivers/staging/skein/skein.c +3 -3
index 2a2da98..f76d585 100644
@@ -11,9 +11,9 @@
 #define  SKEIN_PORT_CODE /* instantiate any code in skein_port.h */
 
 #include <linux/string.h>       /* get the memcpy/memset functions */
-#include <skein.h> /* get the Skein API definitions   */
-#include <skein_iv.h>    /* get precomputed IVs */
-#include <skein_block.h>
+#include "skein.h" /* get the Skein API definitions   */
+#include "skein_iv.h"    /* get precomputed IVs */
+#include "skein_block.h"
 
 /*****************************************************************/
 /*     256-bit Skein                                             */
drivers/staging/skein/skein.h renamed from drivers/staging/skein/include/skein.h +0 -0
similarity index 100%
rename from drivers/staging/skein/include/skein.h
rename to drivers/staging/skein/skein.h
drivers/staging/skein/skeinBlockNo3F.c deleted +0 -175

175 lines not on this page · raw message

drivers/staging/skein/skein_api.c renamed from drivers/staging/skein/skeinApi.c +1 -1
similarity index 99%
rename from drivers/staging/skein/skeinApi.c
rename to drivers/staging/skein/skein_api.c
index 16d596b..eaf7af4 100644
@@ -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)
 {
drivers/staging/skein/skein_api.h renamed from drivers/staging/skein/include/skeinApi.h +3 -3
similarity index 99%
rename from drivers/staging/skein/include/skeinApi.h
rename to drivers/staging/skein/skein_api.h
index b4e879d..db808ae 100644
@@ -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
@@ -79,7 +79,7 @@ OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <linux/types.h>
-#include <skein.h>
+#include "skein.h"
 
 /**
  * Which Skein size to use
drivers/staging/skein/skein_block.c +1 -1
index 7b66ec5..76c4113e 100644
@@ -15,7 +15,7 @@
 ************************************************************************/
 
 #include <linux/string.h>
-#include <skein.h>
+#include "skein.h"
 
 #ifndef SKEIN_USE_ASM
 #define SKEIN_USE_ASM   (0) /* default is all C code (no ASM) */
drivers/staging/skein/skein_block.h renamed from drivers/staging/skein/include/skein_block.h +1 -1
similarity index 92%
rename from drivers/staging/skein/include/skein_block.h
rename to drivers/staging/skein/skein_block.h
index a8dd083..bd7bdc3 100644
@@ -10,7 +10,7 @@
 #ifndef _SKEIN_BLOCK_H_
 #define _SKEIN_BLOCK_H_
 
-#include <skein.h> /* get the Skein API definitions   */
+#include "skein.h" /* get the Skein API definitions   */
 
 void skein_256_process_block(struct skein_256_ctx *ctx, const u8 *blk_ptr,
 			     size_t blk_cnt, size_t byte_cnt_add);
drivers/staging/skein/skein_iv.h renamed from drivers/staging/skein/include/skein_iv.h +1 -1
similarity index 98%
rename from drivers/staging/skein/include/skein_iv.h
rename to drivers/staging/skein/skein_iv.h
index 7ff93df..a03703d 100644
@@ -1,7 +1,7 @@
 #ifndef _SKEIN_IV_H_
 #define _SKEIN_IV_H_
 
-#include <skein.h>    /* get Skein macros and types */
+#include "skein.h"    /* get Skein macros and types */
 
 /*
 ***************** Pre-computed Skein IVs *******************
drivers/staging/skein/threefish_1024_block.c renamed from drivers/staging/skein/threefish1024Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish1024Block.c
rename to drivers/staging/skein/threefish_1024_block.c
index 827ce1a..dac74e1 100644
@@ -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,
drivers/staging/skein/threefish_256_block.c renamed from drivers/staging/skein/threefish256Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish256Block.c
rename to drivers/staging/skein/threefish_256_block.c
index 1329c71..0b33b3f 100644
@@ -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,
drivers/staging/skein/threefish_512_block.c renamed from drivers/staging/skein/threefish512Block.c +1 -1
similarity index 99%
rename from drivers/staging/skein/threefish512Block.c
rename to drivers/staging/skein/threefish_512_block.c
index db50d83..1c62bf6 100644
@@ -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,
drivers/staging/skein/threefish_api.c renamed from drivers/staging/skein/threefishApi.c +1 -3
similarity index 98%
rename from drivers/staging/skein/threefishApi.c
rename to drivers/staging/skein/threefish_api.c
index 0ba42fa..2b649ab 100644
@@ -1,7 +1,5 @@
-
-
 #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,
drivers/staging/skein/threefish_api.h renamed from drivers/staging/skein/include/threefishApi.h +2 -2
similarity index 99%
rename from drivers/staging/skein/include/threefishApi.h
rename to drivers/staging/skein/threefish_api.h
index 96cc0e8..2fce154 100644
@@ -3,7 +3,7 @@
 #define THREEFISHAPI_H
 
 /**
- * @file threefishApi.h
+ * @file threefish_api.h
  * @brief A Threefish cipher API and its functions.
  * @{
  *
@@ -29,7 +29,7 @@
  */
 
 #include <linux/types.h>
-#include <skein.h>
+#include "skein.h"
 
 #define KEY_SCHEDULE_CONST 0x1BD11BDAA9FC1A22L
 
Signature · 6 lines
1.8.4.5



-- 
Jake Edge - LWN - [email protected] - http://lwn.net