mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Kilroy <kilroyd@googlemail.com>
To: linux-kernel@vger.kernel.org, greg@kroah.com
Cc: pe1dnn@amsat.org, David Kilroy <kilroyd@googlemail.com>
Subject: [PATCH 09/13] staging: wlags49_h2: Remove MUL/DIV_BY_2
Date: Fri, 16 Sep 2011 00:20:53 +0100	[thread overview]
Message-ID: <1316128857-9781-10-git-send-email-kilroyd@googlemail.com> (raw)
In-Reply-To: <1316128857-9781-1-git-send-email-kilroyd@googlemail.com>

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

Signed-off-by: David Kilroy <kilroyd@googlemail.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


  parent reply	other threads:[~2011-09-15 23:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 23:20 [PATCH 00/13] wlags49_h2: Various cleanups David Kilroy
2011-09-15 23:20 ` [PATCH 01/13] staging: wlags49_h2: Remove non-linux configurations David Kilroy
2011-09-15 23:20 ` [PATCH 02/13] staging: wlags49_h2: Reindent hcfdef.h David Kilroy
2011-09-15 23:20 ` [PATCH 03/13] staging: wlags49_h2: Fix macro termination David Kilroy
2011-09-15 23:20 ` [PATCH 04/13] staging: wlags49_h2: Reindent hcf.c David Kilroy
2011-09-15 23:20 ` [PATCH 05/13] staging: wlags49_h2: Remove HCF_DL_ONLY David Kilroy
2011-09-15 23:20 ` [PATCH 06/13] staging: wlags49_h2: Simplify HCF_ENCAP usage David Kilroy
2011-09-15 23:20 ` [PATCH 07/13] staging: wlags49_h2: Remove some unused defines David Kilroy
2011-09-15 23:20 ` [PATCH 08/13] staging: wlags49_h2: Remove references to SSN David Kilroy
2011-09-15 23:20 ` David Kilroy [this message]
2011-09-15 23:20 ` [PATCH 10/13] staging: wlags49_h2: Remove CKIP support from hcf David Kilroy
2011-09-15 23:20 ` [PATCH 11/13] staging: wlags49_h2: Remove HCF_EXT_MB from code David Kilroy
2011-09-15 23:20 ` [PATCH 12/13] staging: wlags49_h2: Reformat TX_CNTL comment David Kilroy
2011-09-15 23:20 ` [PATCH 13/13] staging: wlags49_h2: Remove continuous tx test David Kilroy
2011-09-16 21:10 ` [PATCH 00/13] wlags49_h2: Various cleanups Henk de Groot
2011-09-19 17:59   ` Dave Kilroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316128857-9781-10-git-send-email-kilroyd@googlemail.com \
    --to=kilroyd@googlemail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pe1dnn@amsat.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®