Skip to contentSkip to conversation

b43: N-PHY: follow kernel coding style for struct declaration

PATCH In review Rafał Miłecki 3 participants 4 messages Jan 14, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 b43: N-PHY: follow kernel coding style for struct declaration

---
 drivers/net/wireless/b43/phy_common.c |   14 ++++++++++++++
 drivers/net/wireless/b43/phy_common.h |    1 +
 drivers/net/wireless/b43/phy_lp.c     |   17 ++---------------
 3 files changed, 17 insertions(+), 15 deletions(-)
drivers/net/wireless/b43/phy_common.c +14 -0
index 75b26e1..1389ab2 100644
@@ -421,3 +421,17 @@ void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on)
 {
 	b43_write16(dev, B43_MMIO_PHY0, on ? 0 : 0xF4);
 }
+
+/* Find the position of the most significant bit */
+u8 phy_nbits(s32 val)
+{
+	u32 tmp = abs(val);
+	u8 nbits = 0;
+
+	while (tmp != 0) {
+		nbits++;
+		tmp >>= 1;
+	}
+
+	return nbits;
+}
drivers/net/wireless/b43/phy_common.h +1 -0
index 9edd4e8..332ba4c 100644
@@ -418,5 +418,6 @@ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset);
  */
 void b43_phyop_switch_analog_generic(struct b43_wldev *dev, bool on);
 
+u8 phy_nbits(s32 val);
 
 #endif /* LINUX_B43_PHY_COMMON_H_ */
drivers/net/wireless/b43/phy_lp.c +2 -15
index c4e9c5c..7ad9215 100644
@@ -1593,19 +1593,6 @@ static const struct lpphy_rx_iq_comp lpphy_rev2plus_iq_comp = {
 	.c0 = 0,
 };
 
-static u8 lpphy_nbits(s32 val)
-{
-	u32 tmp = abs(val);
-	u8 nbits = 0;
-
-	while (tmp != 0) {
-		nbits++;
-		tmp >>= 1;
-	}
-
-	return nbits;
-}
-
 static int lpphy_calc_rx_iq_comp(struct b43_wldev *dev, u16 samples)
 {
 	struct lpphy_iq_est iq_est;
@@ -1632,8 +1619,8 @@ static int lpphy_calc_rx_iq_comp(struct b43_wldev *dev, u16 samples)
 		goto out;
 	}
 
-	prod_msb = lpphy_nbits(prod);
-	q_msb = lpphy_nbits(qpwr);
+	prod_msb = phy_nbits(prod);
+	q_msb = phy_nbits(qpwr);
 	tmp1 = prod_msb - 20;
 
 	if (tmp1 >= 0) {
Signature · 1 line
1.6.4.2
#1 lore raw

Hi

Quoted 7 lines · Rafał Miłecki
---
 drivers/net/wireless/b43/phy_common.c |   14 ++++++++++++++
 drivers/net/wireless/b43/phy_common.h |    1 +
 drivers/net/wireless/b43/phy_lp.c     |   17 ++---------------
 3 files changed, 17 insertions(+), 15 deletions(-)

Your second patch is the same as first one.

Stanislaw

#2 lore raw

W dniu 14 stycznia 2010 16:39 użytkownik Stanislaw Gruszka

Quoted 4 lines · <[email protected]> napisał:

Hi

Quoted 1 line · Rafał Miłecki
Quoted 8 lines
Quoted 6 lines

---
 drivers/net/wireless/b43/phy_common.c |   14 ++++++++++++++ drivers/net/wireless/b43/phy_common.h |    1 + drivers/net/wireless/b43/phy_lp.c     |   17 ++---------------

 3 files changed, 17 insertions(+), 15 deletions(-)

Your second patch is the same as first one.

Whoops, thanks :)

Signature · 1 line
Rafał