]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: wlags49_h2: Remove MUL/DIV_BY_2
authorDavid Kilroy <kilroyd@googlemail.com>
Thu, 15 Sep 2011 23:20:53 +0000 (00:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 18:34:52 +0000 (20:34 +0200)
Only used in one place, so just inline and get rid of the macro.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/wlags49_h2/hcf.c
drivers/staging/wlags49_h2/hcfdef.h

index c46ad30496104be1cfe23b93a696b361b51d6d15..0453b908b2f1e9ae5545a57453c2836345701c84 100644 (file)
@@ -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
index 8fb870dcab73a5e023d15351bb4d2d6b0f4d753e..a62b53a22891078bf6f6b148964591482eb16d7a 100644 (file)
@@ -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)) )