mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	jkosina@suse.cz, dsterba@suse.cz
Subject: [PATCH 02/12] ipwireless: Remove unused defines
Date: Mon, 28 Jul 2008 16:52:39 +0200	[thread overview]
Message-ID: <20080728145238.13378.1816.stgit@ds.suse.cz> (raw)
In-Reply-To: <20080728145124.13378.39300.stgit@ds.suse.cz>

ipwireless: Remove unused defines

Remove unused defines, defines hiding variables, defines hiding 0.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---

 drivers/char/pcmcia/ipwireless/hardware.c |   15 ++++++---------
 drivers/char/pcmcia/ipwireless/network.c  |    3 +--
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index 6a3e666..ce57a7f 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -227,15 +227,12 @@ struct MEMINFREG {
 	unsigned short memreg_tx_new;	/* TX2 (new) Register (R/W) */
 };
 
-#define IODMADPR 0x00		/* DMA Data Port Register (R/W) */
-
 #define CARD_PRESENT_VALUE (0xBEEFCAFEUL)
 
 #define MEMTX_TX                       0x0001
 #define MEMRX_RX                       0x0001
 #define MEMRX_RX_DONE                  0x0001
 #define MEMRX_PCINTACKK                0x0001
-#define MEMRX_MEMSPURIOUSINT           0x0001
 
 #define NL_NUM_OF_PRIORITIES       3
 #define NL_NUM_OF_PROTOCOLS        3
@@ -422,7 +419,7 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
 
 		outw(DCR_TXDONE, hw->base_port + IODCR);
 	} else if (hw->hw_version == HW_VERSION_2) {
-		outw((unsigned short) length, hw->base_port + IODMADPR);
+		outw((unsigned short) length, hw->base_port);
 
 		for (i = 0; i < length; i += 2) {
 			unsigned short d = data[i];
@@ -431,10 +428,10 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
 			if (i + 1 < length)
 				d |= data[i + 1] << 8;
 			raw_data = cpu_to_le16(d);
-			outw(raw_data, hw->base_port + IODMADPR);
+			outw(raw_data, hw->base_port);
 		}
 		while ((i & 3) != 2) {
-			outw((unsigned short) 0xDEAD, hw->base_port + IODMADPR);
+			outw((unsigned short) 0xDEAD, hw->base_port);
 			i += 2;
 		}
 		writew(MEMRX_RX, &hw->memory_info_regs->memreg_rx);
@@ -863,7 +860,7 @@ static void do_receive_packet(struct ipw_hardware *hw)
 			pkt[i + 1] = (unsigned char) (data >> 8);
 		}
 	} else {
-		len = inw(hw->base_port + IODMADPR);
+		len = inw(hw->base_port);
 		if (len > hw->ll_mtu) {
 			printk(KERN_INFO IPWIRELESS_PCCARD_NAME
 			       ": received a packet of %u bytes - "
@@ -874,7 +871,7 @@ static void do_receive_packet(struct ipw_hardware *hw)
 		}
 
 		for (i = 0; i < len; i += 2) {
-			__le16 raw_data = inw(hw->base_port + IODMADPR);
+			__le16 raw_data = inw(hw->base_port);
 			unsigned short data = le16_to_cpu(raw_data);
 
 			pkt[i] = (unsigned char) data;
@@ -882,7 +879,7 @@ static void do_receive_packet(struct ipw_hardware *hw)
 		}
 
 		while ((i & 3) != 2) {
-			inw(hw->base_port + IODMADPR);
+			inw(hw->base_port);
 			i += 2;
 		}
 	}
diff --git a/drivers/char/pcmcia/ipwireless/network.c b/drivers/char/pcmcia/ipwireless/network.c
index fe914d3..cf12eb4 100644
--- a/drivers/char/pcmcia/ipwireless/network.c
+++ b/drivers/char/pcmcia/ipwireless/network.c
@@ -29,7 +29,6 @@
 #include "main.h"
 #include "tty.h"
 
-#define MAX_OUTGOING_PACKETS_QUEUED   ipwireless_out_queue
 #define MAX_ASSOCIATED_TTYS 2
 
 #define SC_RCV_BITS     (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
@@ -94,7 +93,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
 	unsigned long flags;
 
 	spin_lock_irqsave(&network->spinlock, flags);
-	if (network->outgoing_packets_queued < MAX_OUTGOING_PACKETS_QUEUED) {
+	if (network->outgoing_packets_queued < ipwireless_out_queue) {
 		unsigned char *buf;
 		static unsigned char header[] = {
 			PPP_ALLSTATIONS, /* 0xff */


  parent reply	other threads:[~2008-07-28 14:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 14:52 [RESEND][PATCH 00/12] ipwireless: driver updates David Sterba
2008-07-28 14:52 ` [PATCH 01/12] ipwireless: Misc cleanups David Sterba
2008-07-28 14:52 ` David Sterba [this message]
2008-07-28 14:52 ` [PATCH 03/12] ipwireless: Rename spinlock variables to lock David Sterba
2008-07-28 14:52 ` [PATCH 04/12] ipwireless: Remove pt_regs from interrupt handler David Sterba
2008-07-28 14:52 ` [PATCH 05/12] ipwireless: Glue splitted printk strings back David Sterba
2008-07-28 14:53 ` [PATCH 06/12] ipwireless: Remove endian-dependent bitfields David Sterba
2008-07-28 16:41   ` Petr Tesarik
2008-07-28 14:53 ` [PATCH 07/12] ipwireless: Do not return value from sending funcs David Sterba
2008-07-28 14:53 ` [PATCH 08/12] ipwireless: Constify buffer variables David Sterba
2008-07-28 14:53 ` [PATCH 09/12] ipwireless: Explicitly request io and mem regions David Sterba
2008-07-28 14:53 ` [PATCH 10/12] ipwireless: Increase PPP outgoing queue size David Sterba
2008-07-28 14:53 ` [PATCH 11/12] ipwireless: Put packets to pool start David Sterba
2008-07-28 14:53 ` [PATCH 12/12] ipwireless: Preallocate received packet buffers with MRU size David Sterba
2008-07-28 16:42 ` [RESEND][PATCH 00/12] ipwireless: driver updates Stefan Schmidt
  -- strict thread matches above, loose matches on Subject: below --
2008-07-18 22:10 [PATCH " David Sterba
2008-07-18 22:11 ` [PATCH 02/12] ipwireless: Remove unused defines David Sterba

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=20080728145238.13378.1816.stgit@ds.suse.cz \
    --to=dsterba@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

Powered by JetHome