lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1449542244-637-1-git-send-email-jpage.lkml@gmail.com>
Date:	Mon,  7 Dec 2015 21:37:24 -0500
From:	Sanidhya Solanki <jpage.lkml@...il.com>
To:	gregkh@...uxfoundation.org, mathieu.poirier@...aro.org,
	jason@...edaemon.net, deepa.kernel@...il.com, brcnakalin@...il.com,
	vatikaharlalka@...il.com, sudipm.mukherjee@...il.com
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Sanidhya Solanki <jpage.lkml@...il.com>
Subject: [PATCH] Staging: Skein: Moved macros from skein_block.c to header file.

The original code defined macros in the source code, making it
harder to read. Moved them to the header file, as per the TODO file.

Upadated the TODO file.

Signed-off-by: Sanidhya Solanki <jpage.lkml@...il.com>
---
 drivers/staging/skein/TODO          | 1 -
 drivers/staging/skein/skein_block.c | 6 ------
 drivers/staging/skein/skein_block.h | 7 +++++++
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/skein/TODO b/drivers/staging/skein/TODO
index cd3508d..e3de0c7 100644
--- a/drivers/staging/skein/TODO
+++ b/drivers/staging/skein/TODO
@@ -1,6 +1,5 @@
 skein/threefish TODO
 
- - move macros into appropriate header files
  - add / pass test vectors
  - module support
 
diff --git a/drivers/staging/skein/skein_block.c b/drivers/staging/skein/skein_block.c
index 45b4732..2120392 100644
--- a/drivers/staging/skein/skein_block.c
+++ b/drivers/staging/skein/skein_block.c
@@ -26,12 +26,6 @@
 #define SKEIN_LOOP 001 /* default: unroll 256 and 512, but not 1024 */
 #endif
 
-#define BLK_BITS        (WCNT * 64) /* some useful definitions for code here */
-#define KW_TWK_BASE     (0)
-#define KW_KEY_BASE     (3)
-#define ks              (kw + KW_KEY_BASE)
-#define ts              (kw + KW_TWK_BASE)
-
 #ifdef SKEIN_DEBUG
 #define debug_save_tweak(ctx)       \
 {                                   \
diff --git a/drivers/staging/skein/skein_block.h b/drivers/staging/skein/skein_block.h
index 9d40f4a..0fd4bfe 100644
--- a/drivers/staging/skein/skein_block.h
+++ b/drivers/staging/skein/skein_block.h
@@ -7,6 +7,13 @@
 ** This algorithm and source code is released to the public domain.
 **
 ************************************************************************/
+
+#define BLK_BITS        (WCNT * 64) /* some useful definitions for code here */
+#define KW_TWK_BASE     (0)
+#define KW_KEY_BASE     (3)
+#define ks              (kw + KW_KEY_BASE)
+#define ts              (kw + KW_TWK_BASE)
+
 #ifndef _SKEIN_BLOCK_H_
 #define _SKEIN_BLOCK_H_
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ