* Resend: [PATCH] rt2x00: Consolidate definition of CSR_OFFSET
@ 2008-09-19 0:22 John Daiker
2008-09-19 18:09 ` [Rt2400-devel] " Ivo van Doorn
0 siblings, 1 reply; 2+ messages in thread
From: John Daiker @ 2008-09-19 0:22 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, rt2400-devel, daikerjohn
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Resend: Premature send to Linville only... this version copies
linux-wireless and rt2400-devel.
This consolidates the definition of CSR_OFFSET when
CONFIG_RT2X00_LIB_DEBUG is also set.
The original definition appeared in 5 files, but was moved to a common
.h file instead.
Compile-tested only, as I don't have any rt2x00 HW in a working machine.
Signed-off-by: John Daiker <daikerjohn@gmail.com>
---
[-- Attachment #2: rt2x00.patch --]
[-- Type: text/x-diff, Size: 4270 bytes --]
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 08cb9ee..ac4ae00 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -188,7 +188,6 @@ static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
}
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
-#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2400pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data)
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index ef42cc0..2efcfd3 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -188,7 +188,6 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
}
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
-#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2500pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data)
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index d3bf7bb..6883632 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -245,7 +245,6 @@ rf_write:
}
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
-#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) )
static void rt2500usb_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data)
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 1359a37..3d0ad2b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -67,6 +67,10 @@
do { } while (0)
#endif /* CONFIG_RT2X00_DEBUG */
+#ifdef CONFIG_RT2X00_LIB_DEBUGFS
+#define CSR_OFFSET(__word) (CSR_REG_BASE + ((__word) * sizeof(u32)))
+#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
+
/*
* Various debug levels.
* The debug levels PANIC and ERROR both indicate serious problems,
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index b7f4fe8..c0ec25a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -552,7 +552,7 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index)
queue->length++;
} else if (index == Q_INDEX_DONE) {
queue->length--;
- queue->count ++;
+ queue->count++;
}
spin_unlock_irqrestore(&queue->lock, irqflags);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 2c36b91..2ce3f2c 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -228,7 +228,6 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
}
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
-#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt61pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data)
@@ -1934,7 +1933,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
}
static void rt61pci_fill_rxdone(struct queue_entry *entry,
- struct rxdone_entry_desc *rxdesc)
+ struct rxdone_entry_desc *rxdesc)
{
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
struct queue_entry_priv_pci *entry_priv = entry->priv_data;
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 27dde3e..28a5cdf 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -249,7 +249,6 @@ rf_write:
}
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
-#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data)
@@ -1685,7 +1684,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
}
static void rt73usb_fill_rxdone(struct queue_entry *entry,
- struct rxdone_entry_desc *rxdesc)
+ struct rxdone_entry_desc *rxdesc)
{
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Rt2400-devel] Resend: [PATCH] rt2x00: Consolidate definition of CSR_OFFSET
2008-09-19 0:22 Resend: [PATCH] rt2x00: Consolidate definition of CSR_OFFSET John Daiker
@ 2008-09-19 18:09 ` Ivo van Doorn
0 siblings, 0 replies; 2+ messages in thread
From: Ivo van Doorn @ 2008-09-19 18:09 UTC (permalink / raw)
To: rt2400-devel; +Cc: John Daiker, John Linville, linux-wireless
On Friday 19 September 2008, John Daiker wrote:
> Resend: Premature send to Linville only... this version copies=20
> linux-wireless and rt2400-devel.
I was in the BCC list, but here goes my official reply. :)
> This consolidates the definition of CSR_OFFSET when=20
> CONFIG_RT2X00_LIB_DEBUG is also set.
> The original definition appeared in 5 files, but was moved to a commo=
n
> .h file instead.
>=20
> Compile-tested only, as I don't have any rt2x00 HW in a working machi=
ne.
NACK
This patch does more then consolidating =A0the CRS_OFFSET definition si=
nce it
changes several lines for adding/removing whitespaces as well.
It completely breaks rt2500usb, and I really dislike using define
names in rt2x00.h
while the define itself is declared in the register headers only (and
is thus not really
visible in rt2x00.h, even though the compiler would accept it and it
would work as
expected).
Ivo
> Signed-off-by: John Daiker <daikerjohn@gmail.com>
>=20
> ---
>=20
>=20
>=20
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-19 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 0:22 Resend: [PATCH] rt2x00: Consolidate definition of CSR_OFFSET John Daiker
2008-09-19 18:09 ` [Rt2400-devel] " Ivo van Doorn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).