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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316128857-9781-10-git-send-email-kilroyd@googlemail.com>
Date:	Fri, 16 Sep 2011 00:20:53 +0100
From:	David Kilroy <kilroyd@...glemail.com>
To:	linux-kernel@...r.kernel.org, greg@...ah.com
Cc:	pe1dnn@...at.org, David Kilroy <kilroyd@...glemail.com>
Subject: [PATCH 09/13] staging: wlags49_h2: Remove MUL/DIV_BY_2

Only used in one place, so just inline and get rid of the macro.

Signed-off-by: David Kilroy <kilroyd@...glemail.com>
---
 drivers/staging/wlags49_h2/hcf.c    |    2 +-
 drivers/staging/wlags49_h2/hcfdef.h |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c
index c46ad30..0453b90 100644
--- a/drivers/staging/wlags49_h2/hcf.c
+++ b/drivers/staging/wlags49_h2/hcf.c
@@ -3766,7 +3766,7 @@ download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp )                     //Hermes-II
 #if 0   //;? as long as the next if contains a hard coded 0, might as well leave it out even more obvious
 		if ( 0 /*len is definitely not want we want;?*/ && ltvp->mode == CFG_PROG_SEEPROM_READBACK ) {
 			OPW( HREG_PARAM_1, (hcf_16)(ltvp->nic_addr >> 16) );
-			OPW( HREG_PARAM_2, MUL_BY_2(ltvp->len - 4));
+			OPW( HREG_PARAM_2, (hcf_16)((ltvp->len - 4) << 1) );
 			                        //.  .  perform Hermes prog cmd with appropriate mode bits
 			rc = cmd_exe( ifbp, HCMD_PROGRAM | ltvp->mode, (hcf_16)ltvp->nic_addr );
 			                        //.  .  set up NIC RAM addressability according Resp0-1
diff --git a/drivers/staging/wlags49_h2/hcfdef.h b/drivers/staging/wlags49_h2/hcfdef.h
index 8fb870dc..a62b53a 100644
--- a/drivers/staging/wlags49_h2/hcfdef.h
+++ b/drivers/staging/wlags49_h2/hcfdef.h
@@ -568,9 +568,6 @@ err: ;
 
 #define LOF(x)          (sizeof(x)/sizeof(hcf_16)-1)
 
-#define MUL_BY_2( x )   ( (x) << 1 )                        //used to multiply by 2
-#define DIV_BY_2( x )   ( (x) >> 1 )                        //used to divide by 2
-
 //resolve problems on for some 16 bits compilers to create 32 bit values
 #define MERGE_2( hw, lw )   ( ( ((hcf_32)(hw)) << 16 ) | ((hcf_16)(lw)) )
 
-- 
1.7.4.1

--
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